JenScripts - GameMaker Terrain Generation
A downloadable library
Version 3 is in development. Progress: 80%
JenScripts is a GameMaker Studio 2 library 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 terrain. JenScripts supports geometric shapes, randomized distributions, and other algorithms to produce a limitless variety of patterns within a 2D grid. The grid 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: JenScripts Documentation (With example code!)
Active Support: Post a comment here OR on the GMC Forum Thread. Or post an issue on GitHub. If you happen to have a contact for Cloaked Games on Discord that works as well!
Supported Versions:
- GameMaker Studio 2 (GML 2.3+)
- v2.0.0 requires GML 2.3.0+
- v2.0.1 requires GML 2.3.3+
- v2.0.2 requires GML 2023.8+ (not tested)
Status | Released |
Category | Other |
Rating | Rated 5.0 out of 5 stars (2 total ratings) |
Author | Cloaked Games |
Made with | GameMaker |
Tags | 2D, GameMaker, generation, gml, library, Procedural Generation, procgen |
Code license | MIT License |
Download
Click download now to get access to the following files:
Development log
- JenScripts v3 Progress Update [60%]Oct 19, 2023
- JenScripts v3 Progress Update [36%]Sep 20, 2023
- Jen_scripts v2.0.1Aug 24, 2021
- Jen_scripts Released on itchioJul 28, 2021
Comments
Log in with itch.io to leave a comment.
This is great! I would like to see the generation code in the screenshots
Thanks! An excellent suggestion, I'll see what I can do when I next update the screenshots--probably after the v3 release.
I've been absolutely loving this! However, after the GameMaker 2023.8 update, jen_grid_instantiate_layer is no longer working for me
Glad it's useful! I'm still working on a big update so can't guarantee support for 2023.8 quite yet. But, I should be able to help you out. Are you seeing a specific error?
I believe I fixed this issue, at least for jen_grid_instantiate_*. Please try importing the new v2.0.2 version and let me know if that works.
The issue was the change from number to ref for assets, so the is_real() check was always returning false. I replaced it with object_exists().
Thank you so much! This fixed the problem I was having! I wasn't getting any specific errors, no, just that the objects weren't there when the terrain generated.
super happy to have found this!
Glad it's useful! Let me know if you run into any issues.
no issues so far, honestly its amazing. Im working on a roguelike and one of my only real issues has been understanding procedural generation and making it look good, im just not great at it. But this library of functions and how easy they are to get started using... wow. thank you.
oh