A book on programming Roguelikes with Javascript?

So, for a while now, I’ve been planning out a book on writing Roguelikes with Javascript. Unfortunately, there aren’t a lot of resources for RLs in Javascript at the moment, so the book will have to be pretty broad, as it won’t be able to build on previously established information. I will attempt to cover most of the aspects of writing a Roguelike in Javascript; the book will contain the algorithms that are most essential to writing a Roguelike.

What the book will be:

  • A cut-and-paste resource for writing JS roguelikes, with a large number of useful algorithms covered in-depth.
  • An introduction to the pros and cons of writing roguelikes in Javascript
  • A starting point for your own browser-based roguelike

What it won’t be:

  • An introduction to Javascript
  • A tutorial on how to write your own Roguelike
  • A statement on best practices for Javascript

What will the book cover?

Here’s a list of some of the major topics I’m hoping to cover in no particular order (some may be cut out due to length limitations eventually):

  1. Why Javascript? — where’s the logic in using Javascript for a Roguelike?
  2. File and data management — how to manage source files and data
  3. Display — several different paradigms you can use to display your game
  4. Main loop — the main loop of the game; this handles lighting, monster AIs, stuff like that
  5. Input handling — how to handle the input from the player
  6. Map generation – how to actually generate maps
  7. Map management – keeping track of what goes where on the map
  8. Lighting – lighting the map
  9. Items — how to handle items using object oriented programming techniques such as composition and inheritance
  10. Actors — keeping track of all the actors in the game
  11. Pathfinding — several different pathfinding algorithms such as A* and Dijkstra
  12. Actor AI — handling NPC behavior

That’s all, folks!

…except not really. This is just beginning, in fact; you can look forward to seeing more posts on this topic in the upcoming weeks and months. Thanks for the read, and as always, if you have questions or suggestions about the book, please be sure to let me know via comment or email!

http://safe-str.ru/products/seyf-aiko-tm-90t/ aiko tm 90т: мебельный сейф aiko. Hvac and air conditioning repair services in Union County hvac services Union County.

6 thoughts on “A book on programming Roguelikes with Javascript?”

  1. Haensel says:

    Hi Elliot,Just wanted to leave a comment here to keep you motivated :) Your examples are amazing and I really like the idea of a “roguelike cookbook” as it is a fun way to learn JS (and algorithms). Just one thing: You may consider moving your examples (and the book maybe?) to Github.com so people are a) able to easily read your code and b) able to participate and report bugs. Code snippets could be shared via “gists”. Nevertheless, thanks for sharing your thoughts. Really appreciated!

  2. Haensel says:

    Sorry, just saw that you are using gists already. Wanted to take a look at the A* star algorithm mentioned at http://heyjavascript.com/implementation-of-a-pathfinding-in-javascript/ which doesn’t seem to use a gist, so I mistakenly thought that this is the case for all examples. Anyways, sorry for me being so blind. Keep up the good work :)Hannes (Haensel)

  3. admin says:

    Hey guys, thanks for the support! I’m glad it sounds like my book might have some backing! I’ve got something in the works, so keep your eyes peeled for more posts coming up. :)As far as the 7DRL goes–I’m honestly not sure. It depends on my schedule, but I’m definitely interested.

  4. jusopi says:

    I’d buy it but 1+ for the github repo. Gist is great for troubleshooting say on stackoverflow but github would better serve discussion and sharing of ideas based on yours.

    1. admin says:

      Hmm, I would tend to agree with you there. And thanks for the support! :)