Author Topic: Imbroglio (Dungeon Generation)  (Read 35182 times)

The Great Hippo

  • Newcomer
  • Posts: 19
  • Karma: +0/-0
  • ain't no one
    • View Profile
    • Email
Re: Imbroglio (Dungeon Generation)
« Reply #15 on: January 09, 2013, 05:27:11 PM »
For now, I'm sticking with Python, I think! That being said, I'm going to use this thread as a place to post some of the stuff I'm working on, organize my thoughts, and possibly (hopefully!) receive advice from those with more experience--I hope that's alright!

Right now, I'm working on rebuilding my GUI interface from the ground up. Previously, I mentioned the GUI was deeply entangled with 'game events', and I wanted to disentangle them--I also wanted to institute a GUI Stack, where each window is its own 'stack' (with the 'game window'--the map that represents the actual game--being at the bottom of the stack). This would be so I could interrupt the user's gameplay to present them with 'inescapable' choices--things they have to click to proceed--but also so I could do things like allow the user to click an item in their inventory, bring it to the main map, and drop it on a tile--causing the user to 'throw' that item toward an enemy/tile/wall.

Here's how it looks so far:

These are all instances of the 'GraphWindow' object; it's a type of window that relies on a particular type of graph (the RectGraph--essentially, it's just a dictionary with a preset number of key: value pairs--you cannot add any new keys to this dictionary--you can only change the values the keys are associated with).

Right now, the interface allows you to 'click' on a potion, thereby creating a new GUI state (the 'ItemState')--your cursor 'becomes' the potion, which you can then move to an empty slot, clicking and dropping it into that slot (at which point the ItemState ends!). So it's possible to rearrange your inventory.

I've got 'Inventory', and I've got 'Status' and 'View'--that's because rather than having a traditional status bar (with hitpoints, status effects, etc), I want to reduce the majority of stats to non-integer-based 'states', or icons. If you're injured, you'll have an 'Injured' icon; if you're seriously injured, you'll have a 'Seriously Injured' icon. Similarly, View is just all the icons of the creatures/items of interest in your current view (since items can be stacked on top of one another in a square, this makes quickly determining the presence of 'valuable' or 'interesting' items easier--you don't have to flip through the stack).

There's a bunch of other stuff I'm glossing over here--but once I clean this up a bit, the next step will be to bring back the 'main map', I think.
Quote from: Stephen Crane
...For truth was to me
A breath, a wind,
A shadow, a phantom,
And never had I touched
The hem of its garment.

Quendus

  • Rogueliker
  • ***
  • Posts: 447
  • Karma: +0/-0
  • $@ \in \{1,W\} \times \{1,H\}$
    • View Profile
    • Klein Roguelikes
Re: Imbroglio (Dungeon Generation)
« Reply #16 on: January 09, 2013, 09:15:43 PM »
I've got 'Inventory', and I've got 'Status' and 'View'--that's because rather than having a traditional status bar (with hitpoints, status effects, etc), I want to reduce the majority of stats to non-integer-based 'states', or icons. If you're injured, you'll have an 'Injured' icon; if you're seriously injured, you'll have a 'Seriously Injured' icon.
There was a brief discussion of the pros and cons of hiding numbers from the player at http://roguetemple.com/forums/index.php?topic=2786.0 .

The Great Hippo

  • Newcomer
  • Posts: 19
  • Karma: +0/-0
  • ain't no one
    • View Profile
    • Email
Re: Imbroglio (Dungeon Generation)
« Reply #17 on: January 09, 2013, 09:25:52 PM »
There was a brief discussion of the pros and cons of hiding numbers from the player at http://roguetemple.com/forums/index.php?topic=2786.0 .
Thank you for the link! I'm reading through it now.

I should clarify, though--my idea is less 'hide the numbers from the player' and more 'do not use numbers at all'. One of my deeper loves in games is when I am confronted with choices that do not involve simple linear calculations--'What does the most damage? The axe or the sword?'. As an example, in Brogue, axes allow you to hit all enemies around you, while a rapier allows you to attack twice in the same amount of time--and a pike allows you to attack the target and another target behind them!

