Postmortem!
While I didn’t actually complete a game experience, I’m pretty pleased to have made progress on the engine itself!
Stuff I reviewed or learned how to do:
- Saw if any of my old sprite code worked (it didn’t)
- Converted/wrote everything to Typescript as a separate repo, independent from the core server framework.
- Added a game loop extension to my module system.
- M version of my basic systems (sysloop, state, renderer, viewport, texture loader, visual). They could auto-configure themselves without me having to write anything in my main init, which is very cool and extensible!
- Relearned how to do 2D art using procreate, affinity photo, and also how to export and import assets with correct alpha/color matching. The last time I did this, I was using tools like Debabelizer and DeluxePaint II on PC. This was the first time I used the iPad versions of these tools too.
- Reviewed my understanding of ThreeJS, which has gone up by ONE HUNDRED versions since I last used it (thankfully, it’s just a bit more streamlined hooray)
- Worked out the viewport and renderer interaction with the HTML front end; now that we have cool stuff like CSS
grid
andbox-sizing: border-box
to make this a lot easier! Also the dimensional css stuff has been standardized quite a bit. - Figured out the spritesheet format for ThreeJS sprites, and the hidden nature of its async loading of images messing up dimensions despite declarations “working” without it.
- Figured out how to represent a set of sprite classes from meta-only to visual-only to sequenced
- Defined an internal modular testing format that allowed me to keep examples of things I tried in the code without cluttering it up with tons of different variations of the core systems
- worked-out camera system for 2D and 3D world camera (so can use 3D assets in the future)
- worked-out digital asset packaging convention for forward compatibility, deployment
I had to make up a bunch of stuff. As time dribbled away, I had to make a call on not writing the last missing systems. Off the top of my head this would have been:
- piece class hierarchies
- controller class hierarchies
- sound controllers
- player class hierarchies
- behavior class integration into game loop
- referee logic at the beginning of each game loop
- UI overlays
I’m not that concerned about this; it will just take time to port that stuff over and possibly re-architect it on-the-fly.
On Wednesday I decided my achievable goal was to make the “minimum demo” of a ship moving around. There’s no interactivity, between the ship and any element of the world, but it does show some promising things:
-
I didn’t fix the starfield sprite class which is supposed to seamlessly scroll forever as a parallax under layer, but adding the cheesy sparkle effect by randomly not drawing a star layer made them twinkle, which added needed life to the demo. It’s the little things, right?
-
I hacked together a simple keyboard input controller that maintained a keyboard input state that I read directly into the INPUT part of the game loop. Ideally this would be in a Player class (a “human” player) that supports multi-input with unique ids, but who had time for that?
-
The ship controller code actually came out fairly nice in its feel! The keyboard inputs feed a “rotation impulse accumulator” that is added to the “current heading”, and this impulse accumulator degrades from an “rotational friction” property and is limited by “max rotation rate”. This gives the turning some weight. The thrust system is implemented in the same way, with the exception that reverse thrust is about a third the magnitude of forward thrust which helps give the ship a feeling of weight as well. This type of truck-style steering isn’t normally used in a space game like this, but it feels good and it would be interesting to make it work with a physics engine (the math is different than my fakey version). I’m excited about working out this controller logic.
-
I did not have time to add physics into the game, as that would have required me to do more reading to select a physics engine and create its geometry structures. I supposed I could have hacked it in as it’s not that hard, but I didn’t think it would actually have added much without more work than time allowed!
OVERALL
Good experience! Will be continuing to develop the process so I can share stuff with SNHGD! Hooray!
Get "Star Digger" Movement Demo
"Star Digger" Movement Demo
"underworld" top down 2d scroller
More posts
- Tuesday and Wednesday - Final DaysNov 21, 2024
- Monday Day 4: Solidifying CodeNov 19, 2024
- Sunday Day 3: Updating ThreeJS from R69 to R170Nov 18, 2024
- Saturday Day 2: Scaffolding ModulesNov 17, 2024
- Friday Day 1: Behind the 8-Ball Already!Nov 16, 2024
Leave a comment
Log in with itch.io to leave a comment.