dop2000's Forum Posts

  • I never thought about this before, but I think all characters in the sprite font image need to be the same width. Spacing data is not used to determine character position in the image. It is only used to remove extra empty space from the right if the character is smaller than the default width.

    So think of the sprite font image as a tilemap - each character needs to be inside its own tile.

    I highly recommend using Spritefont Generator tool - it will format the image and generate the spacing data for you.

  • To add to plinkie's answer - events 11 and 12 on your screenshot are running on every tick. So if you are disabling Sine in some other event, these events 11 and 12 may immediately re-enable it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can you share your project file? Or a blank project with this sprite font added and configured?

    Also, what exactly is the problem - is the spacing data not working for all characters? or some characters?

  • jatin1726

    Can you share your C2 project file? Or email it to me: doperst2006diw@gmail.com

  • 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")

  • 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"