Simulating time in text adventure
TBear
13 Jan 2015, 17:40For a game I am working on I am interested in simulating time passing, but I don't want to use timers if at all possible. I was thinking of doing it by having each command take a certain amount of time (Which may vary).
I need this mostly to progress parallel story lines the player may encounter in my world, and maybe change a few descriptions where it fits best.
So my question is this: What's the best way of doing this? Do I have to change each command to increase a variable or is there a way to process the input and depending on the type of command change the time variable in one place?
Thanks for your help.
I need this mostly to progress parallel story lines the player may encounter in my world, and maybe change a few descriptions where it fits best.
So my question is this: What's the best way of doing this? Do I have to change each command to increase a variable or is there a way to process the input and depending on the type of command change the time variable in one place?
Thanks for your help.
jdpjdpjdp
13 Jan 2015, 17:54I haven't used it myself, so I can't say how effective it is or if it will suit your needs, but there is a library for this:
http://docs.textadventures.co.uk/quest/libraries/clock_library.html
Link contains the documentation, plus a download link for the library. Hope it does what you want.
http://docs.textadventures.co.uk/quest/libraries/clock_library.html
Link contains the documentation, plus a download link for the library. Hope it does what you want.
HegemonKhan
14 Jan 2015, 06:44'time' is very advanced~complex code work, especially if you want to do the 'full system' (real world time and date: years, months, days, weeks, seasons, seconds, minutes, hours, civilian time vs miltary time, time of day: dawn morning noon afternoon dusk evening night, daytime vs night-time, and etc). Unless you're a good coder, I'd use Pixie's Clock Library.
there's also these links too (my feeble attempt at 'time' coding, lol):
viewtopic.php?f=18&t=4317
viewtopic.php?f=18&t=4162
ask if you got any questions or need any help.
there's also these links too (my feeble attempt at 'time' coding, lol):
viewtopic.php?f=18&t=4317
viewtopic.php?f=18&t=4162
ask if you got any questions or need any help.