dop2000's Forum Posts

  • It's likely I won't be using tilemap anymore, so it won't be as easy as snap. I want to be able to create the walls at runtime, so the layout can be different, and the walls are automatically placed. It'll mean combining either normal sprites or tiled backgrounds with tilemap offset.

    I would still use a Tilemap (or several). You can make them invisible and put sprites over the tiles. Use tilemaps as solid obstacles for other behaviors, for collision detection, pathfinding, LoS etc. You can create different tilemap layouts and load them from JSON string for each ship. Tilemap basically works as an array, so it will make many things easier.

  • You do not have permission to view this post

  • You can turn scaling off (Fullscreen in browser: Off) in project settings.

    However, using browser's scrollbars is not recommended in games, it's better to set up your own scrolling system.

  • You mean something like this?

    set activeColor to rgb(22, 33, 44)

    Text set font color to activeColor

  • Thanks Sir. I am also thinking about this. i think this is not possible since if i double tap the system will first register a single tap and perform that action.

    Regards

    It's possible, but may not work too well.

    You can start an "average" strength jump on single tap, then wait for about 0.5 seconds and if there was no double-tap registered, make the jump higher by increasing VectorY (for example Set VectorY to Self.Platform.VectorY*1.5)

    If double-tap event was registered, decrease VectorY (Set VectorY to Self.Platform.VectorY/1.5)

  • You do not have permission to view this post

  • Now I just need to figure out how to set the destination to a grid, rather than the mouse X & Y. If I recall correctly, it's something like: X % 2) * 32... but I honestly don't remember. Will need to search around again.

    Use TileMap expressions: SnapX, SnapY, PositionToTileX, PositionToTileY, TileToPositionX, TileToPositionY

  • The problem is - when you do double-tap, the system first registers a single tap! So your character always start with high jump. And once it's in the air, the only way to make the jump lower is to adjust VectorY.

    Another issue is that people do double-tap with a different speed. So the character jump height will depend on how quickly double-tap was performed.

    I suggest you reconsider your control system.

  • Ok, if you have different image points on different sprites, then my second advice about loading images from files will not work.

    But you still need some way to store all this data about each sprite, their animations and images in each frame.

    How else would your game know that frame10/sprite1 and frame9/sprite2 is the same image?

    You need to put this information into an array first and then check this array when picking a random frame.

    You can try Extract image plugin, maybe it will allow to compare two images. Keep in mind though that the images should be 100% identical, even a difference in 1 pixel will produce a different string.

    The only other idea that comes to mind is to use image points to store image number.

    Say, in frame10/sprite1 you create an image point named "ImageNumber61", in another frame "ImageNumber23" etc.

    Then you can use a rather complicated method to determine what image point name "ImageNumberX" is defined in each particular frame. But this is a bad idea and I don't recommend it. Use an array instead.

  • Thanks, I thought so. It's just strange that I haven't seen this before.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just realized that Tiled Background can be used to draw lines in runtime, for example dotted:

    It's better than sprite because you can change its length without distortion. And it's better than 9patch because you can't rotate 9patch.

    Performance wise it looks very good too, I added about a hundred of such lines to layout, changing their size on every tick and still getting 60 pfs on mobile (WebGL enabled).

    Can there be any potential problems with using Tiled Background like this?

  • Guys, I don't understand - what's wrong with using a tilemap and the default pathfinding (as in the link I posted above)?

    It doesn't require any external plugins or any complex programming. And the character is moving more naturally, not like a robot in square angles. Or you can use pathfinding just to generate path and move the character from node to node with MoveTo or some other method.

  • You do not have permission to view this post

  • I think you are missing my point. What I suggest is to make another tilemap with thick tiles (1/2 size of the main ship tiles) that will act like walls for the pathfinder plugin.

    See this demo I made:

    https://www.dropbox.com/s/isnc7nm26ekdv ... .capx?dl=0

    You can experiment with pathfinder properties (cell size, speed etc).

    Also, after the character has arrived to the destination tile of the ship, you can adjust its position (move to the center of the tile) with MoveTo.

  • I haven't used rex's plugin and don't know how it works.

    If you make a seconds tilemap like in the picture I posted, the walls will not be thin. You basically replicate all the walls in this tilemap.

    And then I guess you can use the standard pathfinding plugin.