Joao Daniel 2022's Forum Posts

  • Hi guys, I have a doubt about my game that I'm creating "Level Editor" I created a method to save each new object that is created in the array, I created a variable to memorize the last saved object so whenever a new one is created it will never replace one object already saved in the array, but I'm having trouble with how to do it in case the player deletes an object, instead of leaving several lines of the array empty, simply deleting them and the variable of the last object saved without affecting the variable of the last object created.

  • As Ashley likes to say, Answer your own performance questions with measurements :)

    rsrsrs

    How much data are you talking about? If it's less than 1MB I wouldn't worry about it at all.

    the array will be 2000 wide and 2 high

  • hi- guys, my question is the following, in my level editor game, i save the information of the positions of each object in array i use for each tile a tilemap that in my opinion got better when resizing the player in real time it will be easier for him and so I save the json of each tile in an array and I will do the same thing with enemy sprites and I would like to know which one takes more memory save the json of each sprites or save the position, X, Y , which is lighter and weighs less in the memory of the device to be rotated, because in each line of the array an object json is a large text and already the positions in my opinion less text in the lines of the lighter array is, please correct me if i'm wrong, thanks.

  • You do not have permission to view this post

  • > > Currently is not supported you can only read from the files folder.

    > >

    > > However, if the Game is for Pc you could use Nw.js which supports (Read & Write) directly to your PC

    > >

    > > An alternative you can store it in a server and then (load & Save) directly to your server

    >

    > is there any free server to store these files and how could i make this happen can i create a c3p please?

    I believe they are if you look on Google, I cannot recommend you any I'm afraid as I use private paid servers though maybe someone sees this post and can recommend you any good ones.

    Though even if you find one you will still need to do some configuration ... like allow CORS etc...

    To connect to your servers and download the JSON file you need to use AJAX:

    On Start of layout:

    AJAX Request URL "https://yourserver.com/yourfile.json"

    Wait for the previous action to complete

    Array Load from AJAX.LastData

    An alternative without servers put the file into the files folder as you mentioned:

    Then the first time they run the game save it in local storage

    You can make two copies if you need to:

    1-One for the players that they can change it

    2-To have your original copy

    same thing as you trying to do saving into the files folder but you save into the Local storage instead.

    Thank you very much, I will research but if anyone knows please help me I am sweet in pure php, html programming etc....

  • Currently is not supported you can only read from the files folder.

    However, if the Game is for Pc you could use Nw.js which supports (Read & Write) directly to your PC

    An alternative you can store it in a server and then (load & Save) directly to your server

    is there any free server to store these files and how could i make this happen can i create a c3p please?

  • hi, I'm creating a level editor game, and the whole scenario will be saved in array, and the scenarios will be shared among the players in the world, I use ajax to load the first array already configured in the project files and so that's it new changes so i save them to local storage, but i would like to know how i do it so instead of saving to local storage i want it to save in a level.json file inside the game folder and load it whenever a level is detected in folder

  • hello everyone I'm developing a game for TV box and I would like to know if the construct 3 supports this type of GamePad, the character will be controlled 100% by the remote control, Walk, Skip, Menus < > etc...

  • > answer me a question please, if I used instead of several sprites of each tile, then I changed to Mosaic for each tile would a mosaic be worth it would it weigh more on the CPU memory than the sprites? I say this because I want to resize some sprites on the fly to make it easier with the tilemap plugin

    >

    >

    >

    I'm not sure I follow you now:

    If you resize a sprite it will stretch the Tile but you are not gonna have the same effect as the TileMap or a TiledBackground which repeats the Tiles or maybe I didn't understand you properly? if you trying to do the same using Sprites you will have to (Destroy & Create Tiles) in sequence.

    What are you trying to do? can you explain a bit more because of this part:

    "I say this because I want to resize some sprites on the fly to make it easier with the tilemap plugin"

    Not sure what you mean, how that will help the TileMap?

    Thanks I managed to do with your help this topic is solved

  • > > thank you very much it worked you are amazing, now tell me how do i resize the tile in real time after being selected just like in this image?

    >

    > I want the player to be able to resize some tiles to make it easier, and prevent the CPU from getting overloaded with hundreds of mini tiles on the screen

    Np glad it was helpful)

    I suppose you are referring to resizing a TileMap instance, not a single sprite?

    Here is one way of doing it:

    Not sure the logic you had in mind to trigger the Tile Auto Resizing but here I did it by:

    > Shift Is Down

    > ---Touch Is in Touch: >>>> Resize TileMap

    You can change it to your like if you had something else in mind

    Note:

    Here there is just one TileMap so its easy to pick it up but if you think you gonna have more than one Tile in the layout you will need to pick the right one before you resize, I will just put a simple Boolean "Active" and on Tile clicked set Active = True

    And deactivate all the other ones.

    https://www.dropbox.com/s/ifvuhv477rmw430/Resize%20Map.c3p?dl=0

    this what i want to do in real time please show me how

  • answer me a question please, if I used instead of several sprites of each tile, then I changed to Mosaic for each tile would a mosaic be worth it would it weigh more on the CPU memory than the sprites? I say this because I want to resize some sprites on the fly to make it easier with the tilemap plugin

  • > > thank you very much it worked you are amazing, now tell me how do i resize the tile in real time after being selected just like in this image?

    >

    > I want the player to be able to resize some tiles to make it easier, and prevent the CPU from getting overloaded with hundreds of mini tiles on the screen

    Np glad it was helpful)

    I suppose you are referring to resizing a TileMap instance, not a single sprite?

    Here is one way of doing it:

    Not sure the logic you had in mind to trigger the Tile Auto Resizing but here I did it by:

    > Shift Is Down

    > ---Touch Is in Touch: >>>> Resize TileMap

    You can change it to your like if you had something else in mind

    Note:

    Here there is just one TileMap so its easy to pick it up but if you think you gonna have more than one Tile in the layout you will need to pick the right one before you resize, I will just put a simple Boolean "Active" and on Tile clicked set Active = True

    And deactivate all the other ones.

    https://www.dropbox.com/s/ifvuhv477rmw430/Resize%20Map.c3p?dl=0

    Thank you very much for your help, I got here thanks to you

  • thank you very much it worked you are amazing, now tell me how do i resize the tile in real time after being selected just like in this image?

    I want the player to be able to resize some tiles to make it easier, and prevent the CPU from getting overloaded with hundreds of mini tiles on the screen

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > when i try to move a bigger object it gives these jerks how can i move smoothly in 32.32 ?

    It works fine for me:

    https://www.dropbox.com/s/robc1y4xbj84bai/Grid%20Move.c3p?dl=0

    Judging from the Picture have you added an event to cover?:

    ====Yes====

    On Drop:

    Set X = round(Self.X /32) * 32

    Set Y = round(Self.Y /32) * 32

    thank you very much it worked you are amazing, now tell me how do i resize the tile in real time after being selected just like in this image?

  • when i try to move a bigger object it gives these jerks how can i move smoothly in 32.32 ?