I love procedural content, especially when it comes to randomly generated levels. Not only are such systems fun to set up, but it provides almost endless experiences without having to tediously design a butt-load of levels (don’t get me wrong though, handcrafted levels made with love and care are also as fun to play). Of course there is a fine line between how much should be randomly generated and how much should be predefined. There’s a certain point where randomness becomes a little too random and detracts from the fun of the game. For example, in the first Caved In I took a rather easy route with level generation:
- Fill the level with dirt.
- Based on weights for each block type choose one. Then find a random square shaped-area in the level. This varies the tiles in the level creating deposits of coal, gold, water, and etc. Do this a few times.
- For each tile in the square area, change the dirt tile to the chosen block based on a specified chance (if I remember correctly, blocks had a 30% chance to dirt). This ensures we don’t have square areas of tiles.
- Find a random square-shaped area and change all the tiles to floor tiles, which creates (boring) caves. Do this a few times.
Resulting levels were “unique” each time but not very interesting because they lacked defining features or fun caves to explore. In Caved In 2 I’ve decided to take a different route. Instead of randomly generating the level, I broke it into four 12×12 tile “rooms”. The rooms are designed by hand in Ogmo by laying out dirt tiles to define caves and placing object spawns (such as loot, power ups, and etc).
A bare room designed in Ogmo.
The rooms are then compiled into a XML “room database” using a script I wrote in AutoHotKey. When the level is generated, it randomly chooses rooms and stitches them together to form the entire level. The dirt tiles in the rooms are then replaced with other tiles using a similar algorithm found in the original Caved In, although it’s been refined to provide a better spread of block types.
Same room from above in-game…although some gravel caved in above where I dug in.
In the end, levels are still randomly generated but provides me with a bit more control to help give the levels a more personal touch. In the coming weeks I’m going to be churning out loads of more rooms as I get closer to release along with more props and decorations. Stay tuned!
One of the biggest design issues with the original game was guiding the player to the ladder that would take them to the next level.
“I think I’m lost”
The player starts out in pitch black with only a small diamond of the level visible. As the player explores, they uncover the level although areas not within the diamond radius are slightly obscured again. While it was my goal to not hold the player’s hand and let them explore, it proved difficult to determine where the ladder would be each level. It was simply a matter of randomly digging around until the ladder was found. I later added a compass that (sort of) pointed towards the general direction of the ladder, but it was a lousy remedy. Yet it did produce a pretty awesome comment from a player: “Good thing this cave has highly magnetic ladders built into it.”
One of the major goals in the sequel was to find a better solution to this problem and make exploration more rewarding. I tried a handful of different methods, but I eventually came up with the brilliant idea of glowing mushrooms.
Mushrooms are placed in caves and there are usually two or three visible on screen at any given time. They give off a dim light that illuminates the tiles around it, even when the player is not in the immediate vicinity and act as landmarks. Since they only spawn in open spaces, the player begins to realize that digging towards mushrooms means they’ll find a cave once they get there and caves contain loot, damsels, and most importantly – the ladder.
Up next: rescuing damsels while trying not to have the cave come crumbling down on top of your head.
So apparently I first mentioned Caved In 2 back in November and now its almost the end of March, which makes this almost a five month project. Oops…I meant to get this out the door in under a month! Oh well, at least the game is coming along nicely. Here, take a look at the new font and one of the four tile sets:
I’m currently working the game over screen that awards you medals based on statistics from your last session. I’d post a screenie, but the UI is a mess at the moment. Basically, if you mine X blocks or do something X times you get an award with a cool name. Nothing too special but many people often like looking at stats to gauge how well they did and what they accomplished.
After stats and awards, I’ve been thinking about adding traps and a few new powerups but have been having trouble thinking of things that would actually add to the gameplay rather than just being there.
Anyway, almost complete! Hopefully I’ll get it out before the end of March, but I’m not entirely sure with my current workload from school and contracts.
Fun Fact: Planning on doing an ASCII rogue-like next!
I’d post a screen shot of my progress, however, it didn’t occur to me that I should post an update until after I packed up my laptop for today. Oh well. Regardless, the project is coming along quite well. The look of the game hasn’t changed much except the addition of a rather minimal HUD. I spent most of today working on making the AI smarter and polishing game play. Quite interestingly, there have been some mechanics emerging from the combination of tweaks and intended mechanics. Most notably is the constant decision to leave the flash light on or light a room full of lasers (both pull from the same, small pool of energy). I’ve also made it so that enemies run from light sources, so staying in the light is more than just for vision.
Overall, I’m happy with what I’ve gotten done in about a week. I’ve got a few more things to add then onto finishing levels and finally polishing. I should have it complete sometime next week available on every Mochi reaches!
Just a few hours ago I pressed the submit button for my 4th Ludum Dare entry (I actually had to go to my games page and count how many I had done!). However, this time around it was very different. Most notably it was because I worked with a team for 72 hours rather than alone for 48 and it sure was a whole new experience!
Normally when one thinks of a game jam with others, I imagine a group of people crammed into the same room for a few hours working on something great but it wasn’t exactly like that. We DID end up creating something awesome but we were not in the same room. Our medium of communication was solely a private IRC chat room. While we did have an online white board set up, we didn’t really use it as we were able to communicate our ideas well enough through the IRC chat. We also shared assets with the ever-so-handy service, DropBox, by sharing a folder amongst ourselves so that all assets were updated in real-time. All I can say is that I am grateful for technology as well as happy that the four of us meshed together so well!
Now onto the game! Nanonauts is a game of exploration and adventure. The main attraction is the “stargate” system that the player can use to travel between randomly generated worlds and the ship. The stargates themselves feature a fully functioning dialing system (although persistent worlds were not added in time) that requires players to punch in a five symbol planet address in order to travel to new worlds. The worlds themselves are fairly small in order to fit the theme, however the style gives Nanonauts a unique feel. The key features are:
- Working Stargate Network
- Randomly generated “tiny planets”
- 5 unique monsters
- Awesome sound track & artwork
- …and a game that we are proud of!
However, this is not the end of road for this game. Seeing how far we came in the past weekend, we are not ready to shelf the game just yet. We still want to get the features we had in mind into the game, which includes:
- Persistent worlds
- A tech tree
- General plot
- Upgradable tools, weapons, and player ship
- Item crafting/resource gathering
- More robust world generation
However, that is all for now but more will be announced as we begin to add new features to the game. Until then, enjoy the jam version!