A random map each time
Input a seed, see what map you get
Get the Flower Key
..and unlock the door to win
Save/load your game
...and come back to it another time
Play Escape Room with a randomly generated map each time: find the Flower Key, escape the room...before you run out of lives!
Input a seed, see what map you get
..and unlock the door to win
...and come back to it another time
Step on the yellow tiles three times...
Languages: Java
Frameworks: IntelliJ
Team: I worked with my project partner, Andrew
Timeframe: The Random World Generator, including initial ideation and structure, was completed in a week, while the interactivity and game mechanics were completed the week after.
―
For Escape Room, I designed and built the Random World Generating Engine that we eventually used, as well as the Load/Save feature.
Andrew implemented the loading screen and wrote the Line-of-sight feature that was key to our game mechanic.
All other features, including the interactivity, health bars, mouse-hover descriptions, we both worked on together.
As one of the largest software projects I've ever built with a partner, this project taught me so much about managing complexity and handling scale in projects. Escape Room:
● really impressed upon me the importance of abstraction - of how it's really helpful to create basic building blocks first, before layering functionality on top of these building blocks.
● taught me the importance of time management, especially since this project happened during a particularly busy period of my school year.
● taught me a lot about communication and working with another engineer, something that I don't often chance to do in a classroom environment.
We began the project with a collection of TETile objects, which was given to us as part of what was provided in Berkeley's Data Structures class (CS 61B). There were different tiles, and each tile represented a unit of space in the rendered world - we then figured out how to put these tiles together in different ways to create the game.
Essentially, the world consisted of rooms and corridors, and each time a new seed was entered, random numbers of rooms/corridors of random sizes/lengths were generated.
I'm not allowed to go into deep detail, but essentially we had a function which generated the random number of rooms/corridors, whose output fed into functions that created the rooms/corridors with random sizes.
Interactivity was achieved through a Listener that listened for particular keystrokes. Certain keystrokes (WASD, for instance) corresponded to certain actions, and when these keystrokes were pressed, the world was re-rendered accordingly.
One of the most challenging parts of the project, save/load was achieved by having our world object extend serializable. This allowed the world to be written to a .txt file, which we can later read from to re-render the world.
My initial, naive approach was to iterate over every single tile in the entire world, and save a digit corresponding to each tile in a .txt file: so a black tile might be '0', a flower might be '1', a player might be '2' etc.
However, not only was this not as elegant, but saving in this manner also did not preserve the randomness native to the original file.
Shoot me an email at dfs@berkeley.edu, or find me on...