Dungeon of Ricochet – Post Mortem & Lighting
Welp, this is a post-mortem for dungeon of ricochet, also, i will explain the lighting!
If you haven’t played the game, here is a link.
Here is the Timelapse:
The planning phase:
I started by brainstorming the game, not really that it worked, i ended up changing the idea while designing the art…
It went from a combat RPG to a dungeon crawler, i think the idea is way better, as procedural generation is always fun, and I had been planning to make a dungeon crawler, so it was fun to make!
The prototype phase:
It went really good, i managed to get a prototype with most features working by the first day, i just got into the work, and tried to keep away from the “Idea fairy”! That worked nicely, and i managed to not went from a dungeon crawler to a platformer game! (Like what happened to me on the last LD… BitGun was really meant to be a dungeon crawler…)
The development phase:
With the prototype as the base I started to implement features like better graphics, proper AI, and most important, the level generation. I tried to make a ‘Binding of Isaac’ like dungeon exploring game, not a game like the good old ‘Rogue’, as i found generating dungeons a bit to hard.
The generation is simply done by placing props around the room.
I also made the music, this time using orchestral instruments instead of 8 bit waves.
The Final Phase:
The hardest part of game development, refining the game. I ended up adding new gameplay features in this phase, ‘the shadow’, basically a re-textured ogre that moves a bit faster, and the kitten, which, if you have played the game, you know it attracts ogres and ‘shadows’. It was easy to implement both the kitten and the shadow, but I should have done it during the development phase, as i had to rewrite some AI.
The publishing phase:
The most boring phase of game development, making screenshots, builds, testing on different computers, and uploading. The game is on Flash, compatibility is not a problem, so building was fast, and easy.
I uploaded the game to GameJolt, and later to itch.io, and found that for some reason GameJolt refuses to work in firefox, so i had to install Chrome, not a big problem, but it was 2 am, and I was really tired…
Everything went quite well, no issues uploading, or similar, just the Chrome thing.
The “marketing” phase:
I don’t think one really “markets” a LD game, i just made some posts on twitter, not much.
Future:
I doubt i will continue developing the game “seriously”, juts maybe an update to fix some bugs, or add some features.
Conclusion:
It was very fun to develop this game, and to learn a new Framework!
Remember, don’t be scared to try a new engine/framework/language, just give it a try!
Welp, that was it… Now the lighting thingy
Lighting:
Lighting is one of the biggest features of this game, it really adds to the gameplay to not be able to see what’s coming!
I have been asked a lot of times how I did it, it’s quite simple actually!
Flixel has an awesome thing called “sprite stamping”, that does what its name says, “stamps” a sprite on top of another, making all the pixels from the “stamp” sprite attach to the target sprite, at the coordinates you want.
So what you have to do to achieve the lighting effect, is to first create a ‘darkness’ sprite, just a huge black sprite that covers the entire screen, and add it to the scene on top of everything. I recommend setting that sprite’s blend mode to Multiply, it seems it’s the best for lighting.
Then, you would create some light sprites, using a white (circular) texture, and stamp them over the darkness sprite every frame, just after the darkness sprite is rebuilt (Using <sprite>.makeGraphic(), if you are on flixel), to make sure the lights don’t persist. Also, make sure that just before you stamp the lights you set their alpha to something opaque, and then after the stamping set them back to 0.0 alpha, else they may look bad.
Example (HaxeFlixel): (Untested, should work)
var darkness:FlxSprite;
var light:FlxSprite;
public function override create():Void
{
darkness = new FlxSprite(0, 0);
darkness.makeGraphic(FlxG.width, FlxG.height, 0xff000000);
darkness.blend = BlendMode.Multiply;
light = new FlxSprite(15, 25);
light.loadGraphic(“assets/images/light.png”);
light.blend = BlendMode.Screen;
add(darkness);
add(light);
}
public function override update():Void
{
darkness.makeGraphic(FlxG.width, FlxG.height, 0xff000000); //Clear the darkness sprite
light.alpha = 1.0; //Make sure the light is visible!
darkness.stamp(light, light.x, light.y); //Attach the light to the darkness sprite
light.alpha = 0.0; //Make the light invisible again
super.update();
}
NOTE: That code is not on a FlxSprite, is on the State, if you want to add lights at real time just add them to a group and cycle through them!
This concept could be applied to any engine/framework.
Cheers!