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
Get ShooDemUp
ShooDemUp
A Shoot-em-up Shoutout to Arcade Culture
Status | In development |
Author | Michael Macha |
Genre | Shooter |
Tags | 2D, Arcade, Shoot 'Em Up, Space |
Languages | English |
More posts
- Heads up to Linux Download UsersSep 10, 2023
- Cosmetic Tape UpdateJan 30, 2021
- Second Update Today-- A Region Timer!Jan 27, 2021
- Hit Points InJan 27, 2021
- MRS. ShooDemUp!Jan 26, 2021
- Expanded Region Shaders!Jan 25, 2021
- Very Special Update!Jan 21, 2021
- OK. I'm back.Jan 13, 2021
- WHEW. That was a big one.Dec 05, 2020
Comments
Log in with itch.io to leave a comment.
Cool!