Hacker Monthly #26 by Netizens Media

Hacker Monthly #26 by Netizens Media

Author:Netizens Media
Language: eng
Format: mobi, epub, pdf
Published: 2012-07-01T15:47:47+00:00


I’ve seen a 10-20% speedup with proper use of this.

Objective Oriented Programming –Anonymous

Back at a game studio, I think it was near the end of the project, we had an object in one of the levels that needed to be hidden. We didn’t want to re-export the level and we did not use checksum names. So right smack in the middle of the engine code we had something like the following:

if(level==10 && object==56 )

{

HideObject();

}

The game shipped with this in.

Maybe a year later, an artist using our engine came to us very frustrated about why an object in their level was not showing up after exporting. The level they had a problem with resolved to level 10. I wonder why?

Stack vs. Heap –Torbjörn Gyllebring

Stack allocation is much faster than heap allocation since all it really does is move the stack pointer. Using memory pools, you can get comparable performance out of heap allocation, but that comes with a slight added complexity and its own headaches.

Also, stack vs. heap is not only a performance consideration; it also tells you a lot about the expected lifetime of objects. The stack is always hot, and the memory you get is much more likely to be in cache than any far heap allocated memory.

The downside of the stack is that it is actually a stack. You can’t free a chunk of memory used by the stack unless it is on top of it. There’s no management — you push or pop things on it. On the other hand, the heap memory is managed: it asks the kernel for memory chunks, maybe splits them, merges them, reuses them, and frees them. The stack is really meant for fast and short allocations.

I’m a Programmer, Not an Artist –Damian Connolly

For indie/solo developers who are working on an iPhone or Android game on their own, while you’re looking for an artist, you should be developing your game at the same time. Use programmer art, stand-ins, free sprites — anything. Most of the time, before even thinking about final assets, I just want something up and running quickly to see if it’s fun. Prototype the crap out of it and find the game. Then, when the gameplay’s locked down, you can start putting in the proper art. Doing it the other way around leads to lost money, and work that needs to be redone multiple times, which aside from harming your project, sucks your motivation to finish it (and if you’re making a game to get a job, showing that you can finish a project is a good thing). Another tip if you’re lacking upfront finance is to find a freelance game artist who will accept a revenue sharing deal, e.g. typically something like 30% of game revenue, payable once it gets published to the AppStore.

Remove Unnecessary Branches –tenpn

On some platforms and with some compilers, branches can throw away your whole pipeline, so even insignificant if() blocks can be expensive.

The PowerPC architecture (PS3/x360) offers the floating-point select instruction, fsel. This



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.