Lucid
A downloadable game
Lucid
Lucid is a single-player roguelike based around the dream world. Play through your wildest dreams and worst nightmares as you attempt to finally escape the never ending dream world.
On this project I took on the role as the sole programmer. Anything related to the gameplay and the way the game functions was built by me. I was also a lead designer on this project as apart of a team.
Lucid uses randomly generated levels to give players a new experience every time they play. I created this procedural generation system and it is able to build dungeons with different sizes, rooms and enemies. Treasure rooms and boss rooms also appear and are randomly selected just as well.
Dungeon generator using a basic room
Getting the dungeon to generate doors was a challenge, I had to make sure it was traversable by a player and the exit was always able to be reached. The solution I came to was to give each room a set collection of directions (up, down, left, right),and the rooms can only generate a room that has a compatible connection. So a room wanting to create a connection on it's right side, can only spawn a room with a left connection to ensure that they can connect. Doors are then generated after all the rooms have been made, each room will check if another room exists next to it and then decide whether or not to make a door.
This procedural generation system is something I was able to refine on this project. This technique can be applied to many different scenarios, not just dungeon generating. Procedural generation creates a random arrangement of premade assets at runtime given limitations. For example this dungeon creates rooms selected from a list with the limitation of door direction and grid position.
The character controller is made for satisfying and clean movement around the scene. It is equipped with a dash that has a smooth visual indicator that uses the player's current active sprite and the position, this makes it versatile to any character you add it to.
This character has tweakable top speed, acceleration and deceleration. The simple top down controller is accompanied by the dash movement which has its own acceleration, deceleration and smoothing which helps it transition back into regular movement.
The weapon system in this game lets designers tweak all the stats including: fire rate, range, bullet spread, damage per bullet, bullet speed and the bullet object. It is also able to have unique animations attached to each gun making it useful for creating a wide range of different weapons. Many weapons can be made quickly by tuning these variables and weapons can be upgraded at runtime.
The bullet spread posed a problem at first, I needed bullets to split evenly no matter the bullet count, an even number of bullets was causing an offset from the desired shot direction. The solution was to offset the first bullet by the max spread angle (set by user) divided by half the number of bullets. This ensures that the middle of the spread will always be where the player shoots.
The final major mechanic in this game is the reality swapping. Reality swapping switches the state of the world on a whim, it is configured with a timer but can be triggered from anywhere. When realities swap so does the inhabitants of the dream world, the enemies will change into their nightmare form. Each enemy has a different set of animations and traits based on the reality.
This project was a great learning experience and allowed me to grow as a designer and a gameplay programmer. Building for a team is a great experience and really makes you think about creating accessible and versatile tools.
Download
Install instructions
- Download zip file
- Extract contents
- Run executable file