dop2000's Forum Posts

  • One huge mistake in your project is event #4 - it's executed on every tick. You should move it to sub-event under event #3.

    I would definitely try splitting this database into about 1000 smaller files and forget about local storage. Simply read them with AJAX.

  • I think storing 250K+ separate keys in local storage is not a great idea. Your 18Mb will probably grow in size to hundreds of megabytes.. I would put all these keys into one (or several) dictionary/array and write it as JSON to local storage in one key.

    Also, JSON and especially XML format uses a lot of space. You should be able to decrease the size by at least 20-30% if you store this data in plain text format, say as comma-separated values. But of course, this depends on the data, and you'll need to write some functions to parse it.

    .

    Another approach is to split all this data into many (hundreds or thousands) small files and make some kind of an index. So when you need to access some word, you refer to the index to find which file contains it, and then request this file with AJAX.

  • I assume this is happening when using gamepad? As far as I remember, Gamepad.Axis expression returns a number from -1 to 1. So your maximum speed changes from negative 3 to 3. You need to multiply by at least 100 and use abs() expression.

    Also, I recommend using Browser Log to debug problems like this. If you'd tried adding "Browser Log GamePad.Axis(0,0)" into this event, you would immediately understand what's going on.

  • Yes, it only works one time. If you want to be able to click again and fill different random numbers, first you need to reset all color variables to 0 for all Dino sprite. Simply add "Dino set color=0" at the start of the event and it should help.

  • Add NWjs object to your game. This object has lots of actions like "Write file", "List files" etc.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/nw-js

    You will need to export your game for desktop, it will not work in the browser game.

  • This probably won't help, but try to right-click C2 program shortcut, select Properties and set "Run: Maximized".

  • I don't know what to explain. It's a standard "If ... then ... else" structure. If mouse cursor over object, set frame 1, otherwise set frame 0.

    .

    If you are asking how to add "Else" event - select first event and press X on keyboard.

  • Did you try my second version? Both my files work. You probably made some mistake when transferring code to your project.

  • Actually, here is a shorter version:

    dropbox.com/s/9tmz47wm4b8nj89/VeryComplicatedRandom2.capx

  • Here you go:

    dropbox.com/s/ziihp5gkie6h78o/VeryComplicatedRandom.capx

    Run the project in debug mode to see color variable.

  • You can save/load files "silently" with NWjs plugin. Your game needs to be exported for Desktop(NWjs)

    It will not work in the browser game because of security restrictions. In browser game you can save/load files, but user will be prompted each time to select file location.

  • On every tick it calculates the difference between the previous touch position and current touch position. Then moves the sprite 1/3 of that distance. If you want sharper control, increase the value (0.3) in the lerp function.

    "Subtract diffX/50 from diffX" is used after the touch has ended to continue moving the sprite with deceleration. If you change it to diffX/10, it will stop sooner.

  • I replied you in that old post.

    I suggest you make a small test project with a couple of sprites and a family, and practice on it first before attempting to change your main project.

  • murilowbb Looks like family names are defined in .c3proj file, but the contents of the family and all its variables/behaviors are stored in a separate file in ObjectTypes folder.

    So I think you should be able to move a family by copying that file and making a small edit in the project.c3proj

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads