Allegro.cc - Online Community

Allegro.cc Forums » The Depot » The Endless Dungeons (graphical roguelike with turn-based combat)

This thread is locked; no one can reply to it. rss feed Print
The Endless Dungeons (graphical roguelike with turn-based combat)
LitmusDragon
Member #14,812
January 2013

My project The Endless Dungeons is completed (to alpha, at least) and is now available at https://sourceforge.net/projects/endlessdungeons/. The Depot page is here (but, the file is too large to host on Allegro.cc): https://www.allegro.cc/depot/TheEndlessDungeons

I coded this using MinGW and the Allegro 4.4.2 binaries from this site. Images and sound I pulled largely from www.opengameart.org. Complete attributions are listed in the documentation.

Summary:
The Endless Dungeons is an 8-bit style random dungeon game consisting of 8 character classes, hundreds of monster types, and 99 randomly generated dungeon levels. You must level your character from 1 to 99, collect items and equipment to make him or her more powerful, and finally confront the boss of the game, Xantos, on the 99th floor of the dungeon.

Though the game is listed as alpha it's completely playable and I think (mostly) bug free.

beoran
Member #12,636
March 2011

Would you consider releasing a Linux version? It doesn't run under WINE currently.

SiegeLord
Member #7,827
October 2006
avatar

I managed to compile the source under Linux, but eventually it crashed when I tried to enter a dungeon... I think I'll wait for you to do the port yourself ;).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Sirocco
Member #88
April 2000
avatar

Congrats on finishing your project!

I'm not sure I'm sold on the combination of high and low-res art assets, but I will say your UI is nice n' clean compared to most Roguelikes. That's a major plus to me :)

-->
Graphic file formats used to fascinate me, but now I find them rather satanic.

LitmusDragon
Member #14,812
January 2013

^ It supports a 64 x 64 tileset which would be in keeping with the icons I used, but someone would have to actually draw it, which would be an enormous undertaking (64 x 28 tiles.bmp = 1792 tiles, not that I'm using all of them, but I did use most of them). Most of these tiles were originally created for Angband, and there are some 64 x 64 Angband sets out there, but I couldn't find a clean copy of those that was masked properly.

Thanks for the feedback everyone. :) I would love to have a Linux and/or Mac version (my significant other uses a Mac) but don't know much about those operating systems. Maybe some day I'll get around to it.

Max Savenkov
Member #4,613
May 2004
avatar

Looks and plays nice! At least, UI is better than most of recent commercial rogue-likes. Two things need fixing, though:

1) Settings menu, with ability to turn off music & sound at least.
2) I haven't found a way to quit the game when I'm in dungeon.

LennyLen
Member #5,313
December 2004
avatar

2) I haven't found a way to quit the game when I'm in dungeon.

Ctrl-Q

LitmusDragon
Member #14,812
January 2013

Sound and music can be toggled by editing dungeon.cfg. That doesn't mean that there couldn't also be a menu option but I'm not sure it's necessary.

Here's a link to the FAQ:
https://sourceforge.net/p/endlessdungeons/discussion/general/thread/6ba973f6/

beoran
Member #12,636
March 2011

Also, the manual is lovely and very detailed, a great piece of work! I didn't play the game, but going by the manual alone it's all very well thought out! :)

LitmusDragon
Member #14,812
January 2013

Thanks! The various game systems were one of my favorite parts of making the game and I enjoyed documenting them.

edit:
I just uploaded a RAR version of the main game files (as opposed to exe self extract) which should help people trying to compile for other O/s.

Elias
Member #358
May 2000

I just uploaded a RAR version

I think .zip would be a better idea, RAR isn't exactly easy to unpack.

--
"Either help out or stop whining" - Evert

LitmusDragon
Member #14,812
January 2013

This is a good point. I've uploaded a zip version of the main game files and replaced the source and editor rars with zip files.

edit:
1.01a version released with several code fixes now, might be more friendly to non-Windows O/s.

beoran
Member #12,636
March 2011

Well, I got it to compile on Linux, but there are various problems that prevent if from working correctly.

1) random() is a pre-define function on linux. I had to rename your random to ed_random().
2) the filenames are not all lower case. Linux file names are case sensitive.
3) the data is in windwos text format, but tah doesn't read in correctly in Linux (the end of line characters in uxnix are \n, nor \n\r, and some functons like scanf or fgets may interpret data differently)
4) file names with backslashes \ . Normally in windows, / should work just as well as it does in Linux.
5) itoa is non-standard and doesn't exist on Linux, in your case sprintf(str, "%d", integer) is a fine replacement.
6) After fixing all that the game compiles and runs, but once I enter the dungeon the tiles don't display correctly, and all I get is a black screen.

