Things I have accomplished/tried to accomplish recently:
- Fine tuned enemy speed and starter weapon stats
- Completely rebuilt the rooms, now they run much more smoothly and fit together nicely
- Tried to spawn big rooms, and failed massively due to how the generation algorithm checks for existing rooms
- Drank a metric ton of espresso
- Made clutter! The game now has broken tables, rusty crates, pipes, and the odd lamp
If you're wondering how the game is looking, here's a GIF:
The code below is a snippet from the generation algorithm. It's mindbogglingly simple. This is one of four if statements, each moving up, down, left, and right, respectively. The code randomly selects a direction and if it is not on top of another room, it spawns one. This leads to the generation of what looks like a continent, thanks to Unity's random number generator. if (which == 0) { transform.position = transform.position + transform.right * 27.18f; RaycastHit2D hit = Physics2D.Raycast(transform.position, transform.forward); if (hit.collider == null) { i++; Instantiate(room, transform.position, Quaternion.identity); } }
This is what it looks like at 1500 rooms using the above algorithm:
[sharedmedia=gallery:images:7729]
The new build is ready for testing, so I'll attach it here. I did get a web build running smooth, but the textures are bugged. Even so, if you can't download the game, here's the link to the web build: https://solokeh.itch.io/the-void-2d
In the .exe version, you can control lighting with keys F2-F7. Also, read the readme.txt file, it helps to know the controls.
(Also, the orange shotgun is bugged, it has no drag, so if you ditch it in space, bye-bye shottie).
I played the web version and it looks promising.
A few things though:
1.) Can the sounds be turned down? They are LOUD!
2.) The character should move in the direction he is facing. In other words, if the character if facing left and I'm pressing 'W', the character should move left, not up. The way the controls are set up seem strange. Typically, 'W' is forward, 'S' is backwards and 'A' and 'D' strafe. This is relative to the orientation of the character.
3.) Function keys are problematic in web browsers. In Chrome, for instance, F3 brings up a search box.
Other than that, it looks good!