Dungeon Run


Questions, Explanations, Howtos

Temple Termagant

Posts: 13

Joined: Wednesday, 19th October 2011, 09:53

Post Friday, 9th March 2012, 11:05

Dungeon Run

I'm not an official dev and the following is just a personal experiment.

I've recently started trying to add a new game type called Dungeon Run.
The idea is roughly halve the number of levels but unlike Dungeon Sprint keep the game
otherwise intact, so the branches and runes are still there and so on.

As you can imagine there's loads of issues this creates:
  • The change to the branch depths depending on game type was relatively easy to implement.
  • XP needs to be roughly doubled to compensate for the decrease in levels. This seems to be quite easy to implement.
  • I don't want to have to duplicate all the des files just to change the DEPTH declarations. So I've got a nasty seeming hack in level_range::match() that interpolates the levels if in GAME_TYPE_RUN.
  • The monsters are definitely not scaling properly, I think I need to modify the mons_x_rare() and mons_x_level() functions in mon-pick.cc.
  • Piety will need to be adjusted to balance for the shorter game. I've tried to find the smallest point of code to change but I'm finding it diffcult to find my way through the god code.
  • I haven't researched it yet but there will probably be issues with the ghosts.
  • Not sure about loot drops, would a shorter game need many changes? The food should be ok, but for other items like artefacts I not sure.

I apologise for the overly broad post but if anyone has any advice it would be welcome.

For this message the author naughty has received thanks:
nooodl
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Friday, 9th March 2012, 14:06

Re: Dungeon Run

This is an interesting idea, and you seem to approach it the right way. Here are my comments:

- Don't hardcode the divider. If we can divide the game length by 2, why not 3 or 4? Why might not enable the user to input an arbitrary divider, but a selection of a few ones could work.
- And why not 1.7 or 2.5? Set the base speed to 10 for added flexibility. One could even set the speed to 5 for a double length game (I know, it's crazy).
- When dividing numbers, don't forget to use div_rand_round.
- Don't count branch end when calculating branch length. Swamp should be 3 levels in a double speed game ((5-1)/2+1). Not 2 and not 2 or 3.
- For XP and piety, just copy what sprint does (sprint_modify_exp and sprint_modify_piety). Then change the sprint functions so they call your own with a speed of 90, to avoid code duplication.
- Nasty hacks are better than duplicating des files, which would be unmaintainable.
- For monsters, I think you need to use scaling in mons_x_level(), but not in mons_x_rare(). The latter is used for monster's frequency. The OOD functions might need adjustment too. Good luck with that, they are not very readable.
- Regarding loot, my guess is that a shorter game will end up with a bit more loot (proportionally), because you aren't scaling the loot of Elf, Crypt, Slime, Vaults and Tomb ends. Same for XP btw. Anyway, it's too soon to bother with that.
- For ghosts, it would probably be better to not share ghosts of games of different speed. Unless we manage to keep the balance the same, by I doubt it's possible.

Thanks again, this is a very interesting contribution.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

For this message the author galehar has received thanks:
naughty

Temple Termagant

Posts: 13

Joined: Wednesday, 19th October 2011, 09:53

Post Friday, 9th March 2012, 15:23

Re: Dungeon Run

Thanks for the reply.

- While I've currently hardcoded the divider it's all hidden behind a branch_depth_data_by_gametype(game_type, branch_type) function I've put in branch.(h|cc). I was going to go with 'floating point divide by 2 and round up' but that meant that Orc was 2 levels which seemed too shallow. Also any branches 3 levels or less deep I haven't touched. Here's the changes I've made if it's of interest:
  Code:
    - Dungeon 27 -> 14
    - Lair, Vaults 8 -> 4
    - Orc 4 -> 3
    - Slime 6 -> 3
    - Shoals, Snake, Swamp, Elf, Crypt, Zot 5 -> 3
    - Hells 7 -> 4   (not sure this is a good idea, unless I also increased the Hell effects potency)
    - Vestibule 1 -> 1
    - Tomb 3 -> 3
    - Abyss and Pan are NaNs
    - There a few others as well but they're not in the game but I still have to cover them.
    - Total 110 -> 63 (or ~57%)

- With the comments about speed, I wasn't thinking of changing any internal tick rates like movement speeds or anything. Am I missing something?
- Thanks the heads up on the sprint XP calls, I'll keep to whatever API they've established.
- You're right about the mon_x_rare() functions, I thought I saw absdungeon_depth() being called in one of them but it's just the mon_x_level(), thanks for the heads up!
- I check on the OOD functions.
- I'll leave the loot for now then and see if I can disable ghosts.

Thanks again for your help.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Friday, 9th March 2012, 15:50

Re: Dungeon Run

naughty wrote:- With the comments about speed, I wasn't thinking of changing any internal tick rates like movement speeds or anything. Am I missing something?

No, I'm talking about the same thing. If you divide the length by 2, then you increase the XP and piety gain speed by 2. So you either say that you reduce the length or that you increase the speed. It's called dungeon run, right? :)
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

For this message the author galehar has received thanks:
naughty

Dungeon Master

Posts: 553

Joined: Wednesday, 22nd December 2010, 10:12

Post Friday, 9th March 2012, 18:02

Re: Dungeon Run

naughty wrote:
  Code:
    - Dungeon 27 -> 14
    - Lair, Vaults 8 -> 4
    - Orc 4 -> 3
    - Slime 6 -> 3
    - Shoals, Snake, Swamp, Elf, Crypt, Zot 5 -> 3
    - Hells 7 -> 4   (not sure this is a good idea, unless I also increased the Hell effects potency)
    - Vestibule 1 -> 1
    - Tomb 3 -> 3
    - Abyss and Pan are NaNs
    - There a few others as well but they're not in the game but I still have to cover them.
    - Total 110 -> 63 (or ~57%)

For pan and abyss, you could decrease the time it takes for runes to show up. For pan there are 5 runes, so you'd want to make demonic runes more common and also make unique levels have a higher chance of appearing. Increasing the chance of exits in pan would also make the branch shorter. Note that some of the demonic rune and pan exit stuff is handled in pan.des.

Temple Termagant

Posts: 13

Joined: Wednesday, 19th October 2011, 09:53

Post Tuesday, 13th March 2012, 09:37

Re: Dungeon Run

Well I think I've got all the map, branch and XP stuff sorted, the runes appear where they should and so on. It's now technically winnable.

However I can't get off the first floor due to orcs :^)

You were right about the OOD code, I'm finding it difficult to understand some of the logic in there. The fuzzing part is easy but then it forces lev_mons to be at least 30, why? (Ignore the previous I'm an idiot, it clamps it to less than 30)

Not started on the piety yet.

Temple Termagant

Posts: 13

Joined: Wednesday, 19th October 2011, 09:53

Post Thursday, 22nd March 2012, 09:30

Re: Dungeon Run

I think I've got this to a state where it's worth other people playing it now. Where do I go from here?

The changes are:
- New game type, Dungeon Run, haven't done an icon for the main menu in tiles mode yet though.
- The idea is to make the game shorter but to otherwise keep it as challenging.
- Roughly halves the number of dungeon levels in the game. I didn't end up changing the Hells, Abyss or Pan though because maintaining their difficulty while being shorter seems non-trivial.
- To balance the shorter game XP and Piety gain/loss are doubled, it seems either ok or slightly too high to me but I'm not a good enough player to judge.
- I haven't changed any items drops so you do feel under equipped at equivalent depths to the normal game.
- I've disabled ghosts until I've had enough time to check they'll not interfere with the normal game.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Thursday, 22nd March 2012, 12:33

Re: Dungeon Run

Make a patch and post it on Mantis. Or post the url of your gitorious clone if you've made one.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

For this message the author galehar has received thanks:
naughty

Lair Larrikin

Posts: 15

Joined: Friday, 13th April 2012, 13:20

Location: Belgium

Post Friday, 13th April 2012, 13:23

Re: Dungeon Run

Whoa, I had the same game mode idea a few months ago, but didn't really do much with it. Glad to see someone else gave it a try. Did you end up hardcoding the 2.0x game speed now, or are there multiple options? (Could you release the Windows binaries somewhere, too? I want to give it a try.)

Return to Coding

Who is online

Users browsing this forum: No registered users and 13 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.