Daily Challenge Mode


Although the central place for design discussion is ##crawl-dev on freenode, some may find it helpful to discuss requests and suggestions here first.

User avatar

Tomb Titivator

Posts: 907

Joined: Monday, 29th September 2014, 09:04

Post Sunday, 27th September 2015, 22:07

Daily Challenge Mode

Every game of crawl is unique... but what if it wasn't?

Spelunky has a daily challenge mode where everyone gets the same generated dungeon which changes daily. You get one shot at it.

It's essentially a fun, not too serious challenge mode. Would people here play it? What do you think?

For this message the author chequers has received thanks:
n1000

bel

Dis Charger

Posts: 2085

Joined: Tuesday, 3rd February 2015, 22:05

Post Sunday, 27th September 2015, 22:45

Re: Daily Challenge Mode

I am not sure what the daily challenge is, but it looks like it is same as game "seed" in Brogue. I recall some post in the past which said that Crawl also has this feature, but it's not used generally.
User avatar

Barkeep

Posts: 1785

Joined: Saturday, 29th June 2013, 16:52

Post Monday, 28th September 2015, 00:17

Re: Daily Challenge Mode

That's because even though Crawl has that feature, unless you play two games with the same seed exactly alike, they'll end up having different dungeons.

However, chequers has actually like, interacted with Crawl code, which is more than I can say.

Blades Runner

Posts: 546

Joined: Saturday, 7th May 2011, 02:43

Post Monday, 28th September 2015, 00:28

Re: Daily Challenge Mode

Game seed in crawl is not as reliable as Brogue etc.
In fact, if 30 people request the same -seed, and play it normally, the only thing those games will have in common is D1 and initial character traits. This is basically because the dungeon generation doesn't use a different RNG state from the one used to calculate events (eg. rolling for damage, random bat movement, etc), which means that playing differently results in subsequent levels being different. That's probably why -seed is currently an undocumented option used only for debugging.

There are a few ways that this could be addressed. The simplest is probably to pre-calculate and store seeds for the entire dungeon; the RNG state can be saved before generating a level, then replaced with the precalculated seed, and when generation is done, the state saved earlier can be loaded.
Generation of troves, baileys, etc would be based on taking the parent seed and cycling it N times (asking for some random numbers that you promptly discard), where N is a serial number (starting at 1) assigned to the trove/bailey at time of level generation.

This would work for everything except the Abyss, AFAICS. But IMO that would be an acceptable break, considering what the Abyss is.

Note that that doesn't guarantee that enemies generated after initial level generation would be the same; they probably wouldn't. It also wouldn't make any guarantees about ?acquirement outcomes (eg. two players reading ?acq on DL10 and asking for a wand would probably get different wands).
If you wanted to change that, you would probably have to make generation code run on an entire separate RNG state. Which is not prohibitive, and might well make the code a bit cleaner, but definitely more complicated to work out.

For this message the author savageorange has received thanks:
Arrhythmia
User avatar

Tomb Titivator

Posts: 907

Joined: Monday, 29th September 2014, 09:04

Post Monday, 28th September 2015, 00:56

Re: Daily Challenge Mode

Just as a sort of general disclaimer, even with a god of coding (I am not) DCSS is complex enough any "daily challenge" system will never be as clean/fair as Spelunky's. Spelunky has simple deterministic systems with a minimum of randomness. For instance damage is not randomised, there's no skill system and the AI is simple to predict.

For DCSS Daily Challenge, here's the basic list of what I propose be the same across players:

* Race / Role (eg today's combo is NaTm)
* Dungeon layout (eg today you get Swamp on L:5)
* Level layout (eg today's D:2 has a fixed layout and a sewer portal (also with a fixed layout))
* Initial (level-creation) monster spawns (eg D:2 has Sigmund, D:4 has three gnoll packs and an ogre with GSC)
* Item generation (eg ring of flight on D:2)

There might be some other low-hanging fruit to standardise, this is just a first draft.

For this message the author chequers has received thanks:
TeshiAlair

Blades Runner

Posts: 546

Joined: Saturday, 7th May 2011, 02:43

Post Monday, 28th September 2015, 01:12

Re: Daily Challenge Mode

Yeah, my proposed alteration would cover the last four points you listed; that was pretty much what I thought you were going for.
User avatar

Barkeep

Posts: 1785

Joined: Saturday, 29th June 2013, 16:52

Post Monday, 28th September 2015, 01:15

Re: Daily Challenge Mode

Since this is less about "game design" and more about challenges and whatnot, we're moving to the dart board.

e: chequers informed me that the intention here is to put together a new in-game mode like sprint, so back to GDD we go, I hope you enjoyed Mr. Xom's Wild Ride. I think this feature would be really cool; it's the one thing from brogue I really wish crawl had.

Zot Zealot

Posts: 946

Joined: Tuesday, 4th January 2011, 15:03

Post Monday, 28th September 2015, 04:57

Re: Daily Challenge Mode

There were a similar proposal before and I remember crate has an excellent answer, in which he mentioned that in crawl it is very, very good to know the level layout in advance, therefore would be very tempting to watch someone else play the daily challenge first. So it would not work very well as a competition. It would be much better to just fix the race/class combination, and leave everything else to the rng.

Also crawl is maybe too long for daily challenges, I would prefer weakly ones.

I would absolutely love if there were weakly "sudden death" challenges like the ones WalkerBoh made. I would love it even if there were no additional challenges, just a random generated combo each weak, and a list of high scores for the participants, to make it more automated.
User avatar

Tomb Titivator

Posts: 907

Joined: Monday, 29th September 2014, 09:04

Post Monday, 28th September 2015, 06:13

Re: Daily Challenge Mode

It's definitely not possible to stop people cheating with additional accounts / downloading the save to play offline, so I'm happy for the design to let people cheat if they want to.

Blades Runner

Posts: 546

Joined: Saturday, 7th May 2011, 02:43

Post Monday, 28th September 2015, 07:27

Re: Daily Challenge Mode

Incidentally, now that I'm aware we're talking about a separate mode.. I just realized that the approach I described could also be mixed : that is, you could preset the seed for some levels and leave others at a default value of 0; and then interpret 0 value as 'inherit global RNG state'. This could allow you to control the amount of fixedness, for example make d1-8 fixed, lair fixed, and everything else vary between games.

For this message the author savageorange has received thanks:
chequers

Mines Malingerer

Posts: 52

Joined: Wednesday, 29th July 2015, 17:02

Post Monday, 28th September 2015, 13:21

Re: Daily Challenge Mode

I misread the topic as "Dairy Challenge Mode" and it made me reminisce of my University days.

archaeo wrote:I hope you enjoyed Mr. Xom's Wild Ride.

Coincidentally, these both end the same way.
User avatar

Shoals Surfer

Posts: 318

Joined: Friday, 6th July 2012, 10:16

Post Tuesday, 29th September 2015, 18:55

Re: Daily Challenge Mode

Anyone that sets up a new crawl sudden death challenge would be my hero
"No one should have two lives / Now you know my middle names are wrong and right / But baby there's no guidance / When random rules"

bel

Dis Charger

Posts: 2085

Joined: Tuesday, 3rd February 2015, 22:05

Post Wednesday, 30th September 2015, 00:35

Re: Daily Challenge Mode

I play Brogue seeded contests sometimes, so I would love to have something like this as well.

Vestibule Violator

Posts: 1497

Joined: Monday, 21st November 2011, 07:40

Post Wednesday, 30th September 2015, 13:21

Re: Daily Challenge Mode

scorpionwarrior wrote:Anyone that sets up a new crawl sudden death challenge would be my hero

I looked into doing it, but I don't know how all the infrastructure crap worked. I can do a lo-tech one if you want, and just record results in the forum with a decent amount of trusting (with the option of any verification) involved. I'll start a dart board thread about it.
Usual account: pblur on kelbi

For this message the author byrel has received thanks:
scorpionwarrior
User avatar

Barkeep

Posts: 4425

Joined: Tuesday, 11th January 2011, 12:28

Post Wednesday, 30th September 2015, 15:01

Re: Daily Challenge Mode

Dharmy wrote:I misread the topic as "Dairy Challenge Mode" and it made me reminisce of my University days.

archaeo wrote:I hope you enjoyed Mr. Xom's Wild Ride.

Coincidentally, these both end the same way.

Lactose-intolerant?

Anyhow! I think the design answer to this would be to use more than PRNG -- some for dungeon generation (probably one per branch?) and one for tactical rolls. I don't know how difficult that would be for Crawl, but my guess from peeking at the code would be "extremely hard."

Another thing one could kind of maybe do would be to pre-run dungeon generation, except Pan and Abyss and zigs exist.
I am not a very good player. My mouth is a foul pit of LIES. KNOW THIS.

Dungeon Master

Posts: 1609

Joined: Thursday, 16th December 2010, 21:54

Post Wednesday, 30th September 2015, 16:35

Re: Daily Challenge Mode

njvack wrote:Anyhow! I think the design answer to this would be to use more than PRNG -- some for dungeon generation (probably one per branch?) and one for tactical rolls. I don't know how difficult that would be for Crawl, but my guess from peeking at the code would be "extremely hard."

Another thing one could kind of maybe do would be to pre-run dungeon generation, except Pan and Abyss and zigs exist.

There are already actually two RNGS - one for interface/visual-only stuff (like randomly coloured monsters/items/features, for example), and another one for everything else - that's not to say it would be easy to separate out dungeon generation on top of that and do everything else that would be necessary for this, of course.
User avatar

Barkeep

Posts: 4425

Joined: Tuesday, 11th January 2011, 12:28

Post Wednesday, 30th September 2015, 16:58

Re: Daily Challenge Mode

There are also some fairly reasonable questions over what should be deterministic -- for example, dungeon layout, sure. But what about god gifts and Ru sacrifices? Wrath? How would monster spawns work? (They can't use a per-branch PRNG or they'd make dungeon generation non-deterministic, but they should probably be fixed... maybe a monster-gen PRNG per-level?)
I am not a very good player. My mouth is a foul pit of LIES. KNOW THIS.

Mines Malingerer

Posts: 50

Joined: Thursday, 12th May 2011, 23:13

Post Wednesday, 30th September 2015, 20:40

Re: Daily Challenge Mode

I suggest merging this idea with the lair sprint idea below. Less randomness and more predictable levels. No abyss?

Blades Runner

Posts: 546

Joined: Saturday, 7th May 2011, 02:43

Post Thursday, 1st October 2015, 11:41

Re: Daily Challenge Mode

njvack wrote:
Dharmy wrote:I misread the topic as "Dairy Challenge Mode" and it made me reminisce of my University days.

archaeo wrote:I hope you enjoyed Mr. Xom's Wild Ride.

Coincidentally, these both end the same way.

Lactose-intolerant?

Anyhow! I think the design answer to this would be to use more than PRNG -- some for dungeon generation (probably one per branch?) and one for tactical rolls. I don't know how difficult that would be for Crawl, but my guess from peeking at the code would be "extremely hard."

Another thing one could kind of maybe do would be to pre-run dungeon generation, except Pan and Abyss and zigs exist.

As I pointed out in my post, the pregen strategy can work for Pan and zigs no worries; You store the initial seed, then when you get to the next level, you calculate the seed for that from the current seed value (reset the RNG state to initial seed, now get the next random number and use it as next seed).
This is kind of like the per-branch RNG state you can have when you don't have per-branch RNG state ;)

It's probably even generalizable to Abyss, but a) I don't know enough about the process of Abyss map generation to comment, and b) fixing Abyss content doesn't seem that important TBH.

Unless you mean actually generating the whole dungeon in complete detail right at the start. That seems like it would be slow, would it add anything?

Separating PRNG states would probably result in a more firmly fixed game than just pregenerating (for example, spawns occurring after the initial level generation).

Mines Malingerer

Posts: 53

Joined: Monday, 16th May 2011, 17:21

Post Thursday, 1st October 2015, 19:32

Re: Daily Challenge Mode

This question has popped up here a while ago and I popped it up again more recently.

Since nobody seemed to be interested in it, I decided it would be a nice project for me to code on my excessive spare time. But since I have a new job since this morning and I did not get past the initial theorycrafting, this might end up delayed by a few years so I would be glad if somebody more reliable than me addressed it.

Here are my thoughts on the project, very close to the ideas already mentioned in this thread but backed by looking at the current code and trying to minimize the changes to make.

- As MarvinPA mentioned, there are already two RNG states in the game, implemented in the 2-sized array asg_rng. The asg.cc source is quite daunting, and even more when you read the explanations. But it already does everything that is needed. In particular, the second RNG is seeded by the first one, and deciding which one to use when computing a random value is simply a matter of putting the correct number in the argument of _random2.

Generalizing this to any number of different RNG states is really just a matter of changing the size of the array of asg_rng on line 13 of asg.cc

One can slightly modify every function in random.cc to use an optional argument for the choice of rng. The actual coding is then to chase every random instance in the code and decide which RNG one should use to do it.

- In that regard, for dungeon layout, the simplest choice to me looks to be to use a different RNG state for every branch, so that entering swamp before pan does not mix things up. The infiniteness of Pan and Zigs are not an issue. Abyss seems to be much harder to tame though. I did not look at the code for two or more -level shafts, it might be necessary to edit it so that the intermediate levels get generated in the right order.

- Everything else you want to seed can be handled by adding yet another rng state (Ru's sacrifices, monster spawns, weapon branding).

- On the other hand, acquirements, gifts are ill-posed things to seed since they are modified by your current skills. Most things vary a lot with the way people play, so they are also unappropriate (Xom mood swings, miscasts, etc.)

TL;DR: This should be easy [edit:not too hard]. I will do it some day if nobody wants to.

For this message the author ventricule has received thanks:
archaeo

Spider Stomper

Posts: 220

Joined: Sunday, 26th July 2015, 15:38

Post Friday, 2nd October 2015, 03:37

Re: Daily Challenge Mode

I'd just take the shortcut and remove abyss. Would probably be an improvement.

For this message the author greedo has received thanks: 2
duvessa, tabstorm
User avatar

Tomb Titivator

Posts: 907

Joined: Monday, 29th September 2014, 09:04

Post Tuesday, 13th October 2015, 00:00

Re: Daily Challenge Mode

If anyone is interested, ventricule is in the process of implementing what he talked about above, you can follow along here:
https://github.com/ademesmay/crawl

From what I gather, you end up with the same levels going quite far down, but eventually things start falling apart.

Tomb Titivator

Posts: 853

Joined: Thursday, 29th August 2013, 18:39

Post Wednesday, 14th October 2015, 03:49

Re: Daily Challenge Mode

The forces of order that deployed the predefined rng seed cannot affect the chaotic stronghold that is the abyss.

Blades Runner

Posts: 546

Joined: Saturday, 7th May 2011, 02:43

Post Wednesday, 14th October 2015, 04:06

Re: Daily Challenge Mode

What precisely do you mean by that?

The current setup, as I understand it, should guarantee the initially generated Abyss content (eg. What is in your LOS first time you get banished) is the same. Content generated after that point cannot be guaranteed, as things other than the RNG get involved (mainly player movement)

Vestibule Violator

Posts: 1497

Joined: Monday, 21st November 2011, 07:40

Post Wednesday, 14th October 2015, 15:29

Re: Daily Challenge Mode

IT's a flavor justification for the abyss inevitably diverging over time
Usual account: pblur on kelbi

Lair Larrikin

Posts: 18

Joined: Tuesday, 25th September 2012, 00:52

Post Friday, 16th October 2015, 23:59

Re: Daily Challenge Mode

Are baileys and ice caverns and labyrinths each considered separate branches, or one combined "misc" branch?

What happens if I see an ice cave and a Bailey and a treasure trove on the same floor? Does the order that I enter them change their layout?

Is Gehenna a separate branch from the Vestibule?

When I get to my second zig, will its layout/items/monsters be influenced by how deep I went in the first one?

(These aren't super important issues; I'm just looking for exotic and weird edge cases. The proposal sounds good.)

Crypt Cleanser

Posts: 742

Joined: Friday, 6th January 2012, 12:30

Post Saturday, 17th October 2015, 00:21

Re: Daily Challenge Mode

^ Separate branches.
No
Yes
Don't know. Ideally not but I don't know how zigs are generated.

Mines Malingerer

Posts: 53

Joined: Monday, 16th May 2011, 17:21

Post Wednesday, 21st October 2015, 11:36

Re: Daily Challenge Mode

Quick update: I don't know when I will find more time to work on this but I believe that the version on my github is a decent start. Specify a seed by launching crawl with "crawl -seed somehexadecimalnumber". Everything should be seeded except for Abyss. This includes branches, timed portals (not depending on the order they are entered) and pan, as well as random character generation and wanderer specs. A few things are probably breaking the seeding but I haven't had time to test it:

- Gozag's call merchant: since it changes the future layout by design, it is hard to deal with. I plan on rewriting the code for call merchant when the game is seeded, so that i just puts an additional shop on top of the map generation.
- Uniques: Entering branches in different orders probably changes the uniques generated (since these depend on the ones that have been generated before). I haven't tested it thoroughly, maybe it only messes up the uniques, maybe it messes up everything.
- Unrands: Same as uniques.
- Vaults with acquirement loots: Didn't test if they just give different items or completely destroy the seeding.
- Zigs: if the first zig is left on different levels, future zigs will be different.
- Pan: there are probably issues with the demonic rune.

If people feel like playing a bit with wizmode, I would be happy if I had some tests regarding the issues above, or other issues (in particular, "I don't know why but the maps are different between these two seeded runs" is a very valid issue). Maybe I also missed some bad things that may happen: please tell me if you are aware of changes in the dungeon layout depending on things that happened before.

The issue with uniques is a major one. I may change the approach to generate all the levels before the start, which should fix it -- but this requires some tinkering with timed portals and I am a bit afraid of the lua interface for now.

For this message the author ventricule has received thanks: 2
bel, chequers

Dungeon Master

Posts: 634

Joined: Sunday, 22nd September 2013, 14:46

Post Wednesday, 21st October 2015, 15:11

Re: Daily Challenge Mode

I suspect that portal vaults may have issues in the same way as uniques do, since they also depend on whether one has been generated before.

For this message the author wheals has received thanks: 2
chequers, ventricule
User avatar

Tomb Titivator

Posts: 907

Joined: Monday, 29th September 2014, 09:04

Post Thursday, 22nd October 2015, 02:17

Re: Daily Challenge Mode

Does generating every level at game start significantly impact save size? There might be implications for server admins (although I doubt it, since there's a limit of one save per account).

Return to Game Design Discussion

Who is online

Users browsing this forum: Shtopit and 4 guests

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