Maydie's Recent Forum Activity

  • To further explain:

    Using a perlin noise plugin I can easily generate a starting area for my game. I then want to have this area expanded when a player gets close to where there are no sprites at all, then generate those areas using the same perlin seed. At the moment I only have two sprites: water and land.

    I have tried everything I could think of including making bullets that shoot out and as they travel I have a statement when the bullet is not overlapping the family "terrain" (which holds both land and water) to have the terrain pick the overlapping bullet imagepoint (this stops it from thinking the camera or any non terrain entities count). ELSE: get the bullet's X and Y as it is truly not overlapping any terrain, then run a function which has an array and loop through it to determine which sprites should be created (this array is small and used as a chunk).

    To be clear, this works...but unless I want to spawn 100s of bullets to cover every angle so that blank spots don't squeak through, it is unreliable. I additionally thought of maybe running a larger array (creating a larger chunk), but obviously spawning many sprites at a time has a performance impact.

    Does anyone have any idea to be achieve this? In a nutshell, how do I reliable spawn a sprite in every spot that does not current have a sprite as I move about the level.

    The last part I am concerned about is the quantity of sprites that are in the map. Should I develop this in a way as to destroy the sprites as I move and then re-create them as I move back to the original location? I thought about this but then realized I would just have a very large array holding the name and other specifics. Not sure how good performance will be with this method.

    Anyway, hoping someone can toss me some ideas. I think once maybe I have solved the fog of war + creating new sprites, that may help with the last part of my question.

    Cheers!

  • I am not a programmer....duet works fine by itself, Construct 2 is the program that is crashing, I was just trying to offer information in hopes it helps someone else who may be having the same issue. I have spent years working with Construct 2 and just wanted to help the community.

    Reported to duet for good measure but still uninstalled it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Problem Description

    I thought the latest stable release was crashing and went into full panic mode, turns out the last program I installed https://www.duetdisplay.com/ was the culprit. You cannot use this program and run construct 2 at the same time (or any version of construct 2). Even if you "exit" duet the drivers that get installed are enough to make construct 2 not respond loading a file or creating a new file.

    Attach a Capx

    See above, no issue with capx. Happens when starting a new project even.

    Description of Capx

    Stops responding doesn't even give bug report.

    Steps to Reproduce Bug

    • Run construct 2
    • open existing project

    Observed Result

    Not responding, tries to send report to microsoft and is unable to

    Expected Result

    Run the project

    Affected Browsers

    • Chrome: N/A
    • FireFox: N/A
    • Internet Explorer: N/A

    Operating System and Service Pack

    Windows 10 Home version 1709 build 16299.125

    Construct 2 Version ID

    r252

  • I am having this issue with the latest build, the only way I can temporarily fix it is by doing a select all and pasting into a new layout...very annoying and have no clue what is creating it. Drivers are all up to date.

  • Hi All,

    I could not find help on this topic anywhere:

    I have a 2d pixel platformer, 3 layers, 2 of which have parallax (farthest set to 25, mid ground set to 50 and the main scene 100). I notice that everything scrolls smoothly as expected, however, the main scene (a big sprite that has buildings and the ground a la Metal Slug) scrolls as fast as the player runs but is noticeable choppy. I tried experiment with various parallax numbers but nothing helped the main scene scroll smoothly (which is also the scene the closest to the player). I was about to give up and try game maker which I did not want to do at all because I love Construct, but then for some reason I tried setting the players "Max Speed" to 144 which happens to be my monitors refresh rate....ran the game...smooth as silk...no choppiness at all.

    Obviously I want to design my game to not care at all about a person's refresh rate, but for the life of me I have no clue what to do to fix this problem. Is this a bug?

    Thanks ahead of time.

  • Hello,

    So I tired the delay in the loop above all actions, did not stop the screen freeze at all.

    Any other suggestion on how I can spawn so many sprites without overloading the CPU?

    Would appreciate any help. If I can get this accomplished it is a pretty major milestone in getting to the next phase of my game done.

    *Update*

    Actually I lied. I have managed to get it to work. I did it differently though. I put a 0.01 sec delay after checking for collision over top of the shape and "destroy" if not part of the loop. Then put another one after disabling collisions on the node.

  • Hello,

    I have an array:

    For "x" from 0 to 100

    For "y" from 0 to 100

    Condition: Is overlapping "object"

    Action: Create object at loopindex("x"), loopindex("y")

    In a nutshell, I have a randomly generated shape that I spawn at a location. I find out the boundaries of this shape and then run an arrray at the same coordinates of that shape. It basically spawns a sprite on a 32 grid snap wherever the object is overlapping with the shape within that boundary.

    My problem is sometimes these shapes can be as may as 600 sprites. When the loop runs, spawning all 600 in one tick freezes the screen until it is done. Currently I have this function running during the game. I want to eliminate the freezing whenever these groups of sprites get generated. I tried put in a "wait", but it doesn't same to wait in between creating each sprite. Maybe someone else has a better idea how to spawn these sprites so that the screen doesn't freeze.

    Thanks!

  • rexrainbow

    Thanks for the reply!

    This actually seems like a really good way to create the nodes I need without a ton of extra scripting and collision checks. I will check it out.

    Cheers!

  • rexrainbow

    Ok so I tweaked the code to use the new plugin. Works great.

    My only problem now is that I seem to have limited control over the shape of each group of nodes.

    Is there another plugin I could use to create a pattern of nodes at x,y location with a max width and max height from the original location? My plan is to use the perlin noise plugin to determine a node location, but then use something else to create a random filled pattern (i.e. no space between sprites which are 32 x 32 px). Currently the best I can get with the noise plugin is an oval of say +-30 spawned sprites in a 3200 x 3200 pixel area (or 100 x 100 grid) due to the scale I have to change the perlin noise to in order to get small groups of sprites. It doesn't lend to an interesting shape and very difficult to control how far about each group of nodes spawn. I am hoping by using a combination of perlin and something else I can create something more interesting to look at (ultimately using three inputs 1. Number of nodes to spawn, 2. Max width from original x,y, 3. Max height from original x,y. I was thinking about using an array to loop through a grid of random width and random height perhaps using "0" for no fill "1" to spawn sprite. The problem I am having is how to ensure everything is filled in the middle.

    The end result would be something like (below). Maybe it is not possible to generate something natural looking on the fly without perlin as shown below. Let me know your thoughts. Much appreciated. I realize this may be asking too much, if I can be pointed in the right direction I will do my best to do most of the leg work.

    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0

    0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0

    0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0

    0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0

    0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0

    0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0

    0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

    Update 1: I found someone talking about using a mask over perlin noise to create a border of "water" or in my case, nothing, around the edge of the perlin noise. Maybe this is the way to go to create patterns of sprites within a specific region.

  • Thanks for the quick reply! Quite a few great plugs and behaviors, thanks for pointing me at this. I am going to have to modify my code with the new noise plugin before I can ask anymore questions. I will take a look at your eventbalancer as well. Appreciate it.

    Cheers!

  • Hello,

    Love this plugin. Still trying to figure out exactly how to implement it, however, there may be a bug (or just that I do not know how to use it). I tried creating two different random perlin seeds, but they both ended up showing the exact same pattern in the exact same place even though I called randomize seed for both perlin noise.

    Second question:

    I am trying to figure out how to use the "z" portion of simplex3. Currently i have implemented a "for X from 0 to MapX/32" and "for y from 0 to MapY/32" (32 being the size of my tiles I need to spawn). I wanted to try and use the "z" to create various groups...looping through x,y and z on each chunk can be very slow and freezes the screen when spawning objects on the fly so I am not really sure if this is the best way to implement this perlin noise plugin. Ultimately I have 5 different types of resources I want to spawn on a map based on perlin noise. The map is infinite, whenever a person gets close to the border it generates a new section (which usually freezes the screen for half a second). I need these clusters of resources to be side by side without much or any scattering.

    I have managed to do this for 1 set of resources, however, creating multiple groups has been a challenge without having any kind of overlap and at a sparse enough distance where the game will be fun.

    Hopefully this makes sense. If anyone has any input of how my generation method could be improved or how I could correctly accomplish the above I would appreciate it.

    I have also done a lot of reading on perlin noise, must of which goes over top of my head...

    Cheers!

  • AllanR

    Crap. So far I have 2 sections. One for spawning resources which essentially I made collision boxes, and if they didnt overlap any other collision boxes then I spawn the nodes within the area. The same thing for the trees.

    The difference for the water is I wanted to eventually replace the edges of a body of water with different sprites to make it look like the edge of a lake, I thought that using an array would be the best use. I still think it is so I may try to use a combination of what you taught me and my previous butchered collision boxes and go from there for now.

    Ultimately I may just end up trying to figure out that noise plugin to generate the map more cleanly, or (sigh) re-do all of my coding to store everything into an array first, then generate everything afterwards instead of doing it in multiple steps.

    I appreciate all of the help. Hopefully I can pick on your brain in the future

Maydie's avatar

Maydie

Member since 31 Jul, 2015

None one is following Maydie yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies