The Infected RL Development Diary #2

Since the last development diary I have made quite a bit of progress.  This includes adding field of vision, procedurally generated maps, hit effects and more.

To allow the player to know when they have hit a creature, or to know when they have been hit, I added a hit effect.  The tile turns red then quickly fades.  See the animated gif below.

Hit Effect





When a monster is killed a corpse is left in its place.  Corpses are represented by a red character ‘%’.

Maps are now procedurally generated.  I implemented a procedural map generator using K-D Trees which are a special case of Binary Space Partitioning.

The map generator currently creates rooms and corridors.  Doors, stairs, etc. will be added to the generator within the next few weeks.

Below are screenshots of maps created with the generator with increasing complexity:

Map Generator 1 Map Generator 2 Map Generator 3 Map Generator 4





The game supports Field of Vision for the player to make walls, creatures, and items visible if it is in there line of sight.  This feature has been implemented using ray casting.

Ray casting is a method for calculating Field of Vision where rays are traced from the centre of a source square to a select number of destination squares.

Map Ghosting
Along with the FOV, I have added map ghosting to provide a faint outline previously seen walls to show where you have been.

Below are screenshots of both the FOV and Map Ghosting:

Screen Shot 2 Screenshot 3 Screenshot 4






I have started working on the sound.  At the moment only the creatures make a sound and that is when they die.  There are 4 death sound effects and are chosen at random when a creature dies.

Next Up…
Next on the list it to look at items as well as weapons.  As well as melee weapons, I want to have ranged and explosives, though most combat will use melee weapons.  I will also be thinking about and working on music for the game.

That’s it for now. Check back soon for Developement Diary #3.

The Infected RL Development Diary #1

Welcome to the first development diary for The Infected RL!

The Infected RL is a roguelike survival horror game that I am developing in Common Lisp.  I started the project because for a long time now I have wanted to make a game, but kept putting it off.  Then recently I decided that it was time for me to really learn Lisp.  As the quickest way to learn a new language is to do a project, I thought why not combine both, make a game while learning Lisp.  Next, I had to decide what type of game I wanted to make.  I knew that I didn’t want to spend much time on graphics and wanted a game that can evolve over time, so I chose to make a roguelike game.  I had never created a rougelike before and wasn’t sure how to best tackle it, so I decided to use “How to Write a Roguelike in 15 Steps” as a guideline.

Since starting the project a week ago I have made quite a bit of progress.   I have implemented the following:

The Map is currently manually created and saved as human readable text file.  The maps are loaded into a 2D Array at the start of the game.  Maps at the moment only support walls, floor and empty space, and can be any size. In the future all maps/levels will be generated.

The player uses the roguelike ‘@’ character and can move in eight directions.  The player is randomly placed in the map when the game starts. Each action the player makes, i.e. move, attack, etc. is a turn.  The player can detect wall and creature collisions.

There a three temporary creatures, Alpha, Beta and Charlie, that use their equivalent ascii characters ‘a’, ‘b’ and ‘c’.  Also, I have given each create a different colour as well.  They can move in the eight directions.  At the moment they all travel at same speed as the player.  The creatures currently have the following stats: name, hearing, hit points, strength, speed and defense.  The creature can detect wall, creature and player collisions.

The creatures have basic intelligence and can navigate around the map using the A* Pathfinding algorithm.  They will navigate around walls and other creatures. The creatures don’t yet have line of sight intelligence.  But I have added a basic sort of hearing intelligence, in that if the player is X amount or less squares away from them based on their hearing range, then they will pursue.  If they go out of range, they will then stop and wait.  If the creature is one square away from the player, they attack.  AI is basic at the moment, but will be improved in the near future.

At the moment only basic bump attack combat has been implemented.  I haven’t implemented any weapons yet.  Just using either the players and monsters strength.  The amount of damage inflicted is calculated by randomizing the player/creatures strength, like a dive roll.  At the moment the player can’t die, but the creatures can if their hit points reaches or fall below zero.  Attacking is performed in all eight directions.  I will soon implement weapons and also range attacks.

Map tiles are rendered with SDL primitive draw-box.  The player and creatures are rendered with standard SDL fonts.  There is currently no sprite map support.

At the moment no sound has been implemented.

Here is a screenshot of what the game looks like at the moment.

Initial Screenshot

The Infected RL

I have began working on a new project, a roguelike survival horror game in Common Lisp.

For a long time now I have been itching to make a game, but I keep putting it off. And also wanted to get back to learning Lisp. So I thought, why not kill two birds with one stone, as they say, and create a game while learning Lisp.

So the game that I am developing, is a cross between State of Decay, and How to Survive. But will be turn-based instead of realtime, and a mixture of ascii/2D instead of 3D.

I have created a new section within the forum that I will use to post development diary entries and a general information within the projects section.

So, check out The Infected RL page for general information, and visit the forum for the development diaries, announcements and more.