Quote Originally Posted by Anarchy_Balsac View Post
Sometimes even simpler, for the Marauder Shields video game, the tile and item maps are one and the same (this made putting background tiles behind enemies and items challenging)

This is because the Platformer Starter kit I built it out of reads the entire thing as a text file matrix for each stage.
That is a little strange. Did it do that in the starter kit originally? I can't really see the benefit of that... :confuse:
Was it ever finished?




Anyway, back to the discussion about how optimizing early is bad and evil and all that stuff. Guess what I did today? Yep, you totally guessed it.

CPU side tilemap rendering is now 3x faster! (remember GPU is already maxed out basically) :) Since we are storing everything in tight arrays we have zero extra indirection or overhead compared to something like lists or maps so rewriting it to be fast was trivial. For some reason I couldn't get the profiler to check L2 cache hits or branch misses on this computer, but it seems like it's not an issue as everything is very compact already. Whatever. Stupid Microsoft.

At my max resolution of 1280x744 we've got 960 tiles on screen per layer, x2 layers = 1920 possible draw calls, which takes me 0.16 milliseconds, or, 1% of out the total target frame rate of 16.0 milliseconds, and was 3-7% CPU usage. With a normal sized resolution CPU usage was at 0%, and with a C# script over the top of it running a tetris game was maxed at 2%.

Keep in mind that and I've got a shitty laptop right now too. To put this in perspective for you guys: I can't actually play any game made in game-maker on this computer without major lag or fear of overheating, and even an rpgmaker vx game puts me at 80-90% CPU use.


At the end of the day you just have to feel good about some things, like not just throwing whatever crap you've got lying around into a bun and calling it a Big Mac, but actually creating something from scratch even though it takes a little longer, and really, just caring about things in general.