Creating a Rogue-Like Game

Hey, I'm fairly new to C++, although not a complete newbie which I took a basic class for C++, but I was wondering if it is a good idea to start trying to make a roguelike game, as a first game attempt. If you dont know what a roguelike game is, there is a game called Rogue that was made back in 1980. It's public domain I believe so it should be a quick and easy download if you dont know what it is. There are also games like this that have the same interface with ASCII characters, random dungeons generation and such, like Dwarf Fortress, NetHack, ADOM, Angband, among others.

I was just curious on if this is a good starting point to try to make a game like this, and any tips on what I should do or how to get started is welcome. Or am I trying to aim too high already?
Yes, that is a good starting project. As long as you keep it simple. Trying to make something as complex as ADOM would be really tricky, but a very basic roguelike is a terrific first project.

I don't recommend the ASCII route. Personally I think you're better off diving right into graphics. There are game libs around that make it pretty easy. I often recommend SFML:

http://www.sfml-dev.org/

It can be a little tricky to set up, but once you have it running, it makes graphics, input and audio a cinch.
I personally prefer playing roguelike games with ASCII rather than graphics. But at the same time I think I see why you wouldnt recommend it. Especially with all of those crazy input symbols, it would probably be hard to keep up with. I appreciate the input so far...

More comments are welcome, always :)
I don't recommend it for a number of reasons.

- The console isn't designed for that kind of thing. In some ways doing this in the console is more difficult.
- If you're interested in game development you'd want to learn how to use a graphic lib anyway
- The console has limitations that other libs don't.


This might sound dumb, but if you like the ASCII style, then I would say use a graphic libs and just use images of the ASCII symbols instead of graphics.
Ah I see, thanks a bunch! I'll try to start tomorrow if I have the time on the project. I'm just trying to figure out how to deal with randomly generated dungeons. I'll have to look into that, which I know is an issue later on in development I believe, but I'm trying to set up a game plan.

But thanks a lot for that bit of info.
I'm just trying to figure out how to deal with randomly generated dungeons.


I wouldn't start with that.

Start with a fixed dungeon first. Get the game more or less working with a fixed dungeon. Then work on randomly creating them.


I looked at the Moria source way back to see how it did this stuff. Other roguelikes probably do it a similar way....

Moria floods the map with solid rock, then cuts out "rooms" in it semi-randomly. It's like it splits the map into an 8x8 grid and puts at most 1 room in each "cell" of that grid. The total number of rooms on the map is within a certain range. Like 15-30 or something.

There are different kinds of rooms. Some are just rectangular. Some are two rectangles superimposed, some are shaped like a cross with a treasure in the center, some have more enemies and treasures placed in them, etc. Usually the normal rectangular rooms are the most common, and the other kinds of rooms get more common the deeper you go.

After that, each room spawns one or more "hallways" that shoot out in random directions. They pick a direction, move for X spaces (random), then pick a new direction, move for X more spaces, etc.

Hallways extend for a predetermined (possibly random) length, but have a higher chance to end prematurely if they run into another room, or another hallway (increasing the probabilty of a T intersection being formed).



But that's just one way to do it.
Last edited on
Wow, the guys who made Rogue were smart to make a randomly generated game for back in 1980. I hope I can get this accomplished. They had something for back then. Still do, I just don't see any games implementing this in todays games. I wish Demons Souls and Dark Souls had that.
Still do, I just don't see any games implementing this in todays games.


Elona is a free, modern roguelike heavily based on ADOM that does all this. It's also still being actively developed, afaik.

Worth checking out if you are into the genre. I have to warn you though, it will completely suck up all your free time once you start playing it.
This is Angband which is based on the original source of Moria. It does have many ports and has graphics, which span from early windows and xwindows to more modern exploits in open gl.

There are many variations of this

http://www.thangorodrim.net/
Disch, I've looked at Elona, and Roguelikes with a bunch of glittery graphics seems like it might be hard at first to get into. The only roguelike I like with amazing graphics are the Diablo series, which I really do think is a roguelike and many people just don't realize it.

And yes, I'm definitely into roguelikes, but for short bursts of time here and there. It helps when I study or do homework for college and my brain needs a short break.

Azagaros, I appreciate the link, I really do, but I've already been playing Angband for about 3 days now. It's my favorite roguelike so far (I havent played all the roguelikes yet though). I find its one of the best "coffeebreak roguelike" games in my opinion. It's great and fits my taste perfectly. I just use the original graphics, but I did look at all the other tilesets for it. I'll still look over the website though. Thanks again!
Roguelikes with a bunch of glittery graphics seems like it might be hard at first to get into


Elona is hardly what I'd call glittery. It's just simple tiles instead of ASCII characters. The only graphics that are more complex than a single still frame is the main player and a small handful of explosion animations.

But still it's a step up from a @ symbol walking around dodging D symbols.
I don't have a number pad on my laptop, so I tend to have trouble with Roguelikes. I hope this won't hurt me in my programming for a game that usually uses number pad keys.
Your the guy making it, surly you can just use w,a,s and d or something else? Or is there a particular reason they need to be numbers?
I just wasn't thinking... I'll make the movements QWE, ASD, ZXC... It might be weird for some folks, but it's all I can do.
Could you not make it both? So Q OR 7, W OR 8 etc. That way you can just use whatever you prefer. Or is there a downfall to this that I'm not seeing?
No, no downfall except that I dont have a numberpad on the side to see if it works. Im not sure if there would be an issue between the numbers at the top of the keyboard and the numberpad.
Yea fair enough, it might be worth keeping in mind. I can't imagine it being too much effort. Although I have never actually done something like that. I can't remember what you call it a key press event or something? Instead of the standard input of pressing a key and then ENTER. Anyway, good luck.
Yes the numpad keys typically have different keycodes than the numbers at the top row of the keyboard.

It's not really a big problem though. And there isn't really much to test so I wouldn't worry too much about it.
Topic archived. No new replies allowed.