Passage of time

Started by Matagot, Fri 15/11/2013 10:03:10

Previous topic - Next topic

Matagot

Hey there! :-D

I'm in the middle of planning a murder mystery game in the style of Cruise for a Corpse and Laura Bow: the Colonel's Bequest and one significant feature in those games is the use of a clock to mark the passage of time whenever a clue or event is encountered.

I have already searched the forums with as much keywords as I could gather in the hope of finding the way to do this, but although there are some useful ideas, my intention is not to use REAL time, but to have a kind of trigger that creates the illusion that time has passed every ten minutes whenever an event is caused (if I had missed a relevant topic, please let me know:)). Also, to make sure that the game is not too linear with the usage of this time system and would allow the 'detective' to uncover the clues in whatever order the player chooses with each time the game is played.

To summerize, the game begins at 8.00pm and whenever a clue is found (in whatever order) the game quickly jumps to an animation of a clock forwarding ten minutes. This would also bring other problems I need to consider because obviously as time passes the NPCs would end up moving about in different locations (not literally moving, but disappear in one location and are found to be somewhere else) and that various locations may be locked in some times and open in others.

What advice could you give me to achieve this?

Khris

Start with a global int for the amount of tens of minutes that have passed.
0 -> 8.00 PM
1 -> 8.10 PM
6 -> 9.00 PM
etc.

That should be it, for starters.

festilligambe

Yeah I was going to say the same thing, it would be fairly straight forwards.  Decide how many time frames you need, say for instance there are 4. and set a global variable (for instance if it was called gametime then it starts at 1 for the game start.  When time changes you run the animation of the clock and set the time to a new number like
gametime = 2;
to go from one to two,, also you can add + one each time but if you are scripting specific events at certain times you can just enter the new value.

then in each room where people are at different areas you just enter a script before the room loads checking the current time and placing or removing characters from the room.
New to programing, old school to adventure games

Matagot

Thanks guys :-D

I'll give it a whirl.

SMF spam blocked by CleanTalk