Coder Social home page Coder Social logo

Comments (16)

Clauvin avatar Clauvin commented on July 18, 2024

It happens because of the delay in loading everything to the game. If I can lock down the timer... or speed up the loading...

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

Tomorrow.

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

Ok, better thing to do is to lock the timer until everything is set.

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

Easiest way to do it is to just trigger a pause as the game begins, so the timer stays frozen until the player effectively starts playing.

But that means he has a chance of not knowing how to unpause, so the Pause Button needs an extra button.

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

Done, now only need to test it.

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

...didn't work. When the game is unpaused, the timer goes straight to week 2.

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

Ok, plan B: the specific McGyverism which I created now also must change the game time to 0. That should solve the problem... i guess?

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

No. It will be an extra McGuyvering which makes a confusion of the save/load system as well. Urgh... there's only one easy way to solve this.

The first week must start before zero.

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

This will have to be properly solved in Alpha 1... specifically, to undo my McGuyverism and guarantee that, until everything in the game is properly loaded, the game does not start counting time.

Writing this now, the solution is probably not hard to do, just takes work and time... which I don't have now.

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

And it did NOT work.

I will have to analyze this better, tomorrow.

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

Theory to test: the time is passing since the beggining, in the menu screen.

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

Ok, I'm delaying this to Alpha 1.

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

Ok, I think I found it.

timeElapsed + (TimerManager.time - timeLastUnpaused)

The problem is this calculus on checkForPassageOfTime().

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

Found it. The problem is on timeElapsed. Somehow, timeElapsed is bigger than 0 when the Pause Window is closed and that makes the first week pass too fast.

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

Ok, so why the game HAS to start paused?

from refugeewaves.

Clauvin avatar Clauvin commented on July 18, 2024

Oh. It needs to probably to avoid loading the game and not looking to its time properly updated. So, the plan is to add a fix inside the mcguyverism that can't be removed.

from refugeewaves.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.