Day 4: Gameplay starts to emerge

Today I’ve managed to add different enemies and simple combat (it is possible to kill monsters and also die) and torch/item management (torch can be toggled on/off, it will only last 60 seconds after which it will automatically go off; there are limited supply of torches, but some can be picked up around the dungeon). These new features are a bit preliminary and quite hacky/messy, but it’s progress. I’ve also added some UI elements around the game canvas using HTML and CSS.

In addition to working on the gameplay, I added a pretty useless and crazy, but fun feature: You can press ‘l’ to “look around” – in first person mode, lol. See pic below. Note that the actual gameplay is still top-down.

First-person look-around mode
First-person look-around mode

Now I really need to come up with a name – suggestions welcomed.

If you want to take it for a test drive, guide your browser here.

8 thoughts on “Day 4: Gameplay starts to emerge”

  1. screenshot looks nice I was unable to test it though, my browser is chrome latest stable. I’ve run webgl demos before so it’s definitely enabled but your game gave me a message saying :
    Could not initialize shaders!
    Could not pack varying _vLightVectors

  2. Wow! The first-person look will make for great game screen shots! 😀 It doesn’t activate on my Chrome though.

    oh btw, you only need 3 steps to profit! ;D []

  3. I think I now have a clue why those “Could not pack varying X” errors occur: it turns out OpenGL ES / WebGL standard enforces a rather low minimum number of vectors interpolated between or passed to shaders. My shaders have a lot of lights, with lot of properties so I guess the limits (8 varying vectors and 16 fragment uniform vectors) are broken on many GPUs – and I’ve been unable to detect this as my mighty GTX460 seems to support a whopping number of 36348 each.

    So I’ll now need to strip down non-essential light properties and probably lower the number of lights, at least for those that have poor implementations.

Leave a Reply