There are a couple of things I need to teach the player when he picks up the game. How to move, how to dash, the fact that he can dash into enemies to harm them and how he can throw weapons. So I figured I could generate a less-random level with a very linear path consisting of 4 rooms. Each room teaching one of those lessons.

I’m pretty happy with the result, I need to playtest but I think people will get it :) The last room functions as a boss-room, with a goal ray that takes the player to the next level.





Talking about the goal ray… It’s another task I did today :D If the room has a goal door in it (it’s a door in the floor that opens up and releases a white ray). it will activate it once enemies of that room are eliminated, it’ll be on the boss rooms to take the player to the next level. It deactivates the player’s movement and beams him up slowly as the screen fades out.

Talking about screen fading out… I made a simple fade-in/out system by spawning a SpriteRenderer in front of the camera and animating it’s alpha. It doesn’t play well together with particles though, the particles stay in front of the spriterenderer :( So I might need to find another solution for it later, but close enough for now. I also added a quick fade-in/out when the camera is going from one room to the next.





Now, about the camera, some people suggested I experiment with the camera closer to the character. I implemented the camera that follows the character around, and added a button to toggle between the camera modes (Following/Static). I keep the desired static position in the GameManager and the camera manager decides based on a “following” boolean whether to lerp towards the desired static position found in the game manager or towards a desired position based on the current whereabouts of the players.

I fixed one little bug, behind the door there were still colliders for the walls, so when I dashed into doors to go to the other side I would bounce off of it instead. So I added a piece of code to the door to cast an overlapsphere behidn it looking for colliders, and deactivate any collider found behind the door. Now I can dash into doors and pass through to the other side :)

I had to poke around the Room Manager again, before there was only one prefab variable for room and the generator would generate the same room over and over again all over. For the tutorial level and for the actual levels I need to have a bunch of different prefab lists based on different types of rooms to pick from. I made 2 lists for each type, one is public and is the list I fill myself, the second one is filled at run-time based on the public one. As the prefabs get spawned they are taken out of the list so that the same room won’t appear twice in the same level. I might have to try and prevent the same room from appearing twice in the same run later on, but for now that’s good enough. If it does try to pull from the non-repeating list and can’t find any prefabs, it will refill it with some of the original ones though.

I then made 2 of each tutorial room, just so there is some variation. And that was it for my day, it was quite productive, and now I have a “playable” singleplayer version :) However, I still need to make a bunch of new rooms and some more enemy prefabs for it to be more fun to test. Once that’s done I should move on to making some new weapons and character upgrades. The next few days leading up to Full Indie should be spent making rooms… Or implementing the replay system I got on today’s Asset Store sale :D I’ve been eyeing that for a while so today when I saw it on the sale it was an instant-buy ^^ It’ll be really cool to see replays of the kills on the survival deathmatch.