0 Favourites

[PLUGIN] Noise 2.01b - Alpha Update 2

This forum is currently in read-only mode.
  • <img src="http://i55.tinypic.com/hwyfkw.png" border="0">

    Second Alpha Update!

    Relatively minor changelog - let's go over it real quick.

    <img src="smileys/smiley38.gif" border="0" align="left">Changed camera positions and size to decimal values rather than whole numbers, making it possible to zoom in much further than before by dropping under 1.

    <img src="smileys/smiley38.gif" border="0" align="left">Fixed camera north/south controls being inverted for some reason.

    <img src="smileys/smiley38.gif" border="0" align="left">Fixed noise tiling when not told to tile.

    <img src="smileys/smiley38.gif" border="0" align="left">Added many default values into the ACE Tables to guide you.

    <img src="smileys/smiley38.gif" border="0" align="left">Made it impossible for newt to crash Construct by overloading my Generate action.

    <img src="smileys/smiley38.gif" border="0" align="left">Download link has been updated, please report any problems you have.

    <img src="smileys/smiley38.gif" border="0" align="left">For those of you who are dipping under camera size 1 - and you can go as low as you like - I personally use camera size 0.1! You're going to have to drastically increase the detail now that your nose is practically in the dirt. However, you have to do so without raising mapsize or octaves too high - or performance will dive. Here's some tips for that. Raise lacunarity a tad. It will rough up the terrain and add a lot of detail. Lower persistence too - but don't overdo it, it'll over-sharpen if you go too much. We're talking lowering it by 0.025 here. You can also raise the frequency a bit. If you're creative with lighting you can also add some detail by raising the lighting contrast and lowering the elevation. And of course you can always raise octaves and map size if you are willing to take the performance hit. Just play around with it!

    Greetings everybody. I was recently doing some work on Void Runner, when it came to my attention that I needed seamless Perlin Noise. Seeing as I'd written the Perlin Noise plugin, I figured this would be no trouble at all - and indeed it was not, but during the process I realized how convoluted the Perlin Noise plugin really was. Expressions? Really? Grayscale? The reason I hadn't posted it here in the Plugins forum was because it seemed so rudimentary and rough. So I thought about it for a while, and I decided to update it with ten times the power, and ten times the usability. Behold - Noise 2.0!

    Features:

    <img src="smileys/smiley38.gif" border="0" align="left">Perlin Noise - Duh.

    <img src="smileys/smiley38.gif" border="0" align="left">Ridged Multifractal Noise - For those mountain ranges.

    <img src="smileys/smiley38.gif" border="0" align="left">Voronoi Noise - For texturing, or manmade formations, such as cities.

    <img src="smileys/smiley38.gif" border="0" align="left">Planetary Noise - My personal favorite. Perlin Noise wrapped around a sphere.

    <img src="smileys/smiley38.gif" border="0" align="left">File Support - Output to bitmaps, or use good old fashioned convoluted expressions for mathematical purposes.

    <img src="smileys/smiley38.gif" border="0" align="left">Color Mapping - Forget those old grayscale heightmaps! I mean, they are still there as an option, but now you can have color baked right in to the output. You can set the colors yourself or use preset landscape colorings that are included with the plugin.

    <img src="smileys/smiley38.gif" border="0" align="left">Lighting - Set the direction, elevation, color, brightness, and contrast, of a directional light that will be baked into the final image for the noise.

    <img src="smileys/smiley38.gif" border="0" align="left">Integrated Camera Controls - Set it and forget it. Did your player just walk off screen? Move the camera east with one action - the noise will seamlessly line up for you. The best part? You can do that as much as you want - it never stops. The world keeps on going baby!

    I had to change the name of the plugin to reflect that there is indeed more than one kind of noise out there. I have designed the plugin to be easy to use. You only need to use a few actions and you're off. However, for power users, every single detail is customizable. All the imagery up there in the header came out of Construct - powered by Noise 2.0!

    This plugin is based on libnoise. libnoise is LGPL, but the only person that matters to is me. You can do whatever you want with the plugin. I have provided libnoise in an unmodified state, as I only link with the library. Therefore no fancy legalwork needs to occur. You are free to use it however you like. I have provided a copy of the license for libnoise with the plugin.

    This is the first in a series of plugins I have planned that should help people make LARGE games. Go make infinite worlds. Make planets. GO FORTH AND PROCREATE. This wasn't about the money, so I'm not going to mandate anything on that end, but I'm going to put a Paypal donation link at the bottom of the post anyway. Donate what you want, if you want. It will contribute to the future plugins I will be making that will allow you to generate even bigger worlds. Note that I will not stop programming these plugins regardless. They are coming - you just may keep food in my stomach during the process. I work retail at Walmart, and my fianc?e has a very rare kind of cancer that has very expensive treatments and a very poor prognosis. We're barely making it. I feel not adding a donate link would be a disservice to her, as programming is my one and only talent.

    This first plugin is done - but it is in an alpha state. Play with it, look for bugs, and if you find any let me know here in this thread. I would like to get out of alpha here in a few days. I doubt there are any gigantic bugs, but you may find some. So post about them! I had recorded a narrated tutorial that was really cool, but we had to give up fast internet, so uploading a 40MB video is out of the question. The tutorial is in a crude text file zipped in with the release, but I gave you a CAP file to follow along with it. If you are confused about anything, ask your question here and I will respond as soon as I can.

    The plugin comes with an effect written by Shviller that allows you to use black and white noise to mask textures together, and a tutorial cap and text file that I wrote. Enjoy!

    Download Noise 2.01b!

    Donate!

  • Outstanding. I need to take my time to mess around with this bad boy.

    Thx so much Arsonide for all your efforts!

  • Thank you , This might come in handy for my next project.

  • I'm looking forward to getting some time to try this out!

  • I released a small update. At some point I am planning on giving the noise it's own visual component, whenever I figure out how to do that. It will speed up generation by a great amount, and of course lower the amount of objects in your caps.

    There are a few important fixes in the update - as well as a nice change to the camera that will let you zoom in much closer to the noise.

    Here's a little cap I whipped up pretty quick with the newer camera controls, control the wizard with the arrows - walk off screen to move around the world - and hit M to open your map. There are a lot of pretty advanced features of Noise used in this cap, so take your time looking around at it. I was thinking I could even use a large voronoi overlay to control weather systems on the world, but I didn't get that far.

    http://dl.dropbox.com/u/1032313/WorldWanderer.cap

  • newt smash!

    Um... I guess I did it again. There's a crash if you don't generate the noise before doing a compare.

    Sorry, but you can use my High Wizard if you like. heh

    <img src="http://dl.dropbox.com/u/666516/Highwiz.png">

  • This is a great plugin thanks, if it is possible it would be useful to be able to set the Perlin Quality and Tiling with a action.

    By the way i found that if you set the octaves higher than 8 or lower than 1 it will crash. It might be better to put a min/max limitation on that to avoid this. Hopefully you will like these suggestions

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • You should be able to set those options in the adjust perlin action, I will look tonight to make sure. Lower than one on the octaves makes sense, thanks. Higher than eight varies depending on your other settings. I have been up to 10 and 12 octaves at times.

  • I didnt know whether to post this here or in the infiniscape post. In the infiniscape post there was mention of this procedure to generate enemies, timelines, weather, etc. Im understanding how to do terrains, thanks to your examples. Ive made terrain, star systems, and even some nice looking nebulas.

    Now Im specifically interested in enemies (or biomes) and timelines. Something very much like legends mode and adventure mode in dwarf fortress. And how does one track these legends or specific enemies doings in the world from point A to point B? Or is it just random text events?

    Btw, thank you for continuing this plugin. The has opened endless possibilities.

  • I have renamed Infiniscape to "Grid Tree", and have been lightly working on it amidst many other projects. Grid Tree describes the layout of the data structure better.

    Noise could probably do biomes, depending on your layout, but it will not help you generate enemies or timelines. GridTree will help with those things. For now you can look for a plugin with an integrated Mersenne Twister. I know S has a Twister expression called "Seeded Random". Seeded random is what you are looking for. The difficult part is making sure your seeds stay the same within a given area of your world - and that is what GridTree does. It keeps track of seeds for you and gives them geography, so certain seeds pop up for certain areas.

    For TIMELINES - with my rudimentary version of GridTree within Void Runner, I utilized the UnixTime plugin. UnixTime will output a unique number for every second up until 2037 or something, so it's very good for what I call a "chronological seed". I utilize UnixTime with GridTree to give the chronological seed geological importance (simply by adding the seeds together in any way, or multiplying, or subtracting, whatever as long as they are mixed in some way.) You don't want every second to have a unique weather though, since weather has duration, as do historical periods and such. So what I did was generate what is called a Markov Chain with simple periods and random sizes: "||||||xxxxxxxx|||xxxxxxxxxxxxxxxxxxxx|||||||". We have a more complicated version of this that we use for ship AI that moves the ships around in the universe before they eventually despawn by getting destroyed. Instead of simple binary on/offs, you start at a position and the future points determine directions you move. "x^^><v^".

    Until GridTree is released, looking these things up will definitely prepare you for what you have to do. I am working as hard as I can, but I have many things on the pot right now, including GridTree, Muse (generates names and stories), and a patch to the Dungeon Generator that will let it generate natural cave systems and simple towns.

  • Woo hoo!

    I finally found some time to sit down with this, to see if I can use it for what I have in mind.

    I'm just testing out some of the features, like tiling, and I like what I'm seeing.

    Having fun with this.

    The only one of my tests that failed is the GetNoiseAt function.

    I notice in the first tutorial you released (which doesn't work since the update BTW), that you rounded the result and multiplied by 100 to get values between -100 and 100, but by doing the same I only get zero or 100 returned.

    If I leave out the multiply, I just get 0 or 1 returned.

    My test consists of a 128x128 sprite, creating a perlin noise map of the same size, and applying it to the sprite, which looks fine.

    But when using GetNoiseAt, it doesn't seem to return what I expect.

    <img src="http://www.smileydesign.co.uk/perlin.jpg">

    Ignore the second image box.

    It's scrolling, just so I could test the tiling.

    Any ideas?

    Krush.

  • You should be able to just multiply it by 100, as the output should be 1, to -1, and including decimals.

  • It looks like you are elsewhere rounding somehow, but I may be wrong. PM me the cap, and I'll see what I can do. If it's a bug I'll fix it, if not I'll fix your cap up for you.

    Also, just an observation. It's hard to tell, but the tiling of those two images looks a little off. Did you manually move the camera on that second image? If you did, it looks like you only moved it by the camera size. Keep in mind that to fully move a screen, you have to move CameraSize*2 in a direction. Camera size is a radius, not a diameter. If that makes any sense. Moving in a cardinal direction handles all this automatically. On second glance it looks like tiling is enabled on both of them, in which case camera movements won't matter at all, since they tile on themselves regardless of surrounding noise.

    Now I really need to see the cap!

  • I haven't messed with this at all krush, so i could be way off here, but if you round before multiplying by 100, you're going to limit your answers to 0 and 100 because anything between 0 and 1 will round to 0 or 1 and 0*100=0; 1*100=100

    you might have the order of operations reversed, so it's not

    round(arsonidething)*100

    it's

    round(arsonidething*100)

    if arsonidething always returns a value between 0 and 1, the first one would always be 0 or 100

    and the second one would always end up being a whole number between 0 and 100, like 80 or 14 as opposed to 80.5, or 14.6.

    hope that helps

    edit:not trying to 1up you arson . I had already gotten done typing this tho, so

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
1,941 263,208
FlyingRam's avatar
FlyingRam
Unread hot topic
1,068 148,625
Reflextions's avatar
Reflextions
Unread hot topic
0 Favourites
CocoonJS plugin updates
519 48,570
tuzke's avatar
tuzke