Pretty good week!
This week I worked on systems for my ‘Melee’ game and I made some cellular automata with SUGAR!
I’m still making relatively slow progress on this game because I’ve been working on systems that are not part of SUGAR but are very useful to making games. Those systems I will probably release alongside SUGAR, they’re not essential to making anything and they definitely go towards making certain types of games, but I did make them and I put care into it and I think the result is pretty robust.
The systems I’m talking about are mainly:
- An object system, where you can register and deregister instances, and then update or draw them all with a single update_objects() or draw_objects() call. You can also but several tags on those object, so that they form groups, like ‘OBJ_ENEMY’ or ‘OBJ_OBSTACLE’. You can then use a function to get a vector of all the objects in one group and perform checks on those.
- An animation system, where you can register however many sprite animations you want, simply by defining an array of sprite indexes and setting a frame speed. From there you can call draw_anim() with an object’s identifier to draw one of these animations.
- A simple movement + collision system, with map collisions and very simple object collisions.
- A camera system, with integrated screen-shake and camera ‘push’. (similar to screen-shake except smoother and much more controled)
I think it’s best that I make all these system as good as I can, because all of them will serve for future projects, and I would rather not have to rewrite any one of them for those.
For the game itself though, I am still working on the design and I think it’s going to be pretty interesting! I should be able to actually program some of it this coming week, so that’s exciting!
If you’ve been following for more than a year, you might remember a few times when I played a lot with cellular automata and produced a lot of eye candy from it. Well it turns out that Sugar is pretty much perfect for cellular automata!
Like in Pico-8, Sugar stores pixel surfaces into arrays of color indexes, which are very easy (and fast) to access. Except it’s faster in Sugar than in Pico-8, because there’s no fantasy limitations and because Pico-8 does this thing where two pixels are stored in a single byte, while in Sugar every pixel has its own byte! Besides, Sugar surfaces can be of any size you want, and the same goes for the color palette! (well, up to 256 colors for the palette)
So Sugar is pretty ideal for this stuff, and that’s great news because this stuff is quite simple and very fun to experiment with and it makes for great visual content while I work on background stuff in Sugar and in my game!
You can expect to see more of these little cellular automata experiments in the coming weeks!
Finally, I’ve been working on a sprite rotation algorithm. I do want sprite rotation in Sugar but I also wanted a better implementation than I what I could come up with on Pico-8 in the past. So here’s a little prototype on Pico-8. It’s incomplete as of yet, but I’m definitely onto something with it. As soon as I get this prototype where I want, I’m implementing it in Sugar and I’m using it in the game!
That’s it for this week! It was a pretty good week!
This next week, I’m finishing and implementing my sprite rotation algorithm into Sugar. Then I’m working on the game again!
Thank you to all my Patreon supporters, because I couldn’t be writing posts like this one without you! Here are the names of all the 3$+ supporters:
Ryan Malm, Joseph White, Austin East, Marcin Majewski, Zachary Cook, Jefff, Riccardo Straccia, HERVAN, Andreas Bretteville, Bitzawolf, Alan Oliver, Paul Nguyen, Dan Lewis, Christian Östman, Dan Rees-Jones, Reza Esmaili, Thomas Wright, Chris McCluskey, Joel Jorgensen, Marty Kovach, Cole Smith, Giles Graham, Tim and Alexandra Swast, Sasha Bilton, berkfrei, Jearl, Dave Hoffman, Finn Ellis, Egor Dorichev, Jakub Wasilewski, amaris, Brent Werness, Anne Le Clech, Jeremy Bouin, Jesse Bergerstock, Jacel the Thing, Pierre B., Sean S. LeBlanc, C Oakreef, Andrew Reist, vaporstack, hushcoil, rotatetranslate
Have a nice week and a very nice pride month!