Running out of space by Old Starchy
Ludum Dare 42 "Running out of space"
I finished something which means I've completed my goal.
The game is not great.
The code is not great.
But, I did learn about a lot of things while making this :).
Details
Developed in Unity 2018.2.1f1 Personal
Sound effects by SFXR
Background music from https://freesound.org
Background image from royalty free image search on Google
Gameplay
Asteroids fall from the top of the screen. Shoot your way through, but don't get hit by the falling debris.
Move - Left / Right
Shoot - Space - You start with one "barrel" and it goes up to 5 as your score increases
Grav Bomb - Left Control - You start with 2, and get a new one every 2000 points
Extra Lives - You start with 1, and get a new one every 5000 points
Health - Your ship has health, you take damage by hitting asteroids. The harder you hit, the more damage.
Score - You get points by destroying asteroids. You don't get points for using the Grav Bomb though.
Asteroids - You can't destroy the small ones, you just have to avoid them.
If you get sick of the short music loop you can turn toggle it with "M".
Retrospective
(I did not want to embed the videos, I tried to make them normal links but the markdown renderer wouldn't have it)
My initial idea was very much "Asteroids, but with more asteroids". That would cover the theme of "space" and "running out of space [because there are too many asteroids]", and would make my job easier because I could rely on vector graphics.
https://youtu.be/FkHjG759ABY?t=798 Go to 13:18
The gameplay also started a lot more like asteroids with a free roaming ship. The controls were all physics based too, which made it that much harder to control. I can be a bit too set in trying to be realistic sometimes.
I did a quick search for "Vector graphics in Unity" because I figured that would be easier than creating sprites / textures, and found RageSpline which was more than what I was looking for. I spent A bit of time writing a random shape generator, that would save me having to create the asteroids myself and would prevent repetitive assets.
I tried to keep it all pretty simple, so the asteroids were all one hit to explode, and that was OK, but I knew it needed something more than just "shoot asteroid; asteroid explodes into smaller asteroids". The grav gun (read "Gravity Well") was my answer to that problem; a couple more splines and another script to save me work and they were in.
https://www.youtube.com/watch?v=YgJe0YI18Fg
At this stage I wasn't sure how I was going to spawn new asteroids, I didn't want it to be waves (that would have required defining X number of waves and possibly a win condition).
Talking to my housemate he suggested the top-down style, I didn't have any better ideas so I tried it out. It seemed to work better than the freeroaming ship I had earlier as it was much easier to control. It also solved the asteroid spawning problem as now there was a clear direction, top to bottom, and I could spawn the asteroids above the area and have them glide down Bubble Shooter style.
I actually created 3 classes to deal with spawning asteroids. I could have done it with one, but at this stage I was still optimistic and trying to write good / reusable code.
This was about the time I added some sound effects that I randomly generated using SFXR. It was also from discussion with my housemate that the game went from one bullet at a time to the 5 shot spread that's currently in the game.
https://youtu.be/07-8T5UYY0A?t=12
Trying to make the game more enjoyable, I started thinking about the excellent presentation by Jan Nijman of Vlambeer The art of screenshake.
https://www.youtube.com/watch?v=AJdEqssNZ-U
To go with the recent increase in bullets, I decided to give the asteroids health. Then more bullets again. I think these two things actually make up a lot of the enjoyment of the game.
I thought I would need some kind of indication of health for each asteroid, like cracks or perhaps changing colour. However, I left that off initially due to time, but then soon decided that I liked it better without it. I think it has a nice effect.
I'd love to hear any suggestions or thoughts about improving the "game feel".
Once that was done I decided to add the basic UI and decide on the final mechanics of the grav gun. By this stage I was home from work on Monday night, and just wanted to get something finished, so the UI was as simple as I could make it, but the grav gun took a lot of tweaking. Since most of the game was physics based and the mass of each asteroid was random, so the effect of the grav bomb was different for each one, but I had to be happy with it eventually. I also had a couple bugs where the asteroids would split to increasingly smaller pieces to no end, which caused it to hang a few times. I only had one instance where I lost work due to not saving before an infinite loop.
Anyway by around about 12:00 am Tuesday morning I made the repository public and published the game here. Now (the following Thursday) that its been a few days I wanted to share some things that I learnt, but since the above is more of a "making of", here's some dot points:
Takeaway's
- I liked how small most of the scripts ended up. Splitting what would normally be a PlayerController class into separate PlayerMoveController, PlayerShootController, and PlayerHealthController made it much easier to try out different mechanics (like freefroam, turret, and rails movement methods).
- The randomly generated asteroids actually turned out pretty well given the effort that went into making them.
- Using Unitys Gizmos functionality was pretty useful when creating the "killzones" and spawn areas. OnDrawGizmos is good bang for buck.
- Despite how simple I thought this game would be, there was much more to do to get it working than I had expected.
- I've always been the kind of person to avoid hacks and try to do things "the right way, once" but I found that as long as you keep things small (and modular) its fine to write something hacky and (maybe not even) replace it later.
- I ended up with a lot of objects that needed a reference to the GameController, and I was using
public GameController GameController;to do it for a little while, but for such a widely used component I ended up tagging it and usingGameObject.FindWithTagto avoid having to link it for every object. I'm not usually a fan of singleton but this wasn't terrible. - I struggled to stay focused on this for a long time, even though programming and gaming are high on my list of fun things to do. I spent a lot of time looking at this as "A not-very-fun game" when I should have been thinking of it as "an exercise to finish a project". It would have also been a good idea to do a 2h on 10m off Pomodoro style time management plan to keep from stagnating.
Ratings
| Given | 0🗳️ | 0🗨️ |
Maybe that's why this game has no reviews?

but the game feels a lot like Asteroids
xD the graphics are basicly the same
otherwise its kind of fun.