Posted May 11, 2020 by Chaz Acheronti
#procedural #level #generation #roguelike #fps #cyberpunk #cyberspace #shooter #action #patch #update #phantom #proxy #chaz #acheronti #game #dev #indie #gamedev #unity3d #paintnet #texture #model #probuilder #fl studio #android #windows #gamepad #portable #programming #code
Phantom Proxy - Version Number 0.0.6 A - Procedural Update
Hello again! It has been over two months since the last update. Besides working on the game, I was packing, cleaning, and moving to a new city!
Here are the most important updates that came in v0.0.6 (in order of when I completed them):
Lets break them all down
Interactables are all objects the player can use with the interact key or button. I worked on this first because I knew the player would have to enter a door, which would then need to lock them inside a room.
Once a player opens a door, if they enter a combat space, all doors connected to the room will lock with a skull and chains. Once the player is locked in, they need to fight all the security bots in wave-based combat until all enemies are defeated!
Then, I needed to spice up the decor in the levels, so I made a bunch of props:
To create the waves in the game, I simply make a wave-object and place the enemies I want to be in the wave using normal editor tools.
Once I had the wave system implemented, I worked on 4 simple rooms to be used in random generation: three 2-Door rooms and one small 3-Door room.
For Phantom Proxy's version of procedural levels, all combat spaces will be handcrafted and spawns specifically placed, but the enemies that spawn in those positions will be of random difficulty type (e.g. a soldier with a basic pistol vs. a soldier with a riot shield).
Next, those combat spaces need to be randomly placed in 3D space, and connected by corridors. To attempt this, I started with some basic path-finding in 2D.
The corridors in Phantom Proxy are generated by several passes of a 2D pathing algorithm, and finally one vertical pass to reach rooms that are above or below.
My first attempt was the following 2D system:
Here is the algorithm's flow:
Next, we traverse the y-axis until we reach the destination in 3D. Finally, we place an elevator.
Elevators are pretty simple, they lift from point A to B. Here are some notes about my elevators:
There's one more thing you have to know about making elevators: physics. This is the classic problem of how to maintain a players momentum while also making the platform move the player at the same time. You could use friction, you can child the player to the moving platform, or make the player unable to move until the elevator is done lifting.
For my implementation, the scalable solution is to child the player to the platform. This way, I can make horizontal platforms that move in the future! You can see this in action when the red cube turns green when the player walks into the trigger zone. This means the player is now a child of the moving platform.
So we finally get to level generation! We have:
There's a lot that goes into level generation, but here are the brief bullets:
Lastly, I added the above Level Progress Bar, and a Death Screen:
Thanks to everyone who checked the demo out over the weekend and anyone who was interested enough to read all the way through! I believe being open about the development is the better approach to game creation and I'll continue to be open as long (and legally) possible. After this post, I am going to take a couple days break and try and get my developer streams running again. After that, its time for more core mechanics to be implemented into the game! (I'm thinking... looting weapons)