Jump to content

  • Log In with Google      Sign In   
  • Create Account

"Best" way to do roguelike in javascript


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 speciesUnknown   Members   -  Reputation: 527

Like
0Likes
Like

Posted 05 April 2012 - 02:58 PM

Hi,

For the next Ludumdare competition I've decided I want to do some kind of roguelike game. Not necessarily set in ancient times with monsters and the such (it might possibly be contempory). But, I wanted to do this in javascript as a learning experience. The main question is, what would be the best way to do this? I can think of a few options. I've done a big project in javascript before, but it wasnt for a game, and for graphics I was using dojox.gfx which was an experimental wrapper for both canvas (pre HTML5) and the proprietary MS / Adobe one that everybody used to complain about; I've not done something in pure text before.

For those not familiar, a roguelike is a top down, turn based game where the characters and environment are represented using ascii characters.
For example, this would be a guy in a 3x3 room:

#####
#   #
# @ #
#   #
#####

This is a guy being attacked by 3 dogs in a room where the door has inextricably locked itself:

#####
#dd #
#d@ +
#   #
#####


Because its not using sprite graphics, this changes the approach I might need to use when rendering the game. I've done this type of game in other systems, so the technical side is not an issue, its more a case of getting performant drawing on the largest number of machines possible. As far as I'm aware, there aren't a lot of browser roguelikes implemented in pure javascript; usually they use flash, java, etc.
Don't thank me, thank the moon's gravitation pull! Post in My Journal and help me to not procrastinate!

Sponsor:

#2 Tincha7   Members   -  Reputation: 169

Like
0Likes
Like

Posted 07 April 2012 - 12:59 AM

You have a couple of really simple choices in front of you here. First, you could use flash or java which in my honest opinion is not the right way to go. If not plugins, you could use the canvas but it'll be quite a headache to draw and place text inside it. If I were you I'd do it inside HTML, take a div, assign an appropriate font to it, place it wherever you want it, and edit the text inside it on every update! Just take care of the fonts you use, preferably mono space.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS