oosyrag's Forum Posts

  • Do the same as you would with the score itself, but using a different localstorage key name.

  • I had been using the desktop build to run previews that can parse local files through nwjs without exporting the project (or importing the data to be parsed as a project file).

    My understanding is that the local file/folder save functionality doesn't really help in this situation. Are there any plans for the browser version to allow previews to access the local file system? Or, are there any other approaches besides having to either import my data as a project file each time or exporting to nwjs every time I make a change?

  • This would best be done as a graph database, where each visual sprite object is linked to a specific node or edge index. You'll be able to keep track of the state of each node and edge, and create conditions based on their state and connections. It's a bit much for me to put together an example for, but you can read more about it here.

    geeksforgeeks.org/graph-and-its-representations

    google.com/search

  • Thanks!

  • Is there a way to reference function parameters by index in the new function system, or an expression to get the parameter count? For use with loops and loopindex.

    Else I guess I can use a single parameter and parse with tokenat and count. I guess that would work better in the event of a variable amount of parameters.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Read, follow and recreate all the multiplayer example tutorials, starting with construct.net/en/tutorials/multiplayer-tutorial-1-concepts-579.

    Make sure the host is the one moving and handling sprite object positions while the peer is only sending inputs to the host.

    If you want to utilize local input prediction, make sure the movement events on the peer and host match.

    Then if you still are stuck, provide more details, and post a minimal example project with the issue you are having so that you can get better advice.

  • Unfortunately no, the system time is used to calculate Unix time. Unix time is good so you don't have to worry about things like time zones, different numbers of days per month, or leap years.

    To get a device independent time, you'll need to connect to an online service or server with a time API. Sorry can't help with that.

    There are some tricks you can utilize to limit cheating like a limit to how many days worth of rewards can be stored at a time, and also the inability to go "back" in time. For example, you can lock out the user or freeze the rewards if the day counter is ever less than whatever was last recorded or claimed. You can also do things like have the reward only apply from that day forward. This would require the user to keep their device with they the wrong day/time, which I think most people would not want to do.

    In the end, the best advice in my opinion is not to worry about cheaters too much when designing your game. Very few people cheat to begin with, and those that do so get enjoyment from it. As long as it's not detrimental to the rest of your users, just let them have fun their own way. You could spend the effort to design your game to be more fun to begin with to disincentivise cheating instead.

    TLDR If the game is online/interactive, you have the ability to check the correct time. If it's not, it doesn't really matter if the user cheats or not.

  • That's the current day number in unix time. Tomorrow would be 18195169, and the day after would be 18195170.

    You keep track of that number to see if the user has logged in or claimed a reward for that day. When that number changes, it represents a new day.

  • Add a triggering condition to your top level event, the one with the for each element. For example on button pressed or on click or something.

  • There are many ways to make different styles of score boards. You'll need to be more specific. Generally speaking though...

    Part 1 - Record a score during gameplay. Use an instance variable to keep track of the score.

    Part 2 - Trigger saving the score. Usually this happens on death. You can save the score to another variable, or if you want to keep track of many scores, an array would work better. The array would additionally allow you to sort by value.

    Part 3 - Display the scores by text or spritefont object, using the values from the array. You can get the values from the array into your text object using expressions.

    Part 4 - If you want your high scores to be persistent between sessions, you'll probably want to save them by using the local storage plugin.

    What have you tried so far? If you get stuck with any particular issue it would be easier to give you more help.

  • You do not have permission to view this post

  • I didn't see any plugins for those cloud services, but it can probably be done through the new scripting feature in C3. You'll have to check the API documentation for whichever service you want to implement for javascript. Support is probably beyond the scope of this forum. You can try in the the scripting section of the forums though. construct.net/en/forum/construct-3/scripting-51

  • Use the timer behavior. Invert the timer is running condition.

    + Keyboard: On Q pressed

    + Player: [X] Is Timer "cooldown" running

    -> Player: Spawn Sprite on layer 0 (image point 0)

    -> Player: Start Timer "cooldown" for 1.0 (Once)

  • construct.net/en/make-games/manuals/construct-3/plugin-reference/user-media

    You should use the UserMedia - On Snapshot Ready condition instead of the System-On canvas snapshot condition by the way.

  • Where on the cloud do you plan to have your users save to? Your own server? A third party service? You'll need a plugin that can support communicating with the back end you plan on using, for example Firebase.