Navigation

Home

Downfall

Hex

Blog

Devlog

R1 backup

Contact me

News

I made a port of the game Brogue to Linux.

I have a blog.

I made some changes to this site's layout.

Downfall 0.3 released!

Devlog

May 9
I've made a lot of progress on the new space game. It now has enemies, very simple combat, planets, and gravity. It's still nowhere near being released.

I'm also making another new programming language. I will be reusing code from my previous ones. This one will be a combination of lisp and python.

April 20
I have learned the basics of Python, and I'm using it to make another new game. I have one module almost complete; it displays stuff and plays music, and uses Pygame. I'm not entirely sure what the game will be about, but it will be set in space.

I've also added some stuff to this site. I put a navigation bar at the left, and changed the news so it's on every page. I had to change the names of most of the documents, so update your links.

April 15
I am learning Python, and I will probably use it for my future projects. I also uploaded a new version of RLLib. This one doesn't use SDL.

April 12
I'm porting RLLib to SDL. It is very annoying to have to write different code for each operating system. So far, I have ported the basic graphical part of RLLib. The new library will also have sound support.

April 3
I made a simple implementation of the hex board game. It detects wins, but it doesn't have a computer player, and it doesn't have the swap rule

Also, I added some digging commands to the new game. It has dig, fill (fill a river with rock), chop, and build staircase. You must be careful when digging, because there is no "floor" between levels. The only thing supporting a level is rock on the level below. If you dig into the rock below you, a person will fall and die. This makes it best to not dig anything on half the levels, so your people have no chance of falling.

March 29
I've been mostly working on the new game. I have pathfinding working (with A*) and I'm working on staircases.

March 14
I've added real-time support to RLLib. I have only implemented it for Linux so far; I will implement it for Windows later. It will be used for a new game I'm making, which I'm working on right now. This game will probably not be considered a roguelike; I think it will be a real-time strategy game, but with an ASCII (and hex) display. Here is a screenshot of what I have so far (450 LOC):

Screenshot

It is real-time, but you can't see that from the screenshot.

March 8
I've thought about it some more, and I've decided that my new 7DRL idea will never work. I'm now out of 7DRL ideas, so I'm counting it as a failure :(. I'm going to work on Downfall instead. Good luck to the rest of the participants!

Today, I added cursed items to Downfall. It is starting to look similar to other roguelikes' item systems. One major thing I still need to implement is plusses on items.

March 7
I haven't been able to get the network code to work, so I am making a roguelike in which you write code to control your character.

I'm beginning the 7DRL competition with MultiRL, which will be multiplayer. It is currently Saturday, March 7, 10:35 GMT -5.

Update: I got the basic code for my 7DRL done; it is 172 LOC, not counting RLLib. You can't write code to control your character (or control your character at all) yet; I will do that tomorrow. I also need to add a dungeon generator and (maybe) pathfinding.

March 4
I wasn't able to upload files for a few days (again). I don't know whether the problem will continue.

I added rings over the past few days. I added rings of regeneration and poison resistance.

I won't be able to have RLLib ready by the 7DRL competition. I haven't worked on it much (too busy with Downfall), and there are still some features I want to add before release, like simple drawing functions.

I should probably start preparing for the 7DRL competition. I haven't tested RLLib's networking code thoroughly enough, and I don't know how I will implement chat.

March 1
I uploaded Downfall 0.3.

I also began work on Downfall 0.4. I implemented a very basic scripting system, so item effects can be modified easily, without changing the source code. Also, it's possible to switch weapons and armor without unequipping the old one first.

Downfall has 6100 LOC and 500 lines of config files.

February 27
I decided to add identification to Downfall. I have the basic system mostly implemented; item identities are hidden at the start, and have to be revealed through use or an identification scroll. The unidentified items are given a label with 5 random letters.

I also found and fixed a crash bug. A monster had picked up some arrows, but had no bow to fire them with, and was wielding no weapon, so the game tried to use an invalid pointer. (I don't know exactly which kind.) I hope that Downfall doesn't have any more crash bugs.

February 24
I changed the look command to show what is on every tile you look at. It also allows you to move to a certain tile. It doesn't do any pathfinding yet; it just moves you in a straight line, and it ignores monsters. It can be used as a "do or die" command, by setting a monster as the target. Then you will attack that spot until either the monster dies, the monster runs away, or you die.

I didn't get anything else done today. Version 0.3 has all the features I want in it, but I still need to balance it, because the balance is horrible. Balancing is very difficult, especially when adding many features at once.

February 23
I think I can release Downfall 0.3 by Saturday. I have all of the major features I want in this release, but there are still some minor features that I want to add. Today I changed magic mapping so it doesn't reveal the sections of the dungeon which are solid rock. I also optimized the hexagon-drawing algorithm so it doesn't use a (slow) flood-fill algorithm; instead, it is sort of like a double-bresenham's-line-algorithm, filling all the pixels between two lines. It draws the exact same hexagons as the old algorithm, though, and is a lot faster.

I have made a list of some of the major features I want to put in 0.4. The major things I want to add are a way to learn spells (maybe spellbooks), wands, rings, food, better AI, more items, a scripting language, and shops. This isn't a complete list.

February 22
I haven't been able to upload files for the past few days. I still don't know what the problem was, but it's working now.

Anyway, I added more dungeon branch code, and added some actual branches. They are still basically copies of the ones in Dungeon Crawl, so I need to invent some new ones. I also fixed a bug that caused a monster to be deleted from each level you aren't on every time the game is saved and restored. I fixed 4 or so other bugs, including the staircase one. Apparently, the game was creating 6 copies of a dungeon level, and added 5 stairs to each one. They were all saved with the same filename, which is why so many staircases ended up on one level

February 20
I've been working on the dungeon branch loading code. It's almost complete. The main problem I've had were some really weird bugs. One bug caused a labyrinth to have orcs instead of a minotaur. Another caused a dungeon level to have 30 staircases to the next level. The one I'm working on now causes parts of the dungeon to be set to unexplored when using portals. I think I fixed it, but it happens so rarely it's hard to tell.

It's much easier to add content with these configuration files than adding it to the source would be. I think it would take well over 1000 LOC to implement all the configuration file data as code.

According to SLOCCount, Downfall has 5460 LOC and 400 lines of config files. I estimate that 0.3 is 85% done.

February 18:
I added the main dungeon branch code. I can now create basic dungeon branches. Here is the config file I'm using:

    branch d
      name the dungeon
      levels 16
      monsters all
    
    branch orc
      name the orcish mines
      levels 4
      monsters all
    
    conn d orc 1 1

This file uses two dungeon branches from Crawl, but it's only a test, and will be replaced by real data soon. I will also add the ability to limit a branch to having specific monsters, and have special wall and floor colors.

February 17:
I'm adding a dungeon branch configuration file. I have the code about 1/3 done. Downfall can load the data, but it can't create the right levels yet. I've also added an adjust command that can move items to different slots. I estimate that version 0.3 is about 80% done.

February 16:
I changed the XP gain formula to be a little more fair. Before, it often gave multiple experience levels at once. Now, it rarely does. I also added a new option to cre.cfg, starts_with, which lets monsters start with an item of a certain type. I can use the line "starts_with sword" to give the player a sword at the start. I give the player a sword and ring mail so you don't die as easily.

February 15:
I upgraded my computer to Debian Lenny today. That took over two hours, so I didn't have as much time to work as I would like.

I added a new monster probability function. This one is linear, and the old one was quadratic. It seems to be much more fair, and it won't generate any out-of-depth monsters unless the player configures it to. A normal distribution function would be ideal.

I added the abyss as well. It isn't anything like Crawl's abyss, at least not yet, and was put in partly to make sure I can use multiple dungeon branches. I'm not sure if I will keep it in the finished game.

I am thinking about adding a scripting language. Right now, all the monsters and items are configurable, but they can't do anything new unless I modify the source code. But adding a scripting language would be a lot of work, and I'm probably not going to do that right now. I might add one later, though.

February 14:
Today I didn't add any major new features, but I made a lot of minor changes. I added some more items, fixed some bugs, removed some extraneous options in init.cfg, let MP auto-recharge, stopped the player from getting messages about thing he can't see, and other minor things. Downfall has 5111 LOC, plus 250 lines of config files. I've compressed the format for the config files, so otherwise they would be bigger.

I wrote a manual for Downfall. It isn't complete yet, but it discusses most of the main features of the game.

February 13:
I got a lot done today. The main things I added were potions and ranged weapons. I'm still working on letting monsters use these new items. Right now, they will pick them up but not use them. And I also should let monsters look for items to pick up. Right now monsters only pick up items that they happen to walk on top of. They don't even notice other items. Spellcasters are also stupid. At least they don't kill themselves by converting all their HP to MP anymore.

Downfall has 5000 LOC.

February 12:
I added scrolls. There are only four type right now: teleportation, healing, haste, and protection. These just duplicate the spell effects. I should change some of these scrolls into potions, but I haven't implemented them yet.

When a monster kills another, it gains XP approximately equal to the killed monster's XP squared. This can easily cause overflow errors. In my testing, a dragon killed me when I had a huge amount of XP. The dragon gained a negative amount of XP! To fix this, I should probably change this to use the original XP instead of the cumulative one.

I plan to add potions next, and more spell and scroll types. The magic system needs to be improved, too.

Downfall still has 4900 LOC. I refactored a bit more, and that canceled the 100 LOC increase from adding scrolls and the other changes I made.

February 11:
I fixed a few fatal bugs today. One bug caused the game to crash when going down a staircase and then back up. It was caused by trying to display a negative character (-6, which is a raised dot and is used as the floor tile). It should have been positive. I changed the game-saving mechanism to save the floor tiles as integers. Then take up 4x more space, but if I need to save space, I will improve it later.

I also added more monsters, and poison. Snakes and killer bees can poison the player. There isn't any way to cure this poison but to wait it out. I will probably add a spell to cure poison, or let the heal spell cure poison.

I spent a while refactoring. I reduced the code size from 5100 LOC to 4900.

February 10:
I spent some time optimizing over the past few days. Downfall is now very fast. The only slow parts are the flood-fill algorithm and saving/loading the dungeon. It takes about 3-5 seconds to generate 32 dungeon levels.

I'm trying to find a good formula to use for calculating how much XP a monster is worth. I already have something that calculates a monster's power, but I don't have a good formula for converting that into an XP value. Right now, I use the formula p^2 - p/2 + 2. This works pretty well. The only problem is that sometimes XP levels are gained too quickly.

Monsters are like the player in almost every respect. They use the same formulas, can do the same actions (though not as well; the AI's not perfect), and they can gain XP levels when they kill the player. Right now, monsters never attack other monsters, except when casting a spell. They don't check if a monster is between them and the player, so the player can use monsters as shields. This strategy doesn't work well, because weak monsters don't provide much protection and strong monsters will kill the player.

Downfall has over 5000 lines of code.

February 8:
I fixed a bug that caused the game to crash when spellcasters die. I also added some more monsters and experience levels. Experience levels aren't balanced at all now, because you can gain 2-3 levels by the time you get into dungeon level 1! When the player kills a monster that has a similar strength, the player will almost always gain a level.

February 7:
I made a few minor improvements to Downfall and fixed a few bugs. I also noticed that if two or more copies of Downfall are open at once, they will mess up each other's save files. Downfall saves levels you're not currently on to a file, to save memory. If two or more copies of Downfall are open, then when one of them switches dungeon levels, it will often cause the other one to crash when it switches dungeon levels. I haven't found a way to prevent this.

February 5:
I added a new spell to Downfall. It has 8 spells altogether. Monsters can use 3 of the spells, and they are deadly when they use magic missile over and over. I need to find a way to weaken them, and let them use more spells. I should also add experience levels. Otherwise the game is impossible.

Downfall has 4905 LOC, of which 1555 is RLLib and 3350 is Downfall itself. There are also 222 lines of config files. I think I'm about halfway to releasing Downfall 0.3.

I have decided what the version numbers should mean. They are in the form "x.x.x". The first digit is the major version number. It will stay at 0 until I think the game is "done". The second digit is the save compatibility number (I abbreviate it SCN). Released with the same SCN can use each other's saved games without problems. The third digit is the minor or bugfix number. If omitted, it is assumed to be 0.

February 3:
Downfall now has a low hit point warning. It appears when you have less than 1/3 of your HP left. I also added a few more spells, and some status effects.

I also fixed a few bugs, such as an infinite loop that only happened when debugging was disabled and optimizations were enabled. It happened because some variables weren't initialized. This could also cause you to see something like "AC: 219835" in the stats screen in the released version. If you're shown numbers like that, it's different numbers than the game actually uses, because the displayed number is calculated with an averaging function not used in the combat code.

February 1:

I added spells to Downfall. It uses a new magic system that's very different from most of them. It lets you convert items and HP to mana, instead of regenerating mana automatically. I have currently implemented 4 spells. I plan to add spellbooks soon, and use a configuration file for spells.

Monsters are distributed on different dungeon levels based on monster strength, instead of having the same monsters on all dungeon levels. The algorithm I use allows out-of-depth monsters, so it's possible to see a dragon on dungeon level 1. The algorithm is not very good, though; I need to find a way to use a normal distribution.

Downfall now has more than 4700 LOC.

January 30:

I uploaded Downfall 0.2. I'll announce it on RGRD and RGRA tomorrow.

I made a new programming language (actually bytecode) and an assembly language. C's strtok() function is extremely useful, and allowed me to write an assembler in ~130 LOC. I'm almost certain that the language is Turing complete, and I have written a factorial program in it. It took around half an hour to get the factorial program to work. My assembly language is almost as hard to use as the x86 assembly language.

The bytecode is extremely small. I was able to write a Fahrenheit to Celsius conversion program in 12 bytes. The factorial program uses 32 bytes.

Update: I had to re-upload a new version of Downfall 0.2. The previous version didn't update the LOS when you opened or closed a door.

January 28:

I wrote a simple chat application to test my network code. It works well, and the only problem I found was that if I disconnected the server before disconnecting the clients, I got a SIGPIPE, and couldn't restart the application for a few minutes.

January 27:

I have been thinking about what I want to do for the 2009 7DRL. I think I will make a multiplayer game, but with some features to make it more fun to play than most multiplayer turn-based games. The main reason is that everybody will choose an action at once, and then all the actions will be done at once, or maybe in a random order. This has some interesting tactical implications, for example, allowing true dodging by moving out of the way and have someone attack where you were last turn. Also, many people can connect to a server. I think I will have only one server, which will be on my Linux computer.

I wrote a lot of the network code that I will use for this game, and added it to RLLib. This is mainly code that controls servers and clients, and lets them send information to each other.

I haven't added much to Downfall, except add a "bigroom" map type, which is deadly if you don't have any weapons or armor.

January 24:

I haven't had much time to program the past several days.

I have added network support to my version of RLLib. All I have to do before I release it is to improve the documentation and choose a new name (RLLib is too generic).

I was able to get some refactoring done in Downfall. Downfall is now about 4400 lines of code. RLLib is 1500 LOC, so the code for Downfall itself is only about 2900 LOC.

January 16:

Downfall now has some more options for different-sized windows. It allows you to set the number of messages, the width of the player stats, the size of the dungeon, and more.

January 15:

The documentation for RLLib is about half done.

January 14:

I haven't made any huge changes to Downfall recently. I have added a few minor features, such as a death screen showing how you died, and some minor bug fixes.

I have made lots of improvements to RLLib. I have improved the interface, removed redundant functions, and added some examples. I will probably release an updated version soon.

January 3:

Multiple dungeon levels work. I have also added a new dungeon type. I also fixed a bunch of minor bugs, like being able to close a door on top of yourself.

January 2:

I am adding multiple dungeon levels to Downfall. I think I'm about halfway done; I can save individual dungeon levels, and the player, separately.

I have made lots of other minor improvements, such as improving the AI a little.