Completed 7DRL


I'm releasing Shadows Over Arda, my submission for the 7-day roguelike challenge. This is my first 7DRL, and basically my first completed non-trivial game ever. Thanks to the organizers, this was great motivation!

Source available at https://gitlab.com/eraoul/arda

Some brief notes on my process: I discovered Angband on Tuesday, since I was reading the Silmarillion for the first time and obsessing over Tolkien. Then I discovered Sil and Sil-Q, since I was really hoping to find more Silmarillion-based computer games (there don't seem to be any others that I know of) and shortly after learned about 7DRL. I knew about the roguelike genre a little bit but only because of playing Hades. Finally, I realized 7DRL was in-progress and started on Wednesday to build something. Basically the combination of 7DRL and my desire to play another Silmarillion game made it feel non-optional to participate!

I used vanilla python, no substantial libraries. I did install numpy just for a single instance of a 2d matrix update... sort of overkill but numpy is everywhere. I also installed noise to get Perlin noise generation going easily. Both of these libraries would be easy to do without, but I wasn't trying to go library-free or anything, although that might be a nice challenge. I used curses since it was built-in, and sort of regretted it towards the end when porting from mac to windows, and because my naive implementation was slow when redrawing the screen. Next time I'll probably start with a better framework or go full graphical with Unity etc. The game plays pretty smoothly on my mac running pypy, but the built exe version isn't quite as nice and there are too many flickers on screen redraw.

The game is based mostly on one paragraph from one of the Silmarillion preface-books (the Ainulindalë). This is part of Tolkein's creation-myth for Middle Earth. There's a brief mention of an epic struggle between good and evil in the shaping of the world, and this seemed like a perfect fit for a roguelike.

I ended up using ChatGPT to speed up development and to help craft text descriptions in-game. It was a fun experiment, and helped get this done quickly when I started mid-week. Of course I had to modify a lot of the code and fix some bugs it introduced. It was also building a single-file game, so I spent several hours once it got bigger, to refactor into a lot of separate python files. I'm not proud of the design but it's workable; I'd like to factor more things out and build a more general game loop and event architecture; right now everything is still too tightly-coupled and there are absurd numbers of parameters passed around between certain functions since I didn't have a good global game state architecture in place. But cut me some slack -- it's my first game (although I've read a bit about game design).

Procedural generation: I used Perlin noise to make landscapes ranging from ocean to mountaintops. I realized I could store the elevation map and then have characters modify the elevations as the epic battles unfold. I also made a crude river-generation routine, and realized I could re-run it after the landscape was changed, to simulate rivers re-routing naturally. This is my favorite feature of the game, and I think it's the most unique thing I brought to 7DRL. Unfortunately this only shows up when the player is using the character with land-shaping abilities. Speaking of which...

I ended up making 5 possible characters to play with (representing 5 of the various Valar -- god-like figures from the source material), and each has unique abilities. I partly blame ChatGPT for this idea, which caused a scope increase, but it was fun and makes it feel more appropriate for the source material. I toyed with the idea of having all 5 characters available, as if it were a party-based RPG, but that's too much for this week and also seemed hard to balance. I hoped to have 2 base abilities per character, but scoped it back to 1. I added 2 for one character to make the game playable, since it wasn't possible to beat most levels with that single ability.

Balancing gameplay was a challenge. I did this better for 2 of the 5 characters where I spent more time: Ulmo and Aulë. More tweaking is probably necessary for at least the other 3.

Ulmo and Aulë also got the most interesting abilities: Ulmo can cause floods, which temporarily affect the landscape, and Aulë has two terrain-modification abilities. The other characters have simpler abilities.

I arbitrarily set the win condition to 20 levels; I've only reached level 12, so I figure it's a challenge to get to 20. I also added level-ups to player abilities, but had a bug at player level 20 I just caught in time and fixed last-minute. Testing hooks to play the game starting at a high level would be helpful.

One unexpected challenge was building the final product: I used pyinstaller to build a one-file executable from my python code, but I was annoyed that mac gives unknown developer errors when people try to run the first time. Also I had trouble getting terminal settings correct for an arbitrary user's computer; I added a short script to try to export the right terminal vars. Windows, though, was a bigger challenge, since I was developing on MacOS. I ended up using an old Windows10 install I had on an old Linux box in a VM (VirtualBox) and running pyinstaller there. I also had to install VC++ commandline tools to get the "noise" library to install, and windows-curses to get python curses to work. The Windows .exe was 10x the size of the mac one, which was annoying. 200+MB for a tiny amount of python code. I also had to find an open-source font to add as well since the Windows built-in terminal fonts don't support some of the unicode characters I was using for drawing (the mac fonts supported all the unicode glyphs I tried, by default). Overall this was painful; next time I'll use a pre-built packaging solution hopefully.

Finally, I cut some features for scope to get done in time: I hoped to have equipment usage and melee combat with roaming creatures (orcs, spiders, Balrogs, etc.) I scrapped this but may add it in a future update. Instead, this ends up being purely ability-based, with the goal of cleaning up the landscape after Melkor destroys it.

Files

arda-mac.zip 24 MB
68 days ago
arda-win.zip 234 MB
68 days ago

Get Shadows Over Arda

Leave a comment

Log in with itch.io to leave a comment.