oosyrag's Recent Forum Activity

  • I'm not familiar with 3d noise at all, but it makes sense to me, since the noise distribution should be similar to x and y as it is on the z axis.

    If you map points on a sphere or cylinder in 3d space to correlate to points on a 2d plane (a monitor screen's pixels), then you'll have wrapping noise. A cylinder would wrap one way, while a sphere would wrap both ways.

    So the algorithms given should be answering "For each x/y pixel/position, where is the proper x/y/z position in 3d noise to get a value from?".

    Function part 1, mapping coordinates on a sphere or cylinder - input x/y, return x/y/z

    Function part 2, 3d noise - input x/y/z, return noise value

  • I put up a bug report, it's being looked into.

  • I feel that using 1 less noise calculation could be very beneficial for performance in the long run.

    Not much to do with performance. Using the same set of inputs for different noises mostly just looks more readable on the event sheet for your own sanity.

    But you could try changing the seed using set seed instead of offsetting the input values.

    One of the few places it would matter is for cellular and Voronoi noise, since they correlate to each other at the same inputs.

  • Here's an example project with the basics - dropbox.com/s/4q45kbokanulfvo/LayoutsAndDoorsExample.c3p

    The key components of doors and portals are:

    1. Where are you going - Usually stored as an instance variable in the door. This is used to change to the correct layout.

    2. Where did you come from - Can be stored in a global variable or an instance variable in the player object. This is used for positioning upon entering a layout

    Optional - A second instance variable identifying door pairs if you have multiple doors that go between the same layouts.

    3. Active state - A triggered state so you don't "bounce" back and forth between doors. You can use a timer like you had (not recommended), user input (what I had in the example), or offset the destination/spawn location per lionz suggestion.

    I use a single object for all doors, considering they are all functionally the same. If you want to have multiple objects for doors, then put them all in the same family and use the family object for your event sheet logic to keep it just as clean.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you're interested in further reading, the patron saint of procedural generation Amit Pai and Red Blob Games has you covered.

    redblobgames.com/maps/terrain-from-noise

    redblobgames.com/articles/noise/introduction.html

    www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation

    redblobgames.com/maps/mapgen4

    simblob.blogspot.com/2018/08/mapgen4-goals.html

    He's got a billion and one articles on procedural map generation and he fully documents and references every step.

  • It's not so simple... especially since there are many ways to go about it, depending on the requirements of the game you are generating the map for and your own preference of the end results.

    gamedev.stackexchange.com/questions/186194/how-to-randomly-generate-biome-with-perlin-noise

    But if I had to boil it all down, first I would use Perlin noise to generate a topographical map, then modify (multiply) the resulting values by a modifier determined by the Voronoi value at each position.

    Understand that all (2d) noise is, for any given given input (x/y coordinate set), a value is returned based on the noise algorithm used. So if you have apply Perlin noise in an area, every coordinate will have a value that corresponds to its elevation, or whatever else you desire. Those same coordinates will also have a different value according to Voronoi noise.

    So lets say if you decide all Voronoi cells with a value of less than .5 is an ocean, you would first get the elevation of x/y from the perlin noise, then check that if that x/y is less than .5 in Vornoi noise. If it is, multiply by .1, thus the final value will end up "lower" than the cells that are not oceans.

    Layering additional noise is similar. Lets say you don't want such a sharp cutoff between land and ocean. Notice cellular (Worley) noise has the same borders and cell shapes as the Voronoi noise, but lower values towards the center of the cell, and higher values at the edges. You could invert this, and multiply the biome modifier from the Voronoi noise by the value from the cellular noise. The result would be that there is less of an effect near the edge of the cells, and a greater effect towards the center.

    The returned values can be anything you want, not just elevation. For example, you could use Voronoi noise to determine "Are there trees at this coordinate or not?", or you could use classic (Perlin) noise to determine "How dense are the trees at any given coordinate?"

  • That would be Voronoi. Probably with some adjacent cells joined together to make it more irregular.

    There are algorithms to make the shapes more regular, but not so much irregular. Or of you just want larger cells, just zoom in/scale your input.

    Alternatively, you can try perlin noise with the outputs rounded to the nearest increment of your choice, but that would probably be worse.

  • Are you still interested in this Newt? I got super distracted playing with the new 3D shapes feature but I revisited this after the other post about the advanced random plugin bug. I've got a working example that can pull the node coordinates and voronoi vertices (right click to calculate and plot the vertices).

    dropbox.com/s/fem59cdrowu4ig3/Noise%20graph-voronoiscript.c3p

    The edge and cell information is also there but I don't really know how to utilize them at this point. They're available though!

    The points may not match the output from the advanced random plugin exactly, since the resolution of finding the node origins only resolves to the nearest pixel, while the actual points are probably not whole numbers.

    I also ran into some issues with fullscreen scaling and the drawing canvas coordinates when the window size doesn't match the viewport size. Not sure how to resolve it yet so I just left scaling off for now.

    No...

  • Does adding the persist behavior help?

  • Try matching the origin image point on each of your parts. So for the head, it wouldn't be in the center of the head, but where the center of the body is relative to the head. Then when you mirror the body and the head, they will flip to the correct positions.

  • I take that back, its probably a bug (possibly faulty implementation?) or at least a limitation of whatever Worley noise algorithm was used (Voronoi is generated from the same base noise as Worley, so it is also affected). I don't see it happening with the other noise functions with negative inputs.

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