AllanR's Recent Forum Activity

  • the short answer is yes, it is possible.

    the longer answer is that there is a lot going on with that UI and it would be a LOT of work to make something look that good, easy to use, properly handle multi-touch, interact with a server for security and data, graph the data in various ways, etc.

    I use C3 to do a lot of database work, and have figured out many of the stumbling blocks so I can help out. But you will need to break it down into smaller tasks and build it bit by bit, and ask specific questions.

    one of the hardest parts is making it responsive - adapting to various screen sizes, and handling input because form controls hover over the canvas which means nothing can easily pop up over them. You can make you own input methods, but then you lose copy/paste/spell checking/etc.

    I haven't done much with graphs yet, but it is something I plan on doing, and have played around with various types. ROJOhound has done some examples graphing equations. Animating graphs like in the image you linked to raises the difficulty quit a bit.

  • well, if the object isn't moving, then the moving angle doesn't mean anything. The fact that it stays the same after it stops is useful and lets you know what direction it was coming from, allowing you to set the objects angle accordingly.

    I do like the idea of it having an index indicating which waypoint it is heading towards. Although it would be easy to add an instance variable and increment it at each point.

  • I like the fact that every waypoint is a trigger - it allows you to change animations and do other things. You can add another condition "MoveTo is moving" to determine if it is at the last waypoint or not.

  • your "Load Game" function doesn't actually load any values from local storage. You are using the Compare Value event, but that will not have a value until after a "Get Item" or "Check Item Exists" action is performed.

    You can save values separately in local storage if you want, but you will end up with a lot of Save actions and then Get actions, and I have heard people complain that that makes their game very slow.

    You can load lots of variables into one array or dictionary and then save those all in one operation. It is ok to save several items separately, but I would try to keep that number as low as possible.

  • the way you are trying to load the values from local storage is not going to work.

    Also, you should not save each value in the array separately - you should save the whole array

  • You can create a separate layout and call it something like ObjectRepository or ObjectDump and place an instance on there.

    you don't ever have to switch to that layout or use it in any other way. Just having an instance that exists allows you to set the default settings you would like to have set.

  • As usual, there are probably lots of ways to do it. It depends on how your game works, how long a typical run takes, how many enemies there are, do they exist for the whole run, do they spawn at the same point or do they randomly spawn, do they shoot at you, do you shoot at them, etc.

    ROJOhound's method records the Player's X, Y, Animation, Frame, and width every tick. If there isn't randomness to the game you could instead save the player's input and then have everything respond to the input in the same way to recreate what happened. There is also the Game Recorder object that can record a video of the canvas. I think that was meant to allow you to download the video, but it might be a way to play back exactly what happened without having to save all the things that move separately.

    The more that happens in your game, the more you have to save - and the more memory required to do that.

    One of my favorite games is Jetpack Joyride. At the end of a run they show you a snapshot from the run. Showing an instant replay is a lot trickier...

  • The example I made was obviously based on the file made by ROJOhound. He made the player a container and put the array in that. If you set up enemies the same way then each instance would have their own array. You would need a For Each Enemy loop to play back the recordings.

    the potential problem is if you kill an enemy, then the array will get destroyed with the enemy - making it impossible to play back. If enemies spawn and get killed regularly you will need a playback array that works differently than the player's array.

    if all the enemies exist at the start of the layout, and they don't die, then their recordings would line up with the player and play back correctly. If enemies spawn after the start, then they would have to use the frame counter from the player so that their recording will match up with the player.

  • you could share your file for us to look at. if may be something you changed that is causing the issue. or try running in debug mode to see if anything unusual is going on.

  • You can take a look at this sample I made long ago. Straight lines are pretty easy, if you want lines that curve it gets a lot trickier.

    you definitely don't want to be updating them every tick - only when you create them or need to move them.

    if you get stuck, it is easier for us to help if you post a sample project...

    https://www.rieperts.com/games/forum/Bezier_Curves.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you are using LayerToCanvas / CanvasToLayer correctly as far as I can tell.

    so the problem is either with the origin of the objects or something not being where you think it is...

    you will have to make a small sample file with the two layers and a couple of the objects so we can see what it going on.

  • the example I posted saves the last 3 seconds, not the first 3 seconds.

    it takes 3 seconds for the array to fill up, but after that it starts deleting from the start of the array, and adds the latest player data to the end of the array. (so you always have the last 3 seconds of data)

    you could easily record the entire run, and only replay the last few seconds, or let the player decide how much to replay... you could also make a system to save the recording so that they can show other people, etc.

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies