gskunk's Recent Forum Activity

  • Random seeding would indeed be the best way to go about this. Thanks all for your input.

  • Yes I understand that. The image data is not slowing anything down anymore than I expected it to. I can populate the master array (the one the size of the image fine) with the data I need just fine. The problem that occurs is when creating an array for every pixel on the map. Without that occurring, even with reading the image data, it still flies through everything and pumps it into the master array just fine.

    EDIT: Just tried creating an additional switch state that would fire once the initial master array populating was finished and create the secondary arrays there, just to eliminate any possibility that the image reading was causing the hang up. Still causing the same issue.

  • Here's an image of the event list (7 events) imgur.com/a/uNMB4 The locator line does not speed things up when disabled. The 'arraySubChunks' is set to 100x100. The layout will finish fine with sizes ranging from 1x1 to around 30x30.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Upon further poking around it isn't the amount of arrays but the size as it's eating up tons of ram (which is to be expected with them sitting around in memory). I suppose the only way to get around this would be to save the array to JSON after it's generated. EDIT: After experimenting with saving the file through the JSON format there's the issue of it prompting every file save. Don't think anyone want's to click 10000 times.

  • Yup, that's what I've currently go it doing so I can provide visual feedback on where it is in the process. The problem is accrued slowdown (I think due to the number of arrays being generated) It will generate the first three or four thousand (the first 30-40 lines of the image running from y 0 to image height) after that it gets progressively slower until it just stops around 47.

  • Newt- As far as I can tell it isn't getting bogged down in the loop. I have it set so it iterates in portions, rather than all at once so I can provide a visual feedback to the progress instead of waiting and wondering if it's working. That part is working fine. The issue is that it starts off quickly, and the begins to get slower and slower every loop as it proceeds through.

    dop2000 - 25x25 is just where it starts to faulter. I'm really trying to aim for 100x100. Think of each pixel of the heightmap as a chunk of the map. The idea is to take every chunk and expand it into a second array so that chunk is in reality 100x100 tiles. I do realize this is an absurd amount of data. As far as reusing the array I could, but wouldn't that wind up in losing the processed data. I suppose I could dump it to json after ever single cell expansion of the main map. Would be a lot of files being created however.

  • Wouldn't the plugin end up generating the same amount of arrays, thus ending up in the same situation just quicker? To be honest plugin creation is not something I have really looked into before and my JS abilities are akin to writing with my left hand so I may be interpreting this wrong.

  • Maybe I'm going about this the wrong way with Construct 2. What I'm trying to do is procedurally generate a world. Starting with an imported heightmap and using the canvas plugin I pull the needed color data into an array the same size as the image. Using that I then go through and generate a second array for each cell in the first array and that's where the system starts to slow down. Testing this process a 100x100 image uses an array with a total size of 10,000 cells which means I have to generate 10,000 smaller arrays which works fine if those arrays are below 25*25 cells. Anything above that and the system eventually grinds to a halt. If I am not mistaken, it's the number of items in total which are slowing down the system.

    Anybody have any tips or ideas on how to handle generating larger worlds with construct 2 in this fashion? Am I going about this in the wrong way?

  • Got it figured out, needed a comma after the quotes inside the parenthesis.

  • Having a hard time finding documentation on how to set this up. I have a function which takes a large amount of parameters and found that I maxed the dialogue box out. Doing some research I found that it's better to use the Function.Call expression but for the life of me I can't figure out how to add parameters to the function called. I'm sure I'm just not using the proper syntax.

  • shinkan: Thank you immensely. For some reason I wasn't thinking and was manually placing the image in the files folder instead of loading it through construct. Works perfect!

  • RamPackWobble: Not quite, I'm looking to change the image the tilemap is pulling tiles from. Switching tiles I don't have an issue with. I could use your method to just shift all the tiles down however many I need to the other set if I put it in the same image, but I'm worried about performance issues of constantly changing tiles like that when I'm using a tileswitch to animate tiles.

    shinkan: I'm going to continue poking at this to see if I can get it to work but of right now I can't get it to load the image.

gskunk's avatar

gskunk

Member since 7 Sep, 2015

None one is following gskunk yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies