Well, i'm totally out of the game development game, so I decided I would try and make something simple to ease myself back in. And what better first project than a simple roguelike? I've been working on it on odd weekends for a couple months now, so I think I should post some info about it. The tentative title is Dungeon Of the Goblin Emperor (lol).

I'm trying to make the game as simple as possible so I have a higher chance of completing it. Back in the day, I would usually get stuck at the game structure somewhere and give up... already i'm noticing that part of the code is spaghettifying! So hopefully I can learn something useful here.

I'll include some screenshots of my current progress. No tile art yet, but there are a few sprites going on, in beautiful 12x12 glory. They jog on the spot, dragon quest style :).

Thanks man :). No binaries to share atm, i'm hoping to get something out within a few weeks. I think it fails as a game just at the moment, because the dungeon levels don't generate different difficulties yet. Soon!

Also, I think I have to look up how mac shared libraries work again. Damn, distributing a C++ binary is almost as hard as writing the damn thing!_________________Avatar: Yu Suzuki (Virtual Fighter, Shenmue)

If you are using frameworks you can just put copies in the apps bundle if you set your build parameters to prefer that location first (over /Library and /System/Library). I forget the specific build argument/setting, but I can look it up later.

Like so: doge.app/Contents/Frameworks/all the frameworks here

For other libraries that can't be delivered this way I just static link 'em.

Then, everything is contained to your app bundle. Done!

Feel free to pick my brain on this subject. I've gone through this pain so many times. :]_________________loomsoft :]

Hey, thanks for the help! I've been compiling everything with clang on the command line, so i'm just using regular dylibs installed with homebrew. I think frameworks are just a functional replacement for normal dylibs right?

I will check it out when I get back to work (where my mac is), I think I was reading about some build commands that lets me specify a framework, instead of using pkg-config like I usually do. Let me investigate and I will post when I get stuck :)_________________Avatar: Yu Suzuki (Virtual Fighter, Shenmue)

Aha, I see. I actually use Xcode -- so I'm not sure how the project setting maps to doing stuff in Clang directly. In Xcode it's in the General tab under "Embedded binaries". This will copy frameworks to the correct place.

Looks like the command it runs by adding frameworks to be included results in something like this:

For non frameworks I think I did all sorts of magic to get rid of the dylibs and get the .a versions, which I can just statically link for maximum fun. At least, I had to do that for freetype and/or FTGL. I forget which needed it -- once I got it working I never looked back. :]_________________loomsoft :]

-FFrameworks - my framework compile search path
-rpath XXX - runtime search path. this is not set automatically for some reason, but you can specify multiple ones, so I also added ../Frameworks in preparation for making an app bundle.
-framework XXX - name of my frameworks (of course!)
-LFrameworks -ltinyxml - dynamically linking tinyxml, which does not seem to have a framework (or an .a file! thanks homebrew!)

To get tinyxml to link to the correct place, I had to make a change to the copy of the actual install library itself:

Code:

install_name_tool -id @rpath/libtinyxml.dylib libtinyxml.dylib

Apparently when you compile, this magic id string is then copied verbatim out of the dylib and jammed into my executable somehow, and this means my executable is linking in the correct place. I didn't totally understand this last step, it seems backwards, almost like the library has to know where a program is linking to it from? Strange.

Anyway, I ran otool on my binary file and got this:

Code:

dougmac:doge dinman$ otool -L main.out
main.out:
@rpath/SDL2.framework/Versions/A/SDL2 (compatibility version 1.0.0, current version 5.0.0)
@rpath/SDL2_image.framework/Versions/A/SDL2_image (compatibility version 1.0.0, current version 1.1.0)
@rpath/libtinyxml.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

Looks pretty good. I was wondering where my rpaths were, and after a bit of googling I found them by printing all the load commands that the executable does when it runs, and looking right at the end:

Extract it, cd into the directory and try ./main.out . There is still some issue with my rpaths apparently, so you can't just double click the thing. Will it work I wonder!_________________Avatar: Yu Suzuki (Virtual Fighter, Shenmue)

Edited by Ren on Thu Mar 17, 2016 7:53 am; edited 1 time

DiabloContributorJoined: 19 Nov 2015
Posts: 388
Location: :( :(

Posted: Thu Mar 17, 2016 6:59 am Post subject:

I wistfully remember the day I created the hell that you primitive mortals call dependency-based software distribution. It has brought me a great wealth of despaired souls, immense power. In due time, I will introduce an even greater evil upon your realm, perhaps multithreaded conditional statements. Yes.

I wistfully remember the day I created the hell that you primitive mortals call dependency-based software distribution. It has brought me a great wealth of despaired souls, immense power. In due time, I will introduce an even greater evil upon your realm, perhaps multithreaded conditional statements. Yes.

Worked just fine! Pretty cool. I like the concept of the brazier. Also love the ascii map printout in the console. Amazing.

For being able to double click and run, you probably want to turn this thing into a proper .app bundle. That requires having a PkgInfo and Info.plist file. Xcode usually handles this for me, so I don't know how to build these up manually.

In any case, it runs, which is great. Not sure if you are looking for feedback, but a few things I noticed:

1. Enemies won't follow me into a narrow corridor. Maybe intentional? Means I have to go out into the open to slay them, opening me up for attack from 3 sides.
2. Narrow corridors don't show wall tiles on either side of the character. Has to do with lighting model?

Wow thanks for the bug report! I think the map generation algorithm still has some holes in it - I will cheat my way through some levels and see if I can find which one was causing it. Right now everyone is using seed 6000, so shouldn't be too hard to find. I thought I had patched this one... lets see what we can find!

Right now there are no major safeguards that any seed will be completable... I might decide that this is a feature, lol.

As for the enemies, they are pretty dumb. In fact, the problem with them is that they can't navigate corners, so they get stuck! That one is on the backburner.

The last issue is the corridors. I implemented them the same way I saw them done in Rogue (the original) - just as single tiles you can walk over, which looked quite claustrophobic in ascii. However, I think you're right, it does look a bit weird. I'm going to think about this one, maybe I can solve it when I do some tile work.

Cheers!

EDIT: also the cards are spells. You can press S to access the spells menu. Z is accept, X cancel. They don't scale atm, but are useful for the first few levels. Probably need to put a help screen in somewhere._________________Avatar: Yu Suzuki (Virtual Fighter, Shenmue)

Ah nice! I spelunked around in the code a bit trying to figure them out. I will have to fiddle with the spells later! In my run through I just beefed myself up by using the brazier and grinding on level one to gain a few levels.

Not sure what your plans are for these long term--right now it's pretty easy to cheese your way through levels by using them to grind, since they heal you. :]_________________loomsoft :]

Played around a bit more -- to try the spells and see how far I could get.

I know this is very much still early work in progress, but I can't help dishing out some notes on my experience and offering up completely unsolicited suggestions:

- Spells are a neat touch. I would love to have some indicator for the fire spells where it's going to place the flames
- I got negative health from the heart spell! Sneaky! I love this.
- I'm not sure what causes additional spells to become available. It seems random, but maybe it's level related?
- For the action/history text-log, I'd love the ability to quickly know which things happened this turn. That is, stuff that happened last turn is rendered some other color (or opacity) maybe?
- I ran into a map where there were wall blocks floating around for no reason. I'm not sure if there was a room there -- but there definitely was not a hallway connecting to it. Screenshot below:
- I ventured far enough that I hit a map where I couldn't access the ladder. It looks like the rooms were generated just fine -- the hallway algorithm didn't seem to connect them, though?

Firstly, thanks a lot for the feedback, it's all appreciated! In no particular order:

- Definitely a lot of the issues are to do with the fact that this game is in a pre-alpha type state atm!
- I am not at all happy with the implementation of spells - I had a cool visual idea with cards and parchment UI, but when it came to implementation I just hacked something in for proof of concept. The whole idea of what kind of spell each card will cast is something I need to review, but I want to wait until the game has some sort of difficulty balance
- Related to the above, I want the user to know when they are getting a new card, and what cards are in the deck (it's just random now). Cards are gained when braziers are lit. I think this will work out better once the game world is more dangerous
- I have to disincentivise grinding somehow. Rogue did it with food making each turn more precious, but I didn't like that aspect of the game. I think I will prevent low-level mobs from giving xp, wow style
- The UI suggestions are definitely welcome, I like everything you've said
- Dungeon generation is naive to the max :) I want to do an update about it at a later date.

The hard part is going to be fixing these issues while trying to keep the game simple! I still need to add in some other mob types, other than scorpions and cheese cakes!_________________Avatar: Yu Suzuki (Virtual Fighter, Shenmue)

- I have to disincentivise grinding somehow. Rogue did it with food making each turn more precious, but I didn't like that aspect of the game. I think I will prevent low-level mobs from giving xp, wow style

Some other options:
- Lose health that is over maximum when lighting a brazier
- Lighting a brazier has a chance for a negative effect, which increases with each subsequent lighting?
- Durability to weapons and armor? This would create a push to hit the next level to re-equip since chests don't respawn

Are you going to add in ranged combat for mobs?_________________loomsoft :]

Updates:
- cleaned up some code spaghetti. Ended up with multiple main loops etc, which were removed and replaced with something more sensible
- doing something with spells, still a work in progress
- made the game a bit tougher to play in various ways. added a couple of new enemies that show up on level 3
- alternating combat log colors
- much bug fixing
- made a clickable mac app! had to have many fights with internet documentation here.

Todo:
- more enemies and enemy types
- a final level with a boss battle
- draw a tileset (lol)
- difficulty balancing

Fun times. I would also like to build a windows binary at some point, but I am not looking forward to it I must say. I tried to build my app using cygwin, but something went wrong working with SDL and the app wouldn't run. This means I have to do things like learn the windows shell and make system. So there is a lot to learn before I can make a binary of any sort. If anyone knows any good tutorials around this area I would be much obliged :)_________________Avatar: Yu Suzuki (Virtual Fighter, Shenmue)

Notes:
- Alternating text colors break when restarting after dying :[
- Dying on the same turn as trying to touch a brazier (first time, spell selection) left the selection UI up for subsequent play through

- After playing, quitting, and trying again, the bundle became “damaged”, wouldn’t open any more. That is, OSX’s security thing was complaining:

Something to do with code signing, seems like. I had to tell gatekeeper to allow me to open the bundle, naturally, since it’s not signed by Apple.

I worked around this by navigating to the executable in terminal and just running it directly from there (which worked).

- Grinding with braziers shows exp gain as +3, but I get nothing when I look at the tally on the top right. The nerfed exp should probably show in the combat log? Something like +3 exp (-3 for foo bar baz)

- Wow this is way harder! Good, but I can't get past floor 2 now - even grinding. Sometimes I can get further (like past the first scorpion) if I get lucky loot in the beginning chests. Usually, though, the second scorpie kills me._________________loomsoft :]

Alright, made it to the end (map didn't connect to ladder) once again! Brain dump incoming. :]

- I love the spell stack. Really cool. didn't expect to be able to keep on building it up. Graphical glitch when you hit 10+ though:

- Where does the exp cap hit? I was level 4 throughout and mobs, even in higher levels, while granting XP, didn't increase my count. Part of the balancing work that needs to be done?
- I found it very hard to get past level 2 successfully -- really required some thought and coordination. For the next few levels I did have to be careful, but eventually the danger waned as I had a big backup stack of heart spells. I felt like I was relieved when I bumped into brazier and had a chance to heal up. Great feeling. With more balance I think that can continue mostly throughout the entire dungeon.
- I'm not sure if the spell stack should go unlimited? This may or may not be the case once things get more balanced and use of skills is mandatory throughout the dungeon?
- If even after balancing the stack can still get pretty big, maybe some way to combine up the stack to do some kind of more-powerful spell? Maybe it uses up just the visible portion of the stack? Just brain dumping on this one. Not sure if it would be a particularly useful or interesting mechanic. While getting deeper I was just thinking "I have a ton of spells now. Would be cool if I could do something awesome with 'em"
- The more aggressive monsters are great. Now that they can follow you around corners the sense of danger is much stronger
- I like the new enemies. The distribution led heavily to cakes and fireballs the deeper I went. Not sure how the distribution is supposed to be, but that's just what I noticed

Just want to say again, thanks a lot for testing my game, very cool of you to do so :)

- bug reports are duly noted, thanks!
- that mac bundle issue I can't explain... i'm just going to tactfully ignore it for now. Would you mind re-downloading the app and running it a few times, see if it really did become corrupted?
- I think scorpions are too tough for level 2, i'm going to nerf them a bit. that should smooth the early difficulty level
- There seems to be some mob spawning issue in the deeper depths - thats why mobs have ??? names. you actually went deeper than I did!
- I don't think XP is being awarded properly for some mobs, which would explain some of that behaviour. to the debugger!
- I think I am going to limit your max cards as you suggest. probably 9 or 12 max

Regarding the bundle issue: indeed. I have no idea. I did redownload the dmg and try again fresh--same problem. Seems like gatekeeper probably wrote some bit somewhere or something? I don't know. I expect when you build it again and the app signature changes it should run fine for me. I'll see if it gets into a broken state again under the next build.

Curious though, is the game writing anything to inside its own bundle when it is run? :]_________________loomsoft :]

Honestly, I have no clue. :/ It can't be a size thing, since now it fails immediately for me even when it's a fresh download. I'm pretty sure the error thinks that the signature doesn't match the actual contents of the bundle. I think if you just rebuilt it, it would probably work. Maybe something got touched while you were building the dmg or something.

Also -- you asked a question about building on Windows. For Neverfall, I used cygwin. There's no way I could have done it without useful command line tools. It was a huge hassle. Haven't done it for any recent projects I've been working on, so I can't offer any good advice on how to get it up and running with recent versions of SDL. Sorry. If I start tinkering with that again though, I'll try to keep notes. :]_________________loomsoft :]

It was fun to do a small project again and get back into developing games. It took much longer to do everything than I thought, I will have to get better at managing that. Got a couple other practice projects in the back of my mind, we shall see :)_________________Avatar: Yu Suzuki (Virtual Fighter, Shenmue)