Also as a general remark, you may want to apply uncrustify or indent to your code ans split it up a bit, it's rather hard to read. And perhaps split up some long functions like main(), it makes the code easier to follow.

LitmusDragon
Member #14,812
January 2013

Thanks Beoran, this is great feedback. Looks like I'd either need to change the savegame format for it to work on Linux, or change the way it reads the save files. The tiles.dat uses the same txt format as the player savegames, so I assume that's why it fails to show the tiles correctly as well.

Thomas Fjellstrom
Member #476
June 2000
avatar

or change the way it reads the save files

What I used to do was read each line char by char, and eat the "\r" characters. Or rather, more accurately, scan till I find an \r or an \n, and if I found an \r look for an \n and eat that as well, then start a new line. so it'd handle all three "valid" EOLs (dos \r\n, unix \n, pre osx mac \r).

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

beoran
Member #12,636
March 2011

Well, the problem is also that fprintf and fscanf are not used symetrically. With the attached source file, the game seems to work if I change the end of line format of all data files to Unix format.

Edit: another way to solve the portability problem could be to use the allegro ini file writer and reader for all .dat files as well.

Edit 2: and is you use \n in fscanf, that will eat all blank characters, including \r as well too.

LitmusDragon
Member #14,812
January 2013

"Well, the problem is also that fprintf and fscanf are not used symetrically."

I am not sure what you mean by this.

"With the attached source file, the game seems to work if I change the end of line format of all data files to Unix format."

Not sure what this means either. You mean you did a find/replace on the .dat files themselves or you changed the source file?

Also, I see other people are using a "Quote" feature but I don't see any quote button, how are you guys doing that?

LennyLen
Member #5,313
December 2004
avatar

Also, I see other people are using a "Quote" feature but I don't see any quote button, how are you guys doing that?

You can either do this:

<quote>Some text here</quote>

or:

> Some more text

Which gives:

Quote:

Some text here

and:

Quote:

Some more text

See the "Formatting Help" link at the top of the ext box for more options.

beoran
Member #12,636
March 2011

for printf and scanf, if you do fprintf(file, "%i,%i,%i", int1, int2, int3);
the best way to scan that is fscanf(file, "%i,%i,%i", &int1, &int2, &int3);
To scan an a string until end-of line, but not store the end of line in the string,
fscanf(file, "%[^\n]\n", &str); should work well, or perhaps it needs to be fscanf(file, "%[^\n\r]\n", &str);

I have a programmer's editor (Kate) that can convert Windows format text files to Unix format. Basically, on Windows, the end of line is 2 characters, namely "\r\n" while on Unix/Linux it's "\n", and on Max/apple it's "\r".

LitmusDragon
Member #14,812
January 2013

beoran said:

fscanf(file, "%i,%i,%i", &int1, &int2, &int3);

This is how I tried to do it initially, but it did not work. I eventually determined you had to use *c to consume the comma (not use the comma itself). And, it was also necessary to separate out the reads into individual fscanf lines for some reason. But, I will try it your way again to confirm. Obviously, it would be more readable the way you just described it, but like I mention, that's how I tried to do it first and it did not work.

To be clear, the routines with the .dat files do work, under Windows at least. I have completed the game from 1-99 and have other people playtesting on Windows as well and all the saving and loading works fine in that scenario. So to say the routine need to be a different way for Linux, yes that's apparent. But, they are functional on Windows.

edit:
I am incorrect (probably not surprising), your suggestions work fine. I am not sure what I was doing incorrectly when I tried to do it that way to begin with. I will incorporate your suggestions into the next release.

beoran
Member #12,636
March 2011

Good. I'll try the new version once it's out.

LitmusDragon
Member #14,812
January 2013

v1.02 released!

beoran said:

1) random() is a pre-define function on linux. I had to rename your random to ed_random().
2) the filenames are not all lower case. Linux file names are case sensitive.
4) file names with backslashes \ . Normally in windows, / should work just as well as it does in Linux.
5) itoa is non-standard and doesn't exist on Linux, in your case sprintf(str, "%d", integer) is a fine replacement.

Fixed all of this. I did not change the filenames to lower case, but I did verify the code has the case correct.

beoran said:

for printf and scanf, if you do fprintf(file, "%i,%i,%i", int1, int2, int3);
the best way to scan that is fscanf(file, "%i,%i,%i", &int1, &int2, &int3);
To scan an a string until end-of line, but not store the end of line in the string,
fscanf(file, "%[^\n]\n", &str); should work well, or perhaps it needs to be fscanf(file, "%[^\n\r]\n", &str);

This implemented as well. Thanks Beoran for providing the feedback!

One of these days I should install Linux onto my second PC so I can help with the Linux problems, but the next couple of weeks are finals so it's not a great time.

Go to: