This addon is an implementation of the ROT.js library http://ondras.github.io/rot.js/hp/

This library has alot of features that assist with the creation of rogue-like games.

CURRENT FEATURES

  • Rng Expressions
  • All Maze Generation
  • Cellular Automata
  • Dungeon Generation
  • FOV
  • Island Detection
  • Multiple Tiles Setup

ROADMAP

  • Pathfining
  • Event Queue & Scheduler (needs a bit research)
  • Noise
  • String Generation (Markov process)

I have tried to take into account several ways, to deal with the generated maps, and have exposed different ways to interact with the map, currently all the generation action require a tilemap object, and the map is generated using the 0, 1 tileIndex of the tilemap (0 == floor tile, 1 == wall tile)

In the future i might add the same generation actions without the need for a tilemap, and have them just expose the data structure, which would require the user to populate the map using event. as of now this can be accomplished but there is the extra overhead of the population of the tilemap.

The included example project, is the project i used to test everything was working as expected, it has some comments, but every single expression,action,condition is used, and demonstrates some basic usage, and logs everything to the console.

Also i have test this plugin pretty well, but if you stumble on to a bug or some unexpected behavior let me know and i'll check it out.

Download

1.3 Stable (81.54 KB)

Info

Statistics

  • Download count486 total downloads
  • Latest download count 330 downloads of latest version
  • Average download count1 downloads per day average

Owners

  • 24 Comments

  • Order by
Want to leave a comment? Login or Register an account!
    • [-] [+]
    • 2
    • Fib's avatar
    • Fib
    • 2 points
    • (0 children)

    This.... is.... amazing! Thank you so much!

  • Very useful update. Thank you for this :)

  • Would it be possible to assign a room index number when generating a Cellular Automata. I'd like to figure out each little group of cells, are together and ideally how many are in that group.

    • I don't think that's supported by rot.js, but I'll do a bit of research and figure it out should not be 2 hard to implement, you pretty much just want groups of floor cells that are not connected and then you want to assign a room id to them and iterate their cells by roomid and stuff. I'll look into it

      • Thank you piranha! When using the cellular automata it creats nice little patches like spots on a cheetah. I'd like to be able to group those together into a room index or something so that i can manipulate all of them at once. eg: if player is overlapping roomindex = 1.

        Load more comments (1 replies)
  • It's "rogue". "Rouge" means "red" :)

  • When using the load / save in the example file, i get the following error in the console and it won't load

    Uncaught (in promise) TypeError: Cannot set property 'wallCleared' of undefined

  • You dont use variadic parameters do you?

    github.com/Scirra/Construct-3-bugs/issues/2155

    • No i created separate actions, to account for the multiple overloads that rot.js has, That's why you should see some generation actions with Simple or Advanced, the advance action is the same just with extra params. if there is a particular signature your need let me know and i can add it pretty quickly.

  • Nice work! How do I save the generated mazes for use in loading a game later? I hope to see this grow, as it will help me in my current project, for sure!

    • I haven't looked at the plugin, but generally, with randomly-generated maps, you can remember the seed that the map was generated from. If you use the same seed later, you get the same map.

    • That's on the road map, I will work on this this week. When I have a chance. Would you like to save it the maps as json?

  • Great! Thank you!