WASD or Arrow Keys for movement!

For the 2024 7DRL challenge I decided to build my own vanilla JavaScript Roguelike Engine that is immediately cross-platform, light-weight, pure ASCII, and can be played online easily. 

The engine currently meets many of the baseline requirements of a Roguelike:

  • Procedurally generated levels
  • Turn based gameplay
  • Grid based movement
  • Permadeath
  • ASCII
  • Dungeon Crawler
  • Hack and Slash
  • Non-Modal
  • Resource Management

After working through the incredible Broughlike Tutorial, which meets nearly all of these requirements as well, I decided I wanted to take a similar approach but to a more traditional dungeon-crawling roguelike. This is the result, although not yet finished, I'll be putting more finishing touches on the engine itself right up until I start work on an actual game in it for the 7DRL. Please provide feedback on what features are missing, as I'll try to list them on this page and update them as they become available. 

Again, thank you to the incredible Jeremiah Reed for his initial Broughlike Tutorial that was the major inspiration for this engine and project.

Features thus far:

  • Random Map Generation (functionally for any size you want but I recommend staying below 40x40 per room right now, larger may crash at the moment.)
  • Custom hand crafted map use - Although the game/engine currently uses a random map generation, those maps are turned into a human readable map structure in the code (you can use dev tools to actually cheat on the engine and find the map array without having to explore, a debugging feature). You can change the code to import your own maps. I currently have two sample ones in the code, just comment out the random map generator and tell it to use the hand drawn maps in the mapInUse variable.
  • Look feature - where you can see names/descriptions of things on the game. (added 2/27)
  • FoV/LoS - Variable Field of View and Line of Sight Restrictions so you can't see indefinitely or around walls. Of course, you can disable this if you want people to be able to see the whole level.
  • Random item spawning.
  • Randomized enemies (can set different attack/hp values in a simple random enemy spawning formula.)
  • Progress from map to map - Hit the stairs (>) and automatically be taken to the next level of the dungeon where new layout, enemies, and items await!
  • Permadeath - No save scumming here. Die and you restart.
  • Message Log system - Although it's currently commented out in the code, you can have a running message log system where the current running version has the item inventory displayed.
  • Improved Enemy AI - Now a node-based pathfinding Breadth-First system. Was previously very rudimentary and player could fool it into becoming stuck.
  • Updated UI to allow for easier viewing of maps larger than 20x20 (2/26/24). Maps should still be kept below 40x40.
  • Tile System or pure ASCII. Simply press "T" to flip between the two. Obviously you'll need a folder structure to store a sprite sheet if you use tiles, so it's not "pure" one file at that point. You could always reference this to an online sprite sheet. The player @ can be flipped in the engine to show you how to easily add other tiles. (added 3/19/24)
  • Arrow keys and WASD movement support.
  • Mobile touch screen swipe support added! (Buggy, as if you swipe down too far it'll reload the page, but functional. Still need to add inventory support with the numbers...) 3/22/24
  • Improved UI, no longer have UI elements collide with the game map if browser window is stretched too far. (4.1.24).

To be Added:

  • Swipe support for movement, double tap on item number to use listed item. partially implemented as of 3/22, see above.
  • More comments/improved comments - I've tried to comment as I've worked but it's spotty, I know. Will make a conscious effort to improve documentation for ease of reading.
  • Save game progress to browser.
  • Release a tutorial walking through the entire engine, piece-by-piece.
  • Simple image implementation system (in the spirit of keeping the engine just an index.html file will likely require you reference images hosted online).



Download

Download NowName your own price

Click download now to get access to the following files:

Vanilla JS RL Engine.zip 13 kB

Comments

Log in with itch.io to leave a comment.

(+1)

I like!

(+1)

Thank you! Let me know if there's anything specific you'd like me to work towards adding that's not currently there.