I got a very basic save/load functionality working. This was a big milestone. It currently only saves the resources you’ve collected and your ship tiles (which you can’t change anyway!), but it’s a simple approach that should scale easily to save whatever data I decide is worth saving.Continue reading “So Many Options”
I’m working on the toughest problem I’ve had to solve so far. I’m at the point where I need to be able to save and load the game state. In the process of getting that working, I added the ability to “spawn” a new ship tile dynamically. To demonstrate, I asked Kari what type of ship tile she wanted and she wanted twelve thrusters. I spawned twelve of them, and then she wanted twelve guns…
So, today’s version has Kari’s amazing creation. Enjoy!
Made a very small code change today but it feels like a big deal. I gave each drop some amount of resources proportional to its size. When you pick up a drop, you’ll see your generic “resources” increased by that amount. I’ll be splitting this up into various elements like carbon, silicon, and iron based on some random distribution that’s as close as I can get to what we think real asteroids contain. Then you’ll need varying amounts of those elements to build new ship tiles.
Go gather some resources in version 0.0.6.3 over on the releases page.
I changed the rocks so that when you smash them, they don’t just immediately turn into “drops” that you can collect. Instead, they turn into randomly smaller rocks. And you can continue to smash them into smaller rocks until they’re small enough for you to pick up.
This didn’t seem like a big change as I was writing the code, but it turned out to be an important milestone — it’s the first time when I was testing the game that it started to feel fun. Something about the randomness of the pieces of rock flying out into space and chasing after them actually feels like a game.
Check out version 0.0.6.2 over on the releases page.
It’s really easy to add GUI controls in BabylonJS, like text blocks. I’ll use these for the basic heads-up display. I also fixed a really sneaky bug that allowed the player to blow up the same rock twice if two bullets hit it at exactly the same time.
Check out version 0.0.6.1 over on the releases page.
I added a collision check for the drops, which means you can now pick them up after destroying a rock. It’s feeling more and more like an actual game.
Check out version 0.0.6.0 over on the releases page.
I added very simple drops to the game today. Destroying a rock spawns a few smaller objects. They don’t do much right now, other than drift through space, but these will become the resources that you’ll use to build a better ship.Continue reading “Drops”
With collisions working, it was really easy to add a simple “hitpoints” system. When there is a collision, check the two things that collided. If one of them does damage and the other takes damage, then reduce its hitpoints. If the hitpoints reach zero, destroy it. No fancy explosions, yet, because that’s all for show and doesn’t affect gameplay! I’m sticking to that MVP mantra.
Version 0.0.3.0 here.
Latest version here.