[PLUGIN] Roguelike plugin - C2 rot.js interface

1 favourites
From the Asset Store
[C2] [C3] support C3 build service | support Banner ads, Interstitial ads, Rewared video ads.
  • For all Roguelike fans, here is an early work in progress version C2 interface to an excellent rot.js javascript roguelike library.

    "Generate map" action generates the map data and stores it in the plugin internal dictionary (the plugin is based on the Dictionary plugin): the key represents map coordinates and is of the format "x,y" (e.g. "12,34"); the value is a text character - "." for floors/passable tiles and "#" for walls/solids.

    Plugin can compute a discrete (map cell based) FOV (Field of vision) from a given map coordinate:

    Plugin can compute a discrete (map cell based) path (Dijkstra algorithm) from a given map coordinate to a given map coordinate:

    Configurable room width & height and corridor length:

    Loop through all rooms and access room edges and center (useful for a map object placement):

    Added door hooks. You can get X & Y coords foor each room's door...

  • That is really neat. Thanks for sharing!

  • Glad you like it Please test it if you can and send comments and eventual feature requests: rot.js is a feature packed library. I'll implement those features not covered by C2 first.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the effort, I hope I can get to try it soon. Roguelikes are my favourite.

  • You're welcome

    The plugin is functional / usable. I still have to add OnMapGenerated, OnPathComputed and OnFOVComputed triggers. Also, there are some neat options for customization of map generation: max/min room size, max/min corridor length, etc. Hope to add all of these in a few days...

    Afterwards, it's testing, testing and testing And finally making great Roguelikes in C2!

  • This looks great! Thanks!

  • You're welcome! Currently adding configurable rooms and corridors...

  • Thanks for such a great plugin!

    will the plugin allow to set doors, locked doors and the keys for this doors in a reachable area? that would be really cool!

  • Was about to ask same thing

    One more question, Could you put some noticed on that ""." for floors and "#" for walls" somewhere inside a plugin? or even make it as a separate expression "room", "floor" etc, so it's always easy to access and remember this values.

    Besides that I was playing with it for a half a day now, and it gives great results! Once again, Well done!

  • fldr, you are welcome! As for the doors, the plugin will actually let you get an array of rooms and corridors, and door coordinates for rooms (junctions of rooms and corridors). Afterwards, it will be on the user to decide what he/she wants to do with the door locations.

    shinkan, I've just added a notice to the "Generate map action". Thanks for the suggestion. Thanks for the congrats ) go to me, the javascript logic behind the plugin is made available by the rot.js javascript library author...

    P.S. I've just added the improved version 0.5.0 of the plugin...

  • Yes and no, because someone still needs to translate .js into a C2 plugin, which is not that easy. So all congrats are well deserved

  • Thanks for sharing!

  • Great!

  • Thanks! I've just uploaded the near beta release. You can now loop through rooms and get room edges and center... Very useful for object placement...

  • and it gets better with every update

    Is there a way to set "number of rooms to create" and "size of the corridors" (currently all corridors have size equal to one tile)?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)