jsutton's Forum Posts

  • Download

    Invoke a download of the current tilemap data (from the TilesJSON expression) as a JSON file. This can be useful for in-game level editors.

    Answered my own question via reading the manual #facepalm

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just looking for confirmation, but it appears there is a difference between .astilejson and .asjson, the invoke download uses the .asilejson.

    Correct?

  • Invoke download and copy/paste to server and this works fine.

    A tilemap.json = c2tilemap":true,"width":300,"height":400,"d....

    (this one loads)

    Upload via an ajax POST to server and this is does not work.

    A tilemap.json = {"c3":true,"ivs":{"347965742015898":0,"350344174.....

    (this does not load and tosses a parse error)

    Any clue?

    Tagged:

  • Multiplayer works locally only, to the best of my knowledge, it will never work as you are asking it to. (there must be some cross domain CORES type issues or similar, which I could never figure out a work-around)

    Photon has a plugin for C3 that does work and is free for limited use and testing.

    construct.net/en/make-games/addons/534/photon-engine-c3

    photonengine.com

    [The drag drop feature for plugins...whomever came up with that was brilliant. Thanks!]

  • Touch can be tricky (especially for buttons), I generally use on touchend with a 0.1s wait before running the code. Otherwise other events can run and cause "click through" issues.

  • Got that going. Appreciate the feedback. I've gotten a lot better with arrays and loops over the years, but they always make my head hurt. (As for the waits, I try not to use them. This is on a load screen so I'll probably give it a random time or trigger off a logo animation.)

    Thanks again!

  • I need to pick a random x,y where the value is equal to 0. But, I need to return the x,y values, not the item value. (This is for spawning a sprite based on a tilemap where the tilemap frame is = 0)

    I have a solution already, but I'm imagining there is a loop I could do that would be a lot cleaner.

    My solution:

  • If I understand what your asking, it's the browser plug for fullscreen your having issues with?

    If so that requires an action by the user *first touch, a specific button touched, etc. and is how the browser is designed (likely for spam popups).

    If you're publishing to Android, IOS, etc you can just change your config file to request fullscreen. You might fiddle with your config and see if you can just make that happen when using an html5 file(I'm assuming your apps are local and in html5 format). I'd be curious to know and have never tried it.

  • I ran into this as well and searched everywhere (kinda figured it might be on one of the statistics pages) and never found it. Finally had to just get used to trusting that I had the right file open and am now very careful when opening projects.

  • An example: using touch I clicked on the top row, second tile from left shows x,y of 0,1

    I'll see if I can't just do a loop and set everything up a different way (need an array anyway for ajax stuff).

    I'm not familiar with the ins/outs of tilemaps, but appreciate the input.

    So far it's only at about 3% cpu (vs 30%+) and I've increased the map size from 10k sprites to a tilemap of 120k tiles.

  • I read it, and just can't figure out a way to do what I want.

    I have 2 variables on the tilemap CurrentX, and CurrentY. They are set using

    CX = Tilemap.PositionToTileX(Touch.X)

    CY = Tilemap.PositionToTileY(Touch.Y)

    This gives a grid location to all of the sprites that I can read in the debugger (also to use for other things).

    I would like to add

    AT START, for each tile set CX2 and CY2 based on the x,y value of each tile.

    My question is if this is possible or does it require input (touch, click, etc)

    (Kind of a check to make sure things are matching, but also to use in another array)

  • Never needed to use a tilemap and was trying to avoid learning.

    Would you happen to know how to set a variable for each tile by it's grid location?

    I can do it manually with On touch set var1 = Tilemap.PositionToTileX(Touch.X)/Y

    But can't figure out how to do it at the start of layout. It returns the x,y of the map itself an not each tile.

  • Are you using different fonts, sizes, or just color variations?