oosyrag's Recent Forum Activity

  • It's in the browser object, on back button condition.

  • I found https://en.wikipedia.org/wiki/Fortune%27s_algorithm?wprov=sfla1 when reading about Delaunay triangulation, I don't know if you're familiar with it, but I think that's what you want for deciding which lines to draw to make polygons.

    Also after sleeping on it, I realized building the point set from the plugin is easier than I imagined. In the example project, every value is plotted one pixel at a time into the canvas object already anyways. It should be simple to add a check for each pixel when drawing it. If it has no neighbors with a value lower than it, push that coordinate into an array. You'll then have an array with all the cell centers coordinates within the bounds of your relevant noise area, which you can use to moveto, snap to, draw on, run Delaunay triangulation or Fortune's algorithm on, ect.

    If you're following www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/, and want more control over the randomness distribution, I believe you need to run the Lloyd relaxation algorithm on the points before the noise is generated and then apply your own noise algorithm on those points afterwards. This won't work with the advanced random plugin, because that noise map would not take into account the new "relaxed" points. On the other hand, it LOOKS like (Nepeo?) already baked in one or two iterations of it into the advanced random plugin for cellular/Voronoi noise, since those don't look quite as clumpy as completely random nodes.

  • I believe this is still accurate, but probably not too critical for most users.

    construct.net/en/forum/construct-2/how-do-i-18/pick-newly-dynamically-99468

    Afaik that the actions following a created object, for that object, are exclusive to the newly created object in that event regardless of currently picked objects. The list of currently picked objects carries over to subsequent sub events as normal, but does not include the newly created object.

    The key is that newly created objects, outside of the immediate event they are created in, cannot be picked normally until the next top level event.

    Using the on created trigger, and the system pick last created condition will give you finer control.

    The normal way to pick and manipulate multiple instances of the same object involves using families. If you put the object into a family then you will be able to pick and reference between the sprite object and the family object.

  • Alternatively, as I always like to suggest, use an invisible helper sprite object pinned to the text object. Putting them in a container together would help facilitate picking as well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I got the cell centers. Next to get the vertices. dropbox.com/s/dr6abkphr8k4egd/Noise%20graph.c3p

    reddit.com/r/proceduralgeneration/comments/mriko7/reverse_worleyvoronoi_noise

    Basically followed the first reply for finding the local minimum by checking each adjacent pixel iteratively. Might be resource intensive to do so in real time? But should be negligible if you do it one time on start of layout to build an array with all the node coordinates.

    The second reply would be how to proceed to get vertices.

    Third reply seems to be an elegant way to extrapolate the nearest minimum or maximum by just comparing the neighbors of a single point and their slopes. I vaguely understand the concept, but haven't really wrapped my head around how to implement it.

  • Thought about this some more... Since cellular noise and Voronoi noise using the same seed results in the same cells, you can run a search from any given point using the cellular noise data. Check each adjacent pixel (or other arbitrary resolution) from that point to see which has a higher value, loop until you reach the highest value. That would be the origin of that cell, which can be transposed on to the Voronoi noise map.

    If you have a set of node coordinates for each cell, you can use Delaunay triangulation to build a second set of coordinates, which would be the vertices. From those you can define edges which would be the cell borders.

  • I believe there is an angry birds type example on the start page.

    Edit: editor.construct.net

  • Sounds like a good excuse to have the customer keep you on a retainer for updates.

    I do think it's a valid concern though, and I don't think it is currently possible in C3. It's going to be one of those compromises you'll have to accept for using a third party engine as your primary development software.

    Perhaps file a suggestion

    at construct3.ideas.aha.io

    Edit: Note that this is probably undesired for most people by default. Besides the loss of optimization, it's very easy for end users to abuse the accessibility of assets, leading to the game being broken or cheating. Imagine what could happen if you made a particular object bigger or smaller, or transparent when is is supposed to be obscuring, ect. Normally you want only the developer to be able to modify game assets. So your customer can license C3 and you can provide them with the project file to edit themselves, or they can retain you to update the game for them when they send you new assets.

  • Int does removes the decimals. It effectively rounds towards 0.

    Floor rounds towards negative infinity.

    Ceil rounds towards positive infinity.

    Random gives you any number from the lower bound up to but not including the upper bound.

    Round(random(0.5,100.5)

    Floor(random(1,101)

    Int(random(1,101)

    Floor(random(100))+1

    Int(random (100))+1

    Are all equivalent, use whatever whatever you like.

    Ceil(random(100)

    Is also basically the same thing, except you have a negligible chance of actually getting 0. And since I'm being needlessly pedantic now, I believe JavaScript uses a 53 bit float, so the actual chance world be around 1 in 90 quadrillion or so.

    int(random(1,100)) can never result in a 100 though, while round(random(0.5,100.49)) has a 1% less chance to get 100 compared to 1-99, and round(random(1,100)) would have half the chance of getting 1 or 100 compared to the other numbers.

  • I believe so.

  • (int(random(1,101)) if you want to include 100.

  • To check an object with other instances of the same object, use a family.

    To check neighboring positions, use the overlapping at offset.

    To check multiple positions, right click the event to change it into an or block.

    Alternatively, you can use the system condition pick overlapping point to check the 4 neighboring positions, then check if pickedcount is < 5, including the center object.

oosyrag's avatar

oosyrag

Member since 20 Feb, 2013

Twitter
oosyrag has 38 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

21/44
How to earn trophies