dop2000's Forum Posts

  • I'm telling you - the problem is with the order of events. When using Local Storage you need to wait before doing anything else.

    On start of layout -> read from Local Storage -> Wait for it to complete, only then compare variables!

    When level is finished -> write to Local Storage -> Wait for it to complete, only then switch to another layout!

    If you don't know how to organize this wait properly, you can simply wait 0.5-1 seconds, this should be enough.

    .

  • StorageData is a dictionary.

    The purpose of the dictionary in my demo is to save/load all values at once in Local Storage. When you have 50 variables that you want to save in Local Storage, you need 50 "Set item" actions, 50 "Check item exist" actions, 50 "On item exist" events... But if you put all values into the dictionary, then you can save it with just 1 "Set item" action, and load it with just 1 "Check exists" action. Much shorter and cleaner code!

  • Can you group these images into several sprites? Say, 100 images per sprite. Of course, if you need to display many random images from different sprites, this will use the same amount of memory as 1200 images in one sprite..

    .

    You can try packing the images into one or several zip files. Here is an addon that allows to extract files from zip:

    github.com/erenertugrul/construct-plugins/tree/master/plugins/jszip

    Although I don't know if this will work in an HTML5 game.

  • Can you post your project file? It's difficult to understand how the code works by the screenshot.

  • When animations are messing with movement, a very common solution is to use two objects for a character (you can put them into a container).

    One object "CharacterBox" is an invisible rectangle sprite with Pathfinding behavior. And the second object is your main "CharacterSkin" sprite with animations, pinned to that CharacterBox.

    Also, make sure that the Origin image point is set correctly in all frames in all animations.

  • Unfortunately, there is no simple answer. You can use a tilemap where each hexagon is made of 8 tiles, but programming something like this will be a complex task.

    .

    I have a demo project with hex grid, but I used sprites there.

  • You do not have permission to view this post

  • I haven't tried it yet, but with the new Pin in version 197 you should be able to scale pinned objects with the parent object. So you need to pin all your buttons to the popup menu, and then scale it with Tween (Two properties) -> Size.

    Another option is to use Tween Value, say from 0 to 1. And while this tween is running, set the scale for the menu and all other objects to Menu.Tween.value("tag")

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are all of these 1200 files images? Can you give a little more information about them?

  • You don't need any plugins. Are you making a mobile app, or a browser game?

    For mobile app, when exporting to Cordova, simply check "Hide status bar" option.

    For web export, you can only switch browser to full screen after user-generated event - for example a touch, button pressed etc. Try this code: "On any touch end -> Browser request fullscreen"

  • You do not have permission to view this post

  • When a tile is touched (and not already moving), set an instance variable on this tile, for example "isReadyToMove=true".

    Then when the screen Is In Touch and there is a tile which is ready to move, compare Touch.speedAt(0) and Touch.angleAt(0). For example, if Touch.speedAt(0)>100, then start moving the tile in Touch.angleAt(0) direction, rounded to 90 degrees.

    When the tile starts moving or has arrived, and when any touch has ended, clear the isReadyToMove flag.

  • Untick "Set angle".

    If you need to set angle, you have to compare moving angle and flip or mirror the sprite. For example:

    If Sprite.Bullet.AngleOfMotion is between 90 and 269 degrees: Sprite set flipped
    Else: Sprite set not flipped