My idea, then, is to find as many places to make numbers meaningless as I can--to make the majority of decisions a player is confronted with become choices between 'apples' and 'oranges'. I'm not talking about replacing a 30/50 HP bar with an 'Injured' icon; I'm talking about doing away with the 30/50 HP bar entirely--you don't die when you run out of hitpoints; you die when you possess a certain status effect that unless corrected leads to death!

Toward that end, I'm trying to eschew the use of numbers in my thinking entirely. It might turn out to be a silly approach, though--if so, I'm planning on creating space in the code to allow me to return to a more balanced approach between 'numbers' and 'status effects'.
Quote from: Stephen Crane
...For truth was to me
A breath, a wind,
A shadow, a phantom,
And never had I touched
The hem of its garment.

The Great Hippo

  • Newcomer
  • Posts: 19
  • Karma: +0/-0
  • ain't no one
    • View Profile
    • Email
Re: Imbroglio (Dungeon Generation)
« Reply #18 on: January 09, 2013, 09:28:49 PM »
To clarify more deeply, a sword wouldn't have a damage rating--it would instead cause certain status effects (bleeding!) or have certain 'damage types' (cutting!) which would be applied to creatures you successfully hit with it. And depending on the status effects the creature currently has, these status effects would 'interact' to produce various results.

That's just a rough example, though. The point is, I'm trying to avoid number comparisons and reduce things to 'states' that have a variety of interactions with one another.
Quote from: Stephen Crane
...For truth was to me
A breath, a wind,
A shadow, a phantom,
And never had I touched
The hem of its garment.

tuturto

  • Rogueliker
  • ***
  • Posts: 259
  • Karma: +0/-0
    • View Profile
    • pyherc
Re: Imbroglio (Dungeon Generation)
« Reply #19 on: January 10, 2013, 12:49:35 PM »
That is an interesting idea and remind me of some table top strategy games that model ancient warfare. I look forward seeing some more info and results.
Everyone you will ever meet knows something you don't.
 - Bill Nye

The Great Hippo

  • Newcomer
  • Posts: 19
  • Karma: +0/-0
  • ain't no one
    • View Profile
    • Email
Re: Imbroglio (Dungeon Generation)
« Reply #20 on: February 02, 2013, 05:21:27 PM »
I've been working on the GUI and revamping it heavily; I also got a bunch of other stuff done. The game isn't even close to a 'finished' state, yet--but it runs, you can move around, the GUI stack behaves responsibly (you can create menus with options, mouse clicking works, etc).

I've created a github account that I'm updating as I work; you can see the relevant code here. Any advice/criticism/help is greatly appreciated!

Quote from: Stephen Crane
...For truth was to me
A breath, a wind,
A shadow, a phantom,
And never had I touched
The hem of its garment.

Nymphaea

  • Rogueliker
  • ***
  • Posts: 74
  • Karma: +0/-0
  • Maria Fox
    • View Profile
    • Nymphaea.ca
Re: Imbroglio (Dungeon Generation)
« Reply #21 on: February 05, 2013, 04:30:00 PM »
I'm not much for python, so I can't help with the code, but as for the generator...

I love the look of it so far, in my opinion though you should vary it based on depth. The first floor would be 100% caverns, with tunnels leading downward. Occasionally you would find a chasm. As you go down, more and larger chasms. Then you start seeing small dungeon areas with tougher enemies and more loot. Then eventually you will find stairs in a small dungeon, instead of a tunnel in the caves, which takes you to the big complex dungeons.

It would add a nice progression, and depending how you make the game, allows for easy difficulty ramping(dungeons could have locked doors that require the finding of keys, and secret doors, which would be very rare in a cave or chasm)

For the chasms, maybe add platforms at some intersections, or zelda-like invisible walkways that need to be searched for.

The Great Hippo

  • Newcomer
  • Posts: 19
  • Karma: +0/-0
  • ain't no one
    • View Profile
    • Email
Re: Imbroglio (Dungeon Generation)
« Reply #22 on: February 05, 2013, 11:05:13 PM »
Thanks both for the compliments and the suggestions! Changing the dungeon in response to depth is *definitely* something I want to do--I was actually planning on doing the opposite of what you suggested (dungeons first, then you get deeper--caverns become more common, then chasms...)--I hadn't considered going in the direction you're suggesting. I might end up doing that, depending on how the story hashes out!

Also, I like the platforms/invisible walkways bit--adding more interesting attributes to chasms is something I'm definitely going to do when I return to dungeon generation again.

As an aside (and because I like updating this thread), my thrust has changed slightly--I realized that I'm probably reaching far too high with the whole 'no numbers' system, so I'm going to aim for emulating a very simplified d20 system, with a few distinct (but relatively minor) changes.
Quote from: Stephen Crane
...For truth was to me
A breath, a wind,
A shadow, a phantom,
And never had I touched
The hem of its garment.

The Great Hippo

  • Newcomer
  • Posts: 19
  • Karma: +0/-0
  • ain't no one
    • View Profile
    • Email
Re: Imbroglio (Dungeon Generation)
« Reply #23 on: February 06, 2013, 04:27:06 PM »
I've got floating text (to show when you hit/miss an enemy) working, along with chasms, etc. Everything uses a system inspired by the d20 system--six ability scores, three defense scores (reflex, fortitude, will), with your 'AC' score being a product of fortitude plus whatever armor you're wearing (when you hit an enemy, you roll a d20 against this--if you fail to beat it, you make contact but do no damage; if you beat it, you do as much damage as you beat it by).



In designing this, I've been thinking about the direction I want to go with it a lot, and one of the things I keep coming back to is a really silly, and risky (because it's probably hard to hammer into the roguelike structure) idea: Superheroes. Specifically, a 1930s pulp hero story.

I suppose I should start with something easier for my first foray into this, but I *love* weird stories like that, and I can already think of a few ways to make it work...
Quote from: Stephen Crane
...For truth was to me
A breath, a wind,
A shadow, a phantom,
And never had I touched
The hem of its garment.

The Great Hippo

  • Newcomer
  • Posts: 19
  • Karma: +0/-0
  • ain't no one
    • View Profile
    • Email
Re: Imbroglio (Dungeon Generation)
« Reply #24 on: February 07, 2013, 02:11:33 AM »
Also, (re-)instituted automapping underneath the 'Brain' function (entities--IE, creatures that move/do stuff--store walkable/unwalkable terrain in a mask, which in the player's case, I can project as a memory of what they've previously seen)
Quote from: Stephen Crane
...For truth was to me
A breath, a wind,
A shadow, a phantom,
And never had I touched
The hem of its garment.

The Great Hippo

  • Newcomer
  • Posts: 19
  • Karma: +0/-0
  • ain't no one
    • View Profile
    • Email
Re: Imbroglio (Dungeon Generation)
« Reply #25 on: February 08, 2013, 01:13:18 AM »
Enemy pathing now works!
It's occasionally glitched (on some semi-rare occasions, enemies will accidentally hit each other on the way to you--I'm not precisely sure why this is happening! But I'm sure I'll figure it out soon), but otherwise works pretty well--enemies see you, move toward you, and proceed to surround you (moving around each other on the way!).
Quote from: Stephen Crane
...For truth was to me
A breath, a wind,
A shadow, a phantom,
And never had I touched
The hem of its garment.

The Great Hippo

  • Newcomer
  • Posts: 19
  • Karma: +0/-0
  • ain't no one
    • View Profile
    • Email
Re: Imbroglio (Dungeon Generation)
« Reply #26 on: February 08, 2013, 06:21:44 PM »
Fixed all the (known) glitches with enemy pathing. They never attack each other now; they also never move unless they see you (or saw you, and are still moving to the last known position they saw you at).

You can hit '5' to wait a turn instead of taking a turn.

I think next I'll do a revamp on the statistics system, then bring back the inventory system and add the ability to equip things.
Quote from: Stephen Crane
...For truth was to me
A breath, a wind,
A shadow, a phantom,
And never had I touched
The hem of its garment.