Asset - Scripts 20% OFF [Jen_scripts] Procedural Terrain Generation

[Jen_scripts v2.0]
Asset for Procedural Terrain Generation


Purchase from the Marketplace
Jen_scripts is currently 20% for the release of v2.0!

[Jen_scripts] Asset for Procedural Terrain Generation
Created by Cloaked Games
Jen_scripts is a function library asset designed for rapid prototyping and development of procedurally generated levels. It contains over 60 iterative functions that can be combined with flexible parameters to create varied, organic, terrain. Jen_scripts supports geometric shapes, and simple randomized distributions, as well as utilize higher-level algorithms to produce a limitless variety of patterns within a 2D grid. The data can then be interpreted as object indices or tilemap data to convert into terrain in your room.

Want to create a lake? Try jen_ellipse and jen_near. Want to create a river? Try jen_wander_direction or jen_wander_line. Want to create a cave? Try jen_automata. Want to create a maze? Try jen_maze_prim or jen_maze_backtrack. Want to create a building? Try jen_grid_room. Want to create an island? Try jen_heightmap_sampling. Something more complicated? Combine the functions together to form terrain that fits your ideal design, using optional arguments for extra flexibility.

Features:
  • Create lines, shapes, and blobs.
  • Create a wandering path between two points or in a direction.
  • Maze generation with Prim’s Algorithm or Backtrack Algorithm.
  • Cave generation with Cellular Automata.
  • Heightmap generation with Average Sampling or Gradient Scattering.
  • Copy sections of your rooms to incorporate hand-crafted content.
  • Tilemap support and programmatic autotiling.
Documentation: [Jen_scripts Documentation]
There is full documentation for every [Jen_scripts] function, including example code. You can read the documentation here.

Download the Demo: [Jen_scripts Demo]
Want to see what [Jen_scripts] is capable of? Download this project and you can see a variety of terrain for yourself that can be created using this asset.

Introduction to Using [Jen_scripts]: [Jen_scripts Tutorial]
Confused or just want to know more? This includes step by step instructions for basic tutorial, and some complete terrain examples you can use as additional resources.

Active Support: If you have questions, suggestions, bug reports or any other feedback, this is the place to do it! I will be continually answering any questions people have and improving the asset over time. If you have a question concerning your purchase or something you wish to discuss only with me, please feel free to send me a PM on this forum.

Terraria Style.jpg Dungeon with Treasure.jpg Islands in Ocean.jpg Cave with Ore.jpg River through Chasm.jpg
 
Last edited:
Very interesting. I notice that the 'resolution' and overall detail is rather low. Is there facility to increase this? For example, I'd like to approach something similar to a height map from Google Earth.
 
Unfortunately, not really. [Jen_scripts] is designed for small pieces of terrain, like a rouge-like level or a survival island map. You could connect multiple ones together. But while it can handle a fairly large room, generating very large pieces of terrain (especially with the heightmap functions), is probably not going to work for you. It doesn't run asynchronously.

In addition there aren't very many options for heightmaps yet. Those will be added eventually, but at the moment, you just have the one.
 
Last edited:
I have finished the first update for [Jen_scripts]. There were a few things that I had wanted to do before, but I didn't really know exactly how to implement them. Turns out it was really easy and only took a few hours, but here we go, version 1.1.0, with five new functions:
  • jen_number: allows you to create a specific number of instances at random positions.
  • jen_scatter_offset, jen_number_offset: allows you to create instances offset from the original location. (Good for platformers. You can do things like add torches to the floor of a cave like in Terraria).
  • jen_scatter_apply, jen_number_apply: the same as the above, but you can actually apply entire grids, like pre-built structures or randomly generated trees at positions within the terrain. This I've found to be pretty powerful for more advanced terrain, and actually simplifies a lot of the code I used in the demo by significant amounts.
Thanks to everyone who's bought the asset so far, I appreciate the support. I hope it has been working out for you.

If you haven't bought it yet, there's several resources available so you can learn more.
Finally, an example of the non-terrain use of [Jen_scripts], in the GMC Jam #8 just recently, I and @Pere submitted this game, The Hoard. I used [Jen_scripts] to generate the randomized army formations you fight. It only took me 10-15 minutes to do the actual code work because jen_apply and jen_grid_room_array made things so easy.
 
GML 2.3 is now released. By the end of this week, I will be updating [Jen_scripts] to use the new syntax, and fix the conversion errors. (Currently, the asset will not compile on 2.3).

Additionally, over the next few months, I will be releasing updates with new features. I have a few things in mind:
  • More heightmap options, including Perlin noise.
  • Templates, which are sort of like advanced grids, for creating levels with variations.
  • Layered function calls, which replace chance functions and provide more flexibility.
Please stay tuned! I hope to make this an even more powerful set of scripts very soon.
I recognize that this asset was published two years ago, but I think I did not really have the skills to update it properly until now.
 
Version 2.0 Release (20% OFF)
Jen_scripts v2.0 is now released and can be purchased on the marketplace page.
Additionally, it will be 20% for a short time to celebrate this new major version.

This update is primarily designed to update Jen_scripts to support GML 2.3, as the 2.2 version of Jen_scripts does not convert flawlessly to GML 2.3. This new version will also not work on earlier versions of GML. The old 2.2 code will remain available, but it will remain on v1.1 and will receive no further updates.

Some features have been updated or expanded upon. There are new features and some improvements to existing functions. The main improvements include:
  • Wandering line feature now has two more powerful functions to use.
  • Heightmaps have been improved, and a second heightmap option has been added.
  • Programmatic autotiling is now supported with jen_instantiate_autotiles.
  • Scale a grid to be larger or smaller using jen_grid_scale.
  • All data structures have getters and setters for more fine control.
  • All data structures have their own create and destroy functions--please use them!
  • Most functions have been rewritten and optimized to be more efficient.
  • Custom function parameters are reworked and are now much more powerful.
There are full update notes here: v2.0 Update Notes. Please check this document before updating, as some old code is no longer supported.
Also, the documentation has been fully updated, you can see the v2.0 Documentation here: Jen_scripts v2.0 Documentation.

Overall, this update includes many new powerful features, and the asset in total has over 60 different functions! I hope you find it useful.
There will be more updates over time--next, I will be working on noise functions, among other things.
 
Top