Milestone


So, last night I quietly added a new kind of chained enemy that travels in trigonometric waves.  I didn't bother making an update note on this, as I determined that there's enough crap going on on-screen at this point to warrant an old game design technique called object pooling.

This isn't an object-oriented language, but here the term still applies; in the past, every time I created a new bullet or ship, there was a memory allocation call. When that entity was destroyed, there was also a free. This was fine while things were simple, but I've hit the point where there's tangible benefit to pooling all the memory for these game entities, and pre-allocating it, at the very loading of the game; and then clean it all up on close. It avoids memory fragmentation and extra work allocating and deallocating usable short-term storage space, both of which slow the game down.

It also frees up stunts that are almost unfeasible otherwise.

I've soak-tested the game to a thousand points without any SEGFLT or SIGABRT errors, so it's safe to say that everybody out there in internet-land is going to be fine; but as a note, if somehow it ever has more than a hundred and twenty eight ships or bullets on screen, it will crash. I'll consider turning that up in the future, possibly as high as 512, but only if there's a benefit. Otherwise, it should run a lot smoother now.

I'm also beginning work on a gradual difficulty scale for the game, which will slowly increase with time to keep things interesting. It will have an effect on spawned powerups and enemies. It should add a lot of color.

Files

shoodemup_win.zip 7.4 MB
Oct 08, 2020
shoodemup_linux.tar.gz 5 MB
Oct 08, 2020
shoodemup.zip Play in browser
Oct 08, 2020

Get ShooDemUp

Buy Now$1.99 USD or more

Comments

Log in with itch.io to leave a comment.

Cool!