Jump to content

  • Log In with Google      Sign In   
  • Create Account


Game based on real-world time


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Askr   Members   -  Reputation: 117

Like
0Likes
Like

Posted 14 September 2012 - 12:09 AM

Hej,

so I've been wondering how you do this properly:
I want to create a game very similar to the concept of a tamagotchi (I assume you're familiar with these creatures, if not scroll down for a breakdown*). This means you constantly have to track time and let your game character somehow react to it. While the game is running this seems to be no problem, but what happens if it's not?
My approach to this would be to simply note the current time when exiting and subtract it from the current time when starting again, then using this difference to re-simulate all the missed events.

As simple as this might sound I have some doubts about this being a professional (or at least practical) approach to this problem:

1) What happens if you don't start the game again for a really long time? Depending on the speed of the simulation and the machine it could result in a really long phase of re-simulating (is there a better word, btw?) and, in the worst case, appearing to be broken to the user.

2) The user could simply change the system time and provoke unwanted behaviour. How can you prevent this?

3) There would have to be a special method to re-simulate, since the usual simulation-method would play sounds and other events, that would be unwanted to be started multiple times when you race through the passed time. This could also result in other unwanted behaviour, or at least confusing the user.

What's your input on this matter? Is it the right approach? Is there another way? The requirements are as following:
- must not need internet access
- must be able to shut down completely

I'd be happy to read your thoughts and/or suggestions.

PS: Sorry for my first post being a question topic. ;)

* http://en.wikipedia....tchi#Life_Cycle

Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 6729

Like
1Likes
Like

Posted 14 September 2012 - 12:41 AM

Many of this real-time games are server based. That is you have a server running the simulation all the time while the user can interact over a (web-)client with your game.

The problem of simulating the gap, when starting a new game, can be solved by introducing several simulation layers. I.e when dealing with a village and the players did not play for a whole year, you don't need to simulate every single step of your peasants for one year. Start with a hi-level simulation (fred the peasant died this year, larry has been born recently) and go down once you reach the end, i.e. start a physics simulation of every npcs for the last several minutes.

2) The user could simply change the system time and provoke unwanted behaviour. How can you prevent this?

Just ignore it, if you have a single player environment. If someone want to cheat, let him cheat. In a multiplayer environment use a server solution (see above).

3) There would have to be a special method to re-simulate, since the usual simulation-method would play sounds and other events, that would be unwanted to be started multiple times when you race through the passed time. This could also result in other unwanted behaviour, or at least confusing the user.

You need to seperate the simulation from the presentation and need to turn off everything which is only there to communicate the current state of your world to the player (audio,visuals).

Edited by Ashaman73, 14 September 2012 - 12:41 AM.


#3 SuperVGA   Members   -  Reputation: 1118

Like
1Likes
Like

Posted 14 September 2012 - 12:56 AM

I agree with ashaman; you cannot prevent anyone from cheating in a single-player game. At "best", you can make it more difficult to cheat. - But is it really our business to decide who can cheat, anyways?

A system time based approach is sadly really easy to cheat without involving the internet.
You can let the application sample the environment as much as its allowed, though.

When I was a teenager, I got this babe-based tamagotchi game called Lula, i think.
I fired it up, tried every "feature" of the game, closed it, set the time approx a month ahead
(IIRC that was the goal of the game, time wise), fired it back up and won.

It was boring, but the only one I cheated was myself. :)

#4 Ashaman73   Crossbones+   -  Reputation: 6729

Like
2Likes
Like

Posted 14 September 2012 - 02:28 AM

I agree with ashaman; you cannot prevent anyone from cheating in a single-player game. At "best", you can make it more difficult to cheat. - But is it really our business to decide who can cheat, anyways?

Cheating in a single player game could be seen as modding, because the gamer modified his game experience to suit his expectation. Posted Image

#5 Eralp   Members   -  Reputation: 140

Like
0Likes
Like

Posted 14 September 2012 - 10:19 AM

I wouldn't think simulating something in-game will take so much time that the user thinks the game crashed. I am not talking about 3d graphics simulations etc, I am only talking about the decision AI for example in sims.

Your simulation method shouldn't play sounds or show any graphics. You need to seperate those things based on which type of simulation you are making. If you extract user interface like sounds and graphics from your simulation method, I doubt it will take any longer than an average load time to simulate years.

#6 Askr   Members   -  Reputation: 117

Like
0Likes
Like

Posted 14 September 2012 - 02:35 PM

Thanks everyone for their answers. :)

Many of this real-time games are server based. That is you have a server running the simulation all the time while the user can interact over a (web-)client with your game.

That's way out of scale regarding the simplicity of the game I want to create, though.

The problem of simulating the gap, when starting a new game, can be solved by introducing several simulation layers. I.e when dealing with a village and the players did not play for a whole year, you don't need to simulate every single step of your peasants for one year. Start with a hi-level simulation (fred the peasant died this year, larry has been born recently) and go down once you reach the end, i.e. start a physics simulation of every npcs for the last several minutes.

That's quite an interesting thought, although it also sounds like a lot of work, or at least planning. I'll definitely be looking into it, so thanks for that input.

Just ignore it, if you have a single player environment. If someone want to cheat, let him cheat.

Well, you're probably right about that. :D

You need to seperate the simulation from the presentation and need to turn off everything which is only there to communicate the current state of your world to the player (audio,visuals).

You're of course right here. I shouldn't have put "sound" in there though, but explained what I meant with "events". I was thinking about choices the player could make if he was actually available on day X of the simulation, that would affect the simulation after day X. I'd either have to let these events trigger only when the game is actually running, or let an AI/randomly choose something for the player, I guess.

#7 wodinoneeye   Members   -  Reputation: 666

Like
0Likes
Like

Posted 12 October 2012 - 09:14 PM

Even when the player stays in the game (for a large simulation game) there are problems of switching from an abstract mode (simpler to save processing) of behavior for NPCs running in a distant location in a huge world -- which then shifts to 'Real' mode (full detail) when the player gets close.

LOD - level of detail -- different modes of simulation based on proximity of the player from the involved objects

If its a highly detailed game you want all those NPCs to be in the middle of what they should be doing (which might be long complex sequences) and not simply resuming from where the froze in place when you last left them weeks ago "Re-simulating" (or maybe 'catching up' or 'pro-rating' activities has to be done to some extent to put the objects in the right state (and if its a community where the NPCs interact, then they all have to be adjusted together to be cohesive.

The abstract mode behavior has to generate be close enough .results so that if they are resumed (pro-rated to a real mode state) the game simulation is valid.

For a very detailed simulation with this LOD 'abstracting' mode (to save processing) a problem is if the 'community' of NPCs has complex interactions tehn a whoel related area has to be stepped up/activated at the same time -- the boudries of the areas activated like this can get complicated.

You can even have whole hierarchies (more than 2 levels) of simulation LOD detail level, with each one manipulating different levels of abstract/real details and areas of effect.


---

I had previously looked into systems like this when considering MMORPGs where the players have effects on the world and there would be abstract NPC factions that would shift and influence spawns and NPC reactions (at the local level) in different locations (And be more reactive to the players would requirethe Server to run more detailed simulations).

I can see why many games are completely devoid of anything like this.
--------------------------------------------Ratings are Opinion, not Fact




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS