It’s one day in. Here’s my progress so far!
Completed features (from the plan I posted yesterday):
- shooting the hull can cause a breach and vent the atmosphere from connected parts of the ship
- as atmosphere is vented, characters and items are sucked towards, and possibly out of, the breach
- flamethrower that doesn’t penetrate the hull but only works in atmosphere
- flamethrower is implemented but it works in a vacuum
Guns have a “spread” parameter that determines how quickly bullets spread out. This screenshot was taken directly after firing a shotgun at the zombie. You can see the bullets in flight:
We hit the zombie but we also hit the hull. The red tint indicates that that section of the ship is currently being vented into space. Venting takes place over several turns, during which things are sucked towards the hull breach. Note that items and characters have moved since the first screenshot. This was the most complicated mechanic to implement. It uses dijkstra maps to determine which way entities move.
After all the air has vented from a section of the ship, it changes to blue tinted and things stop getting sucked out. Eventually being it vacuum will drain oxygen from your suit, but this feature is not implemented yet.
If you open a door of a pressurized section of the ship that’s facing vacuum, that section starts venting.
If you make it inside the venting room and close the door, atmosphere returns.
- you need oxygen in your suit to survive in vacuum
- oxygen drains while you’re in vacuum, and recharges while you’re in atmosphere.
- make the flamethrower only work in atmosphere
Additionally, as this needs to be a game and not just a tech demo, I’m also planning on implementing:
- procedurally generated ship
- different NPCs
- something that explodes when killed so players have to think about whether killing it will breach the hull
- something that can only be killed by getting sucked into space
The most interesting bug I’ve encountered so far is when shooting the hull with a machine gun, if the hull is breached while bullets are still leaving your gun, there’s a chance you will be sucked towards the hull, in front of bullets that haven’t been fired yet, resulting in you getting shot by your own bullets.