dop2000's Forum Posts

  • There are many ways. You can use invisible placeholder sprites, or 16 image points on the Grid sprite. Or permutation table feature of AdvancedRandom.

    Example:

    Repeat 2 times
     Placeholder Not overlapping Sprite
     Pick random Placeholder
     ..Placeholder spawn Sprite 
    

    Or you can place 2 instances which need to be randomized outside of the layout. Then pick two random unoccupied placeholders and move the sprite instances to them.

    Repeat 2 times
     Placeholder Not overlapping Sprite
     Pick random Placeholder
     ..Sprite X<0
     ..Pick random Sprite instance
     .....Sprite set position to Placeholder
    
  • What do you mean by randomize? 16 instances with IDs from 0 to 15 distribute randomly in 4x4 grid? Or shift each instance a short random distance within the cell?

    Or, say 5 instances place on random cells on 4x4 grid, and the rest of the cells will remain empty?

    Either option is possible (and easier) without arrays.

  • Basically, it should be like, if SpriteA compare Variable != array2.CurValue: create spriteC on SpriteA where X = SpriteA(loopindex).X, Y = SpriteA(loopindex).Y

    Loopindex doesn't work in "Array for each element" loop, and CurValue doesn't work in all other loops. So I have no idea what you are talking about.

    I thought you decided to get rid of the arrays and configure all parameters directly in spriteA instance variables? Then compare the variable and spawn either spriteB or spriteC.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, when you create objects in runtime, Construct needs a "reference" instance to copy all properties from. A common practice is to add an unused layout like "Assets" and store all reference objects there.

  • Have you configured other properties - character set, character height etc.?

    Most people use the Spritefont Generator tool to create spritefonts. It exports a text file with all properties, including spacing data. So all you have to do is copy them over into Construct. You don't need to set the width for individual characters.

  • So, something like this?

    Array2 for each X element:
    .. SpriteA compare variable ID=Array2.CurValue
    .. : SpriteA spawn SpriteB
    

    I still don't understand why do you need that complex system with two arrays. Can you manually place sprites A on a grid and configure all properties in their instance variables, including the type of sprites B to spawn?

  • The expression should be random(100)

    Otherwise it looks correct to me.

  • I guess you need to either iterate the instances with "System For Each" loop, or elements in the array with "Array for each element" condition. Or both...

    But I don't really understand your task. What exactly you are trying to achieve?

  • I will look into laptops with the AMD graphics card

    Sorry, I didn't mean a dedicated AMD card. I meant the Radeon graphics which is integrated with Ryzen processors. It's more than capable for light gaming, will probably handle 99% of Construct projects.

    But if you are making a game which is heavy on graphics, you can look for a laptop with dedicated GPU.

    Having more RAM is a must.. Chrome now simply crashes with "out of memory" error when I try to open our project on computer with less than 24GB RAM. I'm worried I will need 48 or 64 gigs some day.

  • We are using chunks in our game.

    Each island is a 150x150 tilemap, the world consists of over 100 of them. Objects are linked to each island and we only load the tilemaps+objects which are near the player.

    In our game most objects are dynamic - players can add/remove/modify them. So we have to store all objects in JSON and re-create them from that JSON.

    If your objects are static and never change you can simply add them into a hierarchy with each tilemap. Give a template name to every chunk and when you create them, all objects on the tilemap will be created automatically.

  • I've been using Construct on 5 different laptops in the past years - three of them had Intel processors (5-10th gen) and two AMD Ryzen 7.

    I can tell that Intel integrated graphics is noticeably slower than AMD, and generally runs hotter. But if you are working on small projects, there probably won't be much difference.

    My current everyday laptop is a Ryzen 7 5700U ultrabook with 32 GB RAM. It can easily handle C3 projects that are gigabytes in size.

    I can also confirm that C3 runs smoothly on a gaming laptop (Ryzen 7 + RTX 2060).

  • fedca Oh, I missed that. There've been so many changes lately. Thanks!

  • You can use System Wait action or Timer behavior. I recommend Timer in this case because you can stop/cancel/restart it if the player taps several times.

  • FWIW I submitted a WebView2 suggestion to fix that. I think a relatively small addition to WebView2 could potentially allow full file system access without prompts using the existing browser File System Access API from JavaScript.

    Ashley Do you know if there has been any progress with this issue? We were planning to use WebView2+FileSystem in our next project, but that picker dialogue is a deal breaker.

    Also, it will be impossible to set up Steam Cloud sync if players are able to pick the location of save files.

  • Did you check the browser console?

    Also your JSON is an array. You probably need to use JSON.Get("0.status")