Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

How would you implement flexible time?

$
0
0

@Answeroad wrote:

Hi, I am new here, just learning things about in monogame.
I struck upon a small problem, so I decided it was time I ask the gurus to see how other would handle this.
Thank you in advance, I hope I am not being inappropriate ;(


So, here's my problem. A lot of games have "flexible time".
By this, I mean gametime flowing x2, x3 times faster than it should...

Is your character sleeping? Does your wonder construction take a few real-time hours?
Press this button, and BAM! its done in a few moments! kind of thing.

Its nothing new or unique, so I assume everyone knows what I am on about :wink:

Here's my gut feeling of how I think I want to tackle this problem.

  1. I would like to set up a code so that it could adjust the amount of time added to GameTime,
    in effect just speeding things up single-handed-ly... Though I am afraid it is being way too inefficient.

  2. So maybe my best chances are to split up main gametime with another value, which is basically (gametime * float) or something similar, and make only the necessary things to speed up.

Problem is... I don't know how I can implement any of them. So I don't even know what's best for me :frowning:


I understand that this topic can be quite large and vague, so I am not asking for very specific replies.
Though I could really use some guidance over how I should tackle this problem...
A link to a tutorial, or an example project if there're any out there, would be very nice,
but I will be happy and welcoming anything at all.

TL;DR : title says it all. Though specific answer may be difficult, please help a poor soul asking for guidance..
edit : word & nuances

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles