game ala 'ogame' example

  • I wonder how do something like that:

    i set counter variable (100) and every minute substract 1.

    But even if i close game/browser/PC game are still be working, so if i turn of game for one hour and i launch i see 40 of this variable.

  • bump

  • You'll need a server with required functionality that runs the game logic. It's stuff that will get complicated quickly, and C2 might not be the most optimal tool for that sort of project. You could have an interface created in C2 that communicates with the server, which does most of the heavy lifting and calculations.

    Edit: Just for the clock functionality, you could use AJAX/PHP to communicate with some service and grab a time stamp. But for true multiplayer you'd need a server.

  • There may be a simpler way by reading the PC's clock - but this will be able to be cheated very easily.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • vee41 i dont look for multiplayer just singleplayer game So what server i need? dropbox is good or other free hosting? i need working this offline acually

  • delgado I think the only way then to do this is offline is to read the computer's clock. I don't think you can do this with vanilla C2, but there is a third-party plugin. (I'm not sure if it's out of date).

    What you'd need to do is save the time before closing it, then saving it to webstorage, then when starting up compare the time now and the old time.

    Unfortunately this can be easily cheated by changing the time.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)