Temple of The Roguelike Forums

Development => Programming => Topic started by: Endorya on July 10, 2013, 10:33:07 PM

Title: Number of turns per day.
Post by: Endorya on July 10, 2013, 10:33:07 PM
How many turns would a day have in a roguelike game? If your roguelike has a day / night cycle, how many turns does it take to endure through a full day?
Title: Re: Number of turns per day.
Post by: Vanguard on July 10, 2013, 10:53:42 PM
That depends on the game.  What happens in the space of one turn?  In most roguelikes, you can take a step or make a single attack, so a turn should probably take somewhere between one and five seconds.

That's assuming you're going for realism.  If day and night have an important effect on how your game is played, it might be worthwhile to make them more or less frequent than is realistic, depending on what you're going for.
Title: Re: Number of turns per day.
Post by: Endorya on July 10, 2013, 10:57:20 PM
What do you mean by more or less frequent?  :-\
Title: Re: Number of turns per day.
Post by: Eben on July 10, 2013, 11:03:07 PM
You may want to approach it from the idea of how often the player should see the cycle change.

If you want them to pass through a full day every hour of gameplay then estimate how many turns it takes the average player to play for an hour and then make time pass each turn accordingly.

If the day cycle isn't particularly important to the gameplay you could even just have it change based on real time rather than turns.
Title: Re: Number of turns per day.
Post by: Vanguard on July 10, 2013, 11:25:36 PM
What do you mean by more or less frequent?  :-\

I mean that if you want nights in the wilderness to be a dangerous trial the player has to endure, it might be worthwhile to make them longer than is realistic so the experience is that much more harrowing.

On the other hand, if the player needs to constantly wait for day or night to come (eg waiting for shops to open) then it may be worth making longer days or fast day/night cycles so the wait isn't too bad.

That sort of thing.
Title: Re: Number of turns per day.
Post by: Trystan on July 10, 2013, 11:40:01 PM
The 2011 7DRL Twelve Hours made each turn take one minute and the game ends after 720 turns. It usually took about 15 to 20 minutes to play.

I saw a post from a Dungeon Crawl Stone Soup tournament where someone won in only 18000 turns. At one minute a turn, that's a 300 hour - or 12.5 day - adventure.

Is your game a single night, a two week dungeon crawl, or longer?
Title: Re: Number of turns per day.
Post by: Eben on July 11, 2013, 02:59:14 AM
Also don't forget that season and latitude may make the days and nights of different lengths, in case you needed more complexity :)
Title: Re: Number of turns per day.
Post by: guest509 on July 11, 2013, 03:23:12 AM
This is one of the questions that hard to answer. You really just need to play test it.
Title: Re: Number of turns per day.
Post by: Endorya on July 11, 2013, 07:58:34 AM
Thank you very much! I think I know what to do now.
Title: Re: Number of turns per day.
Post by: Endorya on July 11, 2013, 08:24:34 AM
Also don't forget that season and latitude may make the days and nights of different lengths, in case you needed more complexity :)
I see what you mean. But my game will brew planets having 0 axial tilt and seasons will be simulated through an elliptical orbit, like the planet having an eccentricity of 0.10 or so, which means the temperature will increase and decrease globally. My only concern is indeed how to compute the number of turns per day as everything will require a certain number of turns to finish. These turns do need to control day and night cycles.

Night and day will have a severe impact on game play like having most people in cities sleeping at night, creatures that will appear only at a specific time of the day and also changing the visibility and traveling pace as day light diminishes.

So yes, I really need to try it out but I just wanted to a fair starting point, which thank to you guys I now have  :)
Title: Re: Number of turns per day.
Post by: Vanguard on July 11, 2013, 09:22:26 AM
Thank you very much! I think I know what to do now.

Man, do you ever have a positive attitude.  You're the anti-Krice.
Title: Re: Number of turns per day.
Post by: Endorya on July 11, 2013, 09:39:41 AM
Thank you very much! I think I know what to do now.

Man, do you ever have a positive attitude.  You're the anti-Krice.

What do you mean by that?  ???

[EDIT]
Ah! I think I know what you mean now. Krice is a user here at these forums right? I was just looking around at some of the threads when I noticed some some minor dispute with the two you. I do get slow sometimes, specially if the wind doesn't favor me.

I'm definitely not a positive-emanating-energy-type-person as I always focus on the bad side of pretty much everything (everyone around me complains about this). But I am patient guy and usually nice and yet very arrogant once provoked, depending of what is at stake.
Title: Re: Number of turns per day.
Post by: Z on July 11, 2013, 12:06:02 PM
In ADOM a turn is roughly half a minute.
Title: Re: Number of turns per day.
Post by: mrrstark on July 11, 2013, 01:48:58 PM
Also don't forget that season and latitude may make the days and nights of different lengths, in case you needed more complexity :)
I see what you mean. But my game will brew planets having 0 axial tilt and ...


lmfao
Title: Re: Number of turns per day.
Post by: Endorya on July 11, 2013, 01:54:39 PM
In ADOM a turn is roughly half a minute.

Its funny, I've played ADOM for a great deal of time but never actually noticed how long would a turn last. Thanks for sharing it.
Title: Re: Number of turns per day.
Post by: Anvilfolk on July 11, 2013, 02:07:10 PM
You can actually make 1s = 1turn or even 10 turns = 1s, and just have most actions take turns. That's definitely the way I'm going to organise my game.

For instance, walking across a square is 100 turns for the player. Perhaps a faster monster actually takes 90 turns. Perhaps walking across rough terrain has a multiplier or 1.25, which means the player takes 125 turns, and monsters take 113 (rounded up). Then you just need to have monsters "activate", move, and activate again after the amount of turns their action took are up. Probably using a priority queue of sorts.

It always seemed to me to be a fairly flexible system.
Title: Re: Number of turns per day.
Post by: Endorya on July 11, 2013, 02:52:55 PM
Hmmm.  Agreed, that system is quite flexible but also prone to complicate things up. Because every action will take many turns having a full day lasting 86400 turns for a 24 hours day of course.

Let's assume I order my party to build a shelter in the woods and that this requires finding a suitable spot, cutting trees down, creating timber and finally putting everything together, this could probably require a full day of work or lets say 53000 turns.

Now let's assume the player casts a spell having the following description: "Increases the party's critical chance during combat by 10%. Duration: 7200 turns  (2 hours) :o  Even small actions like eating an apple could take 300 turns which I think can be a bit overwhelming for the player to interpretate. I could always say 5 minutes but 5min doesn't tell  how many turns it is. Worst case scenario: 5min (300 turns).

Of course I'm injecting your system directly into my game's game play mechanics. It doesn't mean it won't function in yours. I think I will keep a full day to something like 1000-3000 turns. This will mean some actions happening in slow-motion but a better overall interpretation of time. At least this is what I think.
Title: Re: Number of turns per day.
Post by: Quendus on July 11, 2013, 03:05:49 PM
I think it's difficult to make sensible decisions about details like the number of turns in a day before you have some gameplay where it's relevant. Considerations about what situations the player will have wait for day/night (surviving night monsters, waiting for shops to open, waiting for vampires to come out, whatever) are a good starting point, but not enough to base the final decision on.
Title: Re: Number of turns per day.
Post by: Endorya on July 11, 2013, 03:27:43 PM
I think it's difficult to make sensible decisions about details like the number of turns in a day before you have some gameplay where it's relevant. Considerations about what situations the player will have wait for day/night (surviving night monsters, waiting for shops to open, waiting for vampires to come out, whatever) are a good starting point, but not enough to base the final decision on.
Agreed. I'm not seeking a sensible decision but a good starting point.
Title: Re: Number of turns per day.
Post by: Anvilfolk on July 11, 2013, 05:28:25 PM
It absolutely depends on the scale of what you're doing too. It seemed like you might be walking on a much more macro scale than most roguelikes, which means walking from one place to the other might be up to an hour. Most roguelikes on a more microscale would take maybe 10s to go from one tile to another.

Either way, get a decent turn/time ratio, and then you can convert from one to the other. You can simply update the time representation in hh:mm:ss whenever enough turns have passed to reach the next second :) And of course, you can make this as macro or micro as you want. Perhaps you'd only have "Hour hh of dd/mm/yyyy" :)

Of course, then it's important to have a system where you don't have to iterate turns one by one, but can simply skip to the next "activation" of any entity on the map.
Title: Re: Number of turns per day.
Post by: Vanguard on July 11, 2013, 06:57:08 PM
Ah! I think I know what you mean now. Krice is a user here at these forums right? I was just looking around at some of the threads when I noticed some some minor dispute with the two you.

Mostly I just wanted to make a dumb pun.
Title: Re: Number of turns per day.
Post by: Endorya on July 11, 2013, 07:01:07 PM
It absolutely depends on the scale of what you're doing too. It seemed like you might be walking on a much more macro scale than most roguelikes, which means walking from one place to the other might be up to an hour. Most roguelikes on a more microscale would take maybe 10s to go from one tile to another.

Either way, get a decent turn/time ratio, and then you can convert from one to the other. You can simply update the time representation in hh:mm:ss whenever enough turns have passed to reach the next second :) And of course, you can make this as macro or micro as you want. Perhaps you'd only have "Hour hh of dd/mm/yyyy" :)

Of course, then it's important to have a system where you don't have to iterate turns one by one, but can simply skip to the next "activation" of any entity on the map.

Yep, I guess that's pretty much it! Going from one space to another while in map view, which as you can predict it, will take long periods of time. The only place in which time will elapse in micro scale will be when exploring sites, like caves and dungeons.