Description

Value Noise based procedural 2D island (and terrain) generator. Bitmask based autotiling example was added in v2 (see the changelog).

This modular script can generate islands, island shapes and terrain using Value Noise algorithm based on room, grid and tile size. Many variables to change the final output. Code is plentifully commented, to explain basic workings, and can be used to learn about noise generation in general.

Default output is built around drawing colored rectangles, but there is commented block of exemplary sprite usage (first screenshot). Technically final output can be used for sprites or instance placement with ease, so no limits there.

Basic knowledge of noises and math is still recommended for ease of understanding on how to change it to your needs. But generator itself can be used as it is and as a learning material.

Main generation is easily controllable from scr_gen_2dig(); in init script. Exemplar tiles and tilesets for autotiling are included. Templates for making your own tilesets for autotiling are included.

Tested in GMS 1.4.1657 and 1.99.466, with Windows and Windows YYC compilers. YYC compiler is much faster for obvious reasons.

Important notice: Value Noise is more random than Perlin Noise for example, so island shapes can sometimes be quite small with default settings. If you want more stable output for islands, you can change basic range of noise from (0, 1) to something like (0.3, 1).

Possible uses:

  • Learning how noise, interpolation, normalisation works.

  • Learning how to easily limit noise generation to island shape.

  • As a base building block for your game's world.

  • As a shape generator for use in your project.

  • As a smaller grid island generator for a full-scale world-building.

  • Code is split into main steps of generation, refining, autotiling and drawing, so you can easily change the output to your needs. Or even use parts of generator or autotiler in your projects.

End User Licence Agreement (EULA).

Changes in 2.0.2

  • Made some variables local, to prevent script conflicts (scr_at_bm_2dig).

  • Added forgotten comment in draw script (scr_draw_2dig).

  • Reset default script values (scr_init_2dig).

Changes in v2.0:

  • Postfix "_2dig" added to every resource in extension, to prevent harm if loaded into your project.

  • Added bitmask based autotiling example, based on http://gamedevelopment.tutsplus.com/tutorials/how-to-use-tile-bitmasking-to-auto-tile-your-level-layouts--cms-25673 article.

  • My approach to bitmask autotiling is based on grid checks, not on collisions. And works for several terrain types. It's not fully protected from generation artefacts, but everything is commented and explained.

Version 2.0.2. Published February 24, 2016

Created with GameMaker: Studio v1.99.466

Age Rating: 4+

Average Rating

Your review

You can only review assets you've bought.


Gravatar

Maciej K 17 June 2018


Gravatar

Anonymous 07 May 2018


Gravatar

Myles P 20 February 2018


Gravatar

alex r 22 December 2016

Perfect

perfect for my project.


Gravatar

Burney G 10 May 2016

It's a very nifty procedural generator

It's a drop in world builder that can create islands or land masses with smooth edges by using autotiles.


Gravatar

Alex M 10 February 2016

Surprisingly simple but equally efficient!

This asset is probably one of, if not the most efficient 2D island generations I've seen, very easy to understand and very well commented i would highly recommend this asset!

My only requests would be maybe a little example of auto tiling when it comes to using sprites not just colour, but other than that, brilliant!

PS: Would highly recommend Heartbeasts random level generation tutorials for a perfect match when it comes to these sorts of designs!

This review was left for a previous version of this asset.

Logo

TearOfTheStar (Publisher) 23 February 2016

*removed my old reply, to write this. 23 feb 2016*

I've updated it to version 2. It includes bitmask based autotiling example now. And resources were postfixed with "_2dig", so project structure less likely to mess when loading into existing projects.

Thank you again! :) And yes Heartbeast's tutorials are really good.

Package contents

Loading, please wait

What is the issue?

Back to Top