Mike Acton
Updates
-
@olson_dan I don't think there's a such thing as long as you're speaking your mind in public. And I don't think that likely to change.39 hours ago from web | Reply, Retweet, Favorite
-
@someproducer @jesseschell A good reminder of questions to consider: What would you risk for this? What would you ask/allow others to risk?2 days ago from web | Reply, Retweet, Favorite
-
RT @elpeedros: @mike_acton Just applied at Insomniac! Thanks again for the GDC Ask the Experts Session. It set me straight. http://t.co/v0F…3 days ago from web | Reply, Retweet, Favorite
-
@elpeedros Nice! ...and good luck! :)3 days ago from web | Reply, Retweet, Favorite
-
RT @JonnyRadtke: Currently hanging out at @insomniacgames, and playing their new game, "FUSE". So rad we're a part of the trailer for this …3 days ago from web | Reply, Retweet, Favorite
-
RT @insomniacgames: Here is the launch trailer for Fuse. Out in less than 2 weeks! http://t.co/Lvydsawgh33 days ago from web | Reply, Retweet, Favorite
-
@grumpygamer @nickhalme "It's not important enough for you to come over here and hover behind me demanding I fix it?! ...Waive." :)3 days ago from web | Reply, Retweet, Favorite
-
@fwenzel @doctorow That's a unix time stamp (in your case "Mon, 13 May 2013 23:39:08 GMT") - Agree that it's probably to avoid caching.3 days ago from web | Reply, Retweet, Favorite
-
RT @bazecraze: If you just believe in yourself, then everybody will find you annoying.3 days ago from web | Reply, Retweet, Favorite
-
If you #bully a kid, he might just do something about it. By @bullymovie (via @Upworthy) http://t.co/gzZ08CObMY
-
1bir (1 Block Interactive Raycaster) by Crescent (C64): http://t.co/L3lhE3K7mh via @youtube
-
@usabilitycounts @JakeHercules Why? And would be the cut-off point?4 days ago from web | Reply, Retweet, Favorite
-
Curry House for birthday dinner and Beard Papa for dessert. Perfect!5 days ago from web | Reply, Retweet, Favorite
-
RT @dotstdy: http://t.co/4BMmiYzJhL "I Contribute to the Windows Kernel. We Are Slower Than Other Operating Systems. Here Is Why." Interest…5 days ago from web | Reply, Retweet, Favorite
-
@br @twoscooters As in "I'm so sorry you're not as good as me"?5 days ago from web | Reply, Retweet, Favorite
-
@bjoernknafla Thanks!5 days ago from web | Reply, Retweet, Favorite
-
@zebrabox Thanks!5 days ago from web | Reply, Retweet, Favorite
-
@hugin84 Thank you. :)6 days ago from web | Reply, Retweet, Favorite
-
@terrance_cohen Thanks!6 days ago from web | Reply, Retweet, Favorite
-
@girlparts @ScottLowe Depends... was that for a special occassion or are those just your "Monday" outfits? ;)6 days ago from web | Reply, Retweet, Favorite
Posts
Profile
Summary
I'm a regular speaker and active in the game development community. I've made it my personal mission to (1) further games in the mainstream and expand their cultural influence and our understanding of that; (2) champion the voices of individual game developers and help to make sure the right people are heard though work like #AltDevBlogADay; and (3) "fix" some of the power-dynamics and cultural baggage in our industry so that we keep advancing and can adapt well to the real pace of change.
I believe strongly that it is important give back to our community. None of us could have done our jobs well without relying on the work of others and those giants that came before us, and we have a duty to return that favor.
Along with sharing the lessons I've learned through building technology for video games, I'm also strongly motivated to improve our industry and connect on a more human level with players. I also believe that everyone can and should be making games. Examples of where I've spoken and written on these topics:
* Keynote: “#gamedev: We need to aim higher.” (Game Connect Asia Pacific 2011)
* #gamedev: Are we aiming too low? (ANIGAMES Expo, Bogotá, Colombia)
* The art of #gamedev (Nordic Game Conference 2011)
* Keynote (Nordic Game Stockholm Summit 2010)
* It doesn’t have to suck. #gamedev (http://www.insomniacgames.com/747/)
* #gamedev: We need to aim higher (http://altdevblogaday.com/2011/06/06/gamedev-we-need-to-aim-higher/)
My hobbies include designing new hardware on FGPAs and debating all challengers via Twitter (@Mike_Acton)
I live in Burbank with my teenage daughter.
Experience
- Apr 2011 - PresentAdvisory Board / Game Developer Magazine
- 2010 - PresentKeynote Speaker / Games Conferences
- Jan 2007 - PresentEngine Director / Insomniac Games
- May 2005 - PresentSr. Architect / Highmoon StudiosDiscovering the secrets of the Cell BE processor and the Playstation 3.
- Apr 2004 - PresentLead FX Programmer / Sammy StudiosWorked closely with the FX art staff to create custom tools, realtime editing and previewing on the target platform and some very cool special effects.
- Jun 2003 - PresentLead Programmer / FINEWorked on the LIME PS2 title. Developed all tools including art converters and a unique scripting language. Developed all console code including graphics engine, scripting engine, streaming engine and game code. Developed the title from start to gold master in record time.
- Jan 2002 - PresentEngine Programmer / Yukes co, ltd.Worked on developing a new PS2 graphics engine.
- Mar 2000 - PresentTechnical Director / Engine Programmer / VBlank, inc.Mostly engine programming, plus designed the toolset and formats and co-developed the tools.
- Jan 1999 - PresentLead Programmer / Engine Programmer / Bluesky SoftwareI wrote and completed the PSX engine (arbitrary portals, no convexity design restrictions, using arbitrary geometry and all the pipeline tools (lightwave for geometry, image converters, etc)
- 1996 - PresentLead Programmer / Engine Programmer / Sony Interactive Studios AmericaInvolved in every aspect of the development. Including character animation engine, camera logic, AI and virtual control systems, tools, etc.
- 1992 - PresentSimulation Programmer / PerTek IndustriesProgramming for manufacturing simulations. Large concurrent systems on Sun Sparcs. Database and large-system architecture consulting.
Additional Information
Posts
submitted by boxfort
[link] [2 comments]
I'd been having some trouble displaying text in sixty second shooter. There's some stuff Google's working on that's still in development that worked well but I don't want to rely on it. A couple versions of Chrome ago, using browser text on top of the native client stuff seemed to hash my framerate - but either it was my imagination or they fixed it. Browser text is pretty decent now, particularly if your game isn't CPU bound - you can check it out by playing the game with the about:flags framerate counter enabled and turning the "browser text" option on and off.
But searching websites for how to arrange text left me with no clue how to make it look "videogamey" - but eventually, with some advice from Gregg Tavares and others, I found what I was looking for, and here it is.
For a lot of this, jsfiddle.net was awesome for just mucking around with a decent iteration loop.
You can check this all out in the field, by the way, by going to the game sixtysecondshootertest.appspot.com and choosing 'view source' - (you can also see how I did the game's audio.)
I'm a rank amateur at this stuff, so if you know better ways, I'd love to hear them.
Web Fonts
Web fonts are cool. My wife picked out 'Comfortaa' for sixty second shooter. It does seem to add a second or two to the load time, which is a problem, but I'll work that out someday - the game really needs a loading bar.
Overlaying Text
I just wanted to overlay text on top of the game area, for a start. Could HTML even do that? I wondered. The old HTML I knew was only good for arranging witihin a single layer. Overlap wasn't its thing.
Eventually I tracked down the "position: absolute;" style in CSS. It's just what I needed - there's even a z-index if I want to control the order things are displayed, though I didn't seem to need it. It feels good just knowing its there.
For example, to put the player's score and whatever other useful in-game information in the upper-left hand corner...
Controlling Visibility
Here's another little tidbit: when I wanted to hide an element with javascript, the first thing a Google search told me was to set its style.display to 'None'. One problem with that is it bashes whatever information was in the style.display before, whether it was 'inline' or '-webkit-box' or what. A better answer, with Chrome anyway, is to use 'style.visibility', setting it either to 'visible' or 'hidden'. This also keeps the element in the flow - other widgets won't move when it disappears. To wit.
Creating Elements On The Fly
I wanted the points you earned for shooting badguys to pop up when you hit them - the way to do that was to use the CreateElement javascript function. At first I kept track of them in a dictionary, but then discovered I could use the setAttribute() and getElementsByClassName() functions which allowed me to attach data to them and track them. Sorry, no jsfiddle for this one, check the game code.
Sometimes these would stick off the screen, and ugly scroll bars would pop in. Using overflow: hidden on them wouldn't fix it - so I used overflow: hidden on the entire page. Which will mess people up with screensizes smaller than 1024x768, but according to my stat reporting nobody's running that small ... so far.
Resizing The Game To Fit The Window
And that was all I needed, up until I wanted the game to resize with the window. Up until now I'd been doing everything in absolute pixels.
First, resizing the window is pretty easy: use the javascript onresize. (With native client, when you resize the embedded native client element, it calls DidChangeView on the instance. From there I resized my post-processing buffers as necessary.)
The hard part was putting text in the right place - particularly centered text. One way is to use absolute: position, left: 50%, text-align: center, width: arbitrarypx, margin-left: -onehalfarbitrarypx. (Resize that window to see it in action.)
But some of my text, I didn't just want to center it absolutely - I wanted it centered in the middle of the larger, left-hand pane. And it had all sorts of tabley stuff and radio button lists and doodads inside it. This was the biggest pain. This was where I broke out the new flex box stuff which is differently supported in different browsers ... on the bright side, since I'm only supporting Chrome, I only had to use -webkit-box. On the dark side, I discovered interesting things like it's hard to combine flex box with absolute position - look what happens (Chrome/webkit only) if you flex box a list at the bottom of the screen. (My solution for the lower nav bar was to use display: inline and lots of padding-right - they don't spread out exactly the way I wanted but whatev.)
For the box-centered-in-a-pane, I ended up faking it with padding. There's got to be a better way:
A Book
I learned almost everything I know about CSS from CSS: The Missing Manual... and a lot of Googling.
2ch’s latest efforts to make the unmoe moe has seen them manage to moefy the entire national borders of the UK, on the basis that she “looks like a girl worried about the size of her breasts.”
Other nations have been subjected to the same technique, with Chinese efforts in this area proving particularly successful, even if there is some evident disagreement over if and how to incorporate Taiwan…
This is not, however, a recent innovation:
See also the advent of Oniko for an outstanding example of more conventional moe anthropomorphisation.
A few months ago I’ve written an article named Where the top of the stack is on x86, which aimed to clear some misunderstandings regarding stack usage on the x86 architecture. The article concluded with a useful diagram presenting the stack frame layout of a typical function call.
In this article I will examine the stack frame layout of the newer 64-bit version of the x86 architecture, x64 [1]. The focus will be on Linux and other OSes following the official System V AMD64 ABI (available from here). Windows uses a somewhat different ABI, and I will mention it briefly in the end.
I have no intention of detailing the complete x64 calling convention here. For that, you will literally have to read the whole AMD64 ABI.
Registers galore
x86 has just 8 general-purpose registers available (eax, ebx, ecx, edx, ebp, esp, esi, edi). x64 extended them to 64 bits (prefix "r" instead of "e") and added another 8 (r8, r9, r10, r11, r12, r13, r14, r15). Since some of x86’s registers have special implicit meanings and aren’t really used as general-purpose (most notably ebp and esp), the effective increase is even larger than it seems.
There’s a reason I’m mentioning this in an article focused on stack frames. The relatively large amount of available registers influenced some important design decisions for the ABI, such as passing many arguments in registers, thus rendering the stack less useful than before [2].
Argument passing
I’m going to simplify the discussion here on purpose and focus on integer/pointer arguments [3]. According to the ABI, the first 6 integer or pointer arguments to a function are passed in registers. The first is placed in rdi, the second in rsi, the third in rdx, and then rcx, r8 and r9. Only the 7th argument and onwards are passed on the stack.
The stack frame
With the above in mind, let’s see how the stack frame for this C function looks:
long myfunc(long a, long b, long c, long d, long e, long f, long g, long h) { long xx = a * b * c * d * e * f * g * h; long yy = a + b + c + d + e + f + g + h; long zz = utilfunc(xx, yy, xx % yy); return zz + 20; }
This is the stack frame:
So the first 6 arguments are passed via registers. But other than that, this doesn’t look very different from what happens on x86 [4], except this strange "red zone". What is that all about?
The red zone
First I’ll quote the formal definition from the AMD64 ABI:
The 128-byte area beyond the location pointed to by %rsp is considered to be reserved and shall not be modified by signal or interrupt handlers. Therefore, functions may use this area for temporary data that is not needed across function calls. In particular, leaf functions may use this area for their entire stack frame, rather than adjusting the stack pointer in the prologue and epilogue. This area is known as the red zone.
Put simply, the red zone is an optimization. Code can assume that the 128 bytes below rsp will not be asynchronously clobbered by signals or interrupt handlers, and thus can use it for scratch data, without explicitly moving the stack pointer. The last sentence is where the optimization lays – decrementing rsp and restoring it are two instructions that can be saved when using the red zone for data.
However, keep in mind that the red zone will be clobbered by function calls, so it’s usually most useful in leaf functions (functions that call no other functions).
Recall how myfunc in the code sample above calls another function named utilfunc. This was done on purpose, to make myfunc non-leaf and thus prevent the compiler from applying the red zone optimization. Looking at the code of utilfunc:
long utilfunc(long a, long b, long c) { long xx = a + 2; long yy = b + 3; long zz = c + 4; long sum = xx + yy + zz; return xx * yy * zz + sum; }
This is indeed a leaf function. Let’s see how its stack frame looks when compiled with gcc:
Since utilfunc only has 3 arguments, calling it requires no stack usage since all the arguments fit into registers. In addition, since it’s a leaf function, gcc chooses to use the red zone for all its local variables. Thus, esp needs not be decremented (and later restored) to allocate space for this data.
Preserving the base pointer
The base pointer rbp (and its predecessor ebp on x86), being a stable "anchor" to the beginning of the stack frame throughout the execution of a function, is very convenient for manual assembly coding and for debugging [5]. However, some time ago it was noticed that compiler-generated code doesn’t really need it (the compiler can easily keep track of offsets from rsp), and the DWARF debugging format provides means (CFI) to access stack frames without the base pointer.
This is why some compilers started omitting the base pointer for aggressive optimizations, thus shortening the function prologue and epilogue, and providing an additional register for general-purpose use (which, recall, is quite useful on x86 with its limited set of GPRs).
gcc keeps the base pointer by default on x86, but allows the optimization with the -fomit-frame-pointer compilation flag. How recommended it is to use this flag is a debated issue – you may do some googling if this interests you.
Anyhow, one other "novelty" the AMD64 ABI introduced is making the base pointer explicitly optional, stating:
The conventional use of %rbp as a frame pointer for the stack frame may be avoided by using %rsp (the stack pointer) to index into the stack frame. This technique saves two instructions in the prologue and epilogue and makes one additional general-purpose register (%rbp) available.
gcc adheres to this recommendation and by default omits the frame pointer on x64, when compiling with optimizations. It gives an option to preserve it by providing the -fno-omit-frame-pointer flag. For clarity’s sake, the stack frames showed above were produced without omitting the frame pointer.
The Windows x64 ABI
Windows on x64 implements an ABI of its own, which is somewhat different from the AMD64 ABI. I will only discuss the Windows x64 ABI briefly, mentioning how its stack frame layout differs from AMD64. These are the main differences:
- Only 4 integer/pointer arguments are passed in registers (rcx, rdx, r8, r9).
- There is no concept of "red zone" whatsoever. In fact, the ABI explicitly states that the area beyond rsp is considered volatile and unsafe to use. The OS, debuggers or interrupt handlers may overwrite this area.
- Instead, a "register parameter area" [6] is provided by the caller in each stack frame. When a function is called, the last thing allocated on the stack before the return address is space for at least 4 registers (8 bytes each). This area is available for the callee’s use without explicitly allocating it. It’s useful for variable argument functions as well as for debugging (providing known locations for parameters, while registers may be reused for other purposes). Although the area was originally conceived for spilling the 4 arguments passed in registers, these days the compiler uses it for other optimization purposes as well (for example, if the function needs less than 32 bytes of stack space for its local variables, this area may be used without touching rsp).
Another important change that was made in the Windows x64 ABI is the cleanup of calling conventions. No more cdecl/stdcall/fastcall/thiscall/register/safecall madness – just a single "x64 calling convention". Cheers to that!
For more information on this and other aspects of the Windows x64 ABI, here are some good links:
- Official MSDN page on x64 software conventions – well organized information, IMHO easier to follow and understand than the AMD64 ABI document.
- Everything You Need To Know To Start Programming 64-Bit Windows Systems – MSDN article providing a nice overview.
- The history of calling conventions, part 5: amd64 – an article by the prolific Windows programming evangelist Raymond Chen.
- Why does Windows64 use a different calling convention from all other OSes on x86-64? – an interesting discussion of the question that just begs to be asked.
- Challenges of Debugging Optimized x64 code – focuses on the "debuggability" (and lack thereof) of compiler-generated x64 code.
| [1] | This architecture goes by many names. Originated by AMD and dubbed AMD64, it was later implemented by Intel, which called it IA-32e, then EM64T and finally Intel 64. It’s also being called x86-64. But I like the name x64 – it’s nice and short. |
| [2] | There are calling conventions for x86 that also dictate passing some of the arguments in registers. The best known is probably fastcall. Unfortunately, it’s not consistent across platforms. |
| [3] | The ABI also defines passing floating-point arguments via the xmm registers. The idea is pretty much the same as for integers, however, and IMHO including floating-point arguments in the article will needlessly complicate it. |
| [4] | I’m cheating a bit here. Any compiler worth its salt (and certainly gcc) will use registers for local variables as well, especially on x64 where registers are plentiful. But if there are a lot of local variables (or they’re large, like arrays or structs), they will go on the stack anyway. |
| [5] | Since inside a function rbp always points at the previous stack frame, it forms a kind of linked list of stack frames which the debugger can use to access the execution stack trace at any given time (in core dumps as well). |
| [6] | Also called "home space" sometimes. |
Related posts:
- Where the top of the stack is on x86 I’ve noticed more than once that some programmers are confused...
Made by scientist Paul Vallett for his Electron Cafe blog, this funny cartoon is essentially about the differences between how science happens in the movies, and how science happens in real life.
On the one hand, I like it a lot, because the speed and ease of movie science does lead people to expect major breakthroughs to happen quickly, and makes them less critical of the sort of PR and journalism that tries to paint every new paper as a game-changer. In fact, you could probably make a case for movie science being one of the drivers that helps to create that bad PR and journalism to begin with. If decades of film and television have trained people to expect easy "Eureka!" moments, maybe they're likely to have less interest in nuanced results, or the fact that not all published science is correct. Unrealistic expectations matter.
On the other hand, well-done fiction is bound by reasonable constraints. There's not time for a "and then they do real science" montage in every movie. To a certain extent, I think this particular complaint might be a bit like wondering why nobody in Star Wars ever stops to pee.
Via JA Tetro
Your favorite NFL receiver would be proud.
A Redditor called “i_luv_ur_mom” posted this math teacher’s amusement, an equation that draws a lovely Bat-signal.
Do you like Batman? Do you like math? My math teacher is REALLY cool
World population is estimated to be 6.9 billion people, and while that is a lot of people, it suddenly doesn't seem like that much in these maps by Tim De Chant of Per Square Mile. Simply imagine that the world lived with the same density of a real city, and see how much area they take up. If we all lived like they do in San Francisco (space-wise), we'd take up just under 398k square miles, or rather, only four states. Same density as New York? We'd all fit in Texas.
Hello. My name is Mike Acton. You can email me at macton@gmail.com
I'm the Engine Director at Insomniac Games. In these links you'll find my personal opinions about programming, family, and other random stuff.
Check out: CellPerformance.com
Are you a junior programmer or student? Want feedback on your ideas from a #gamedev? Send me a link. I'll queue you for the hotseat.
Coming soon: Macton's Tech Hotseat