Thursday 16 June 2011

HTML Test II

So, over the past week I've added:
  • Scrolling the view when you get to the edge of it (allowing maps larger than the view area)
  • Objects that can be used to block movement
  • Objects that can be used as triggers (both on move over and attempt to move into when the space is blocked)
  • Triggers teleporting the player to other locations and other maps
  • Triggers changing the type of a tile (how it looks and whether it blocks movement)
  • Triggers displaying a message to the player
  • Multistate objects (different states have different behaviours)
  • Triggers changing the global state
  • Objects that are enemies
  • Both the player and enemies having health, hit chance and damage done
  • Displaying the health of the player and enemies in a health bar
  • Simple Combat of the player moving into the space occupied by an enemy
  • Displaying the results of combat as a message
  • Enemy movement
  • Enemy death
  • Player death resetting the game
  • Triggering a state change on enemy death

Edit: It appears that when viewed in the blog roll, my previous test overrides this one. I was kind of expecting something like this to happen, but the preview didn't let me test it. So, while I figure out how to fix this problem, if you want to try the new version, open this post in its own window.

Edit 2: After playing around for a bit, I got the correct display working, but the input was all being grabbed by the previous test. Then I discovered jump breaks. Horay for forcing the user to make an extra interaction before they can view the content!

Thursday 9 June 2011

HTML Test I

So I'm trying to teach myself html5 to see if I can make simple web games with it. Here's what I've done in the spare bits of time I've had in the past week (please note that I've only tested if this will run in Chrome, so other browsers are 'unsupported'). Use the arrow keys to move around, though there really isn't much to do yet.


No canvas support.