i had a dream last night about coding a game engine

so then i coded it

the above is a kind of a test game for the engine, and also a story about how the engine happened

if you want to make a game in nswengine, you can hit the download button on this page to get the source code

the newest version (less stable) is also available on github: source

you can refer to the README.md file in the repository for tips on how to create a game, and Dragon Wasabi Potato wrote a cool article on how to use the engine (note: article is in japanese)

also i started a collection for games built with this engine, so if you make anything let me know and i'll add it there for freeeeeee

---

CONTROLS

arrow keys/ mouse click/ touch to navigate between rooms

---

update v1.1 (17/12/2025) - added support for mouse/ touch controls

update v1.2 (19/12/2025) - added ascii support and outgrabe chamber in the game

update v1.3 (23/12/2025) - migrated away from html canvas for better accessibility, added fullscreen and mobile support

Updated 28 days ago
StatusReleased
CategoryTool
PlatformsHTML5
Rating
Rated 5.0 out of 5 stars
(9 total ratings)
Authorpeb
GenreInteractive Fiction
TagsGame engine, Open Source, Simple, Text based
Code licenseMIT License

Download

Download
nswengine_v1.3.4.zip 15 kB

Development log

Comments

Log in with itch.io to leave a comment.

Howdy again friend!

I am thinking of using your nswengine to experiment with making a quirky lo-fi platforming game. A fool's errand, to be certain, but it would surely make for an interesting project!

Is there a way to implement the W, A, S, D or arrow keys to select choices? In so doing, one could theoretically use this as a d-pad that is more suitable for a project of this scope and it may even extend the engine in a great way!

No pressure on implementation, just a pipedream of mine and you can take it or leave it--my feelings will remain intact! :)

Nswengine is such an awesome little tool and I am excited to explore it further.

hi Outgrabe! it is a fool’s errand and i can almost smell the suffering you would have to go through to achieve such a thing, but it is not in my power to stop you!

the engine already accepts arrow keys input to select choices, but if you want for it to accept both arrow keys AND wsad input, then do this:

  1. download the current source using the download button on this page
  2. go to this file https://github.com/pebonius/nswengine/blob/wsad_keys/source/nswengine.js
  3. use the “copy raw file” button at the top to copy the content of the file
  4. replace the content of the nswengine.js file in your source with the copied content

when you run the game, it should then accept both arrow keys and wsad input!

(1 edit) (+1)

Thanks peb! Arrow keys would be sufficient, but I may just implement WASD just for giggles.

I tend to be a zealot for self-destruction and your warnings--while appreciated and sincere--only manage to propel me further in my mad dash to oblivion!! :D

Will we see the first nswengine platformer game yet? Time will tell... Maybe somebody else can beat me to it.

(+1)

this is such a cool idea that engages with spatial forms in games. good enough for text adventure games but its also interesting to see how this can be used in mazes and complex architecture

thanks! ppl seem to be having a good time using nswengine for simpler games, but to be honest i feel like for more complex things editing the json file by hand could get a bit too fatiguing. i won’t discourage anyone from making bigger stuff with it, but i think maybe you’d need to create some sort of a script that would help you generate the kind of results you want

(2 edits) (+1)

This engine is so evocative with just the right amount of arbitrary constraints that really make it a dreamlike experience.  

My first  instinct was to make use of this oneiric engine to present some dreams of my own, so I made this little zine: Violent Dream Games

(1 edit) (+2)

this is just great! not only that you used nswengine but also that i had a new MindApe experience to check out, i loved it!

(1 edit) (+1)

we are all lead-less horses at the river, downstream from a thunderstorm, waiting to drink from the mindape flash flood fire hose

(+3)

This is a-maze-ing!

Figuring it out at the moment. I'm realizing that in order to make the game in my mind with ASCII art and multiple strategically-placed characters, I will need to know how to make breaks between lines. Any idea on how to <br>?

I'm very eager to put this tool to use!

(2 edits) (+2)

I'm also having trouble with the text being centered. I would like to align the text to the left, if at all possible. Would I be able to manage that within style.css or somewhere in the source folder?

Thanks!

(+1)

hey thanks! i would love for you to use the engine! i think i know what you’re trying for, i will try to cook up a new version today with ascii support

(5 edits) (+1)

you can download the source again now, and look for the “ascii support” section in README.md :)))))) i think that should do the trick

EDIT: ah, i didn’t have time to test it too much so if you come across any bugs let me know!

EDIT2: also mind you will have to escape some of the special characters like backslashes in each of the strings in description array, otherwise jason (json) will get angry!

EDIT3: if you play the test game here again, you can find a special chamber!

(+2)

omoshiroi.

(+1)

glad you found it omoshiroi!!!

(+2)

This is fantastic! :D

(+1)

yaaay thanks!!