Tuesday, July 15, 2008

level editor is nigh

There was a strange bug disabling fancy effects like gradients. I also have the folks at Mozilla tracking down the bug. Once I figured out that the problem was capitalization, a workaround was trivial.

Although there tons of features that I would like to add, such as enemies and weapons, the top priority now is to get this thing off the ground. So now it is time to build the level editor. Today I worked on the UI portion, which you can see by clicking "Edit" in the lower left corner of MeshMaze. It is currently non-functional, but "Save" button at the bottom of the sidebar does take info from the Level tab and package it into code.

Friday, July 11, 2008

mouse support

I can now determine exactly where on the map you are clicking, using a complex calculation of pixel offsets and unit conversions. To test this feature, the character will now move to where you click, although this will be restricted in the future because it allows you to cheat.

I am also up to 750 lines and over 20kb of code!

Thursday, July 10, 2008

camera fixed

I spent the entire day making the camera move smoothly. I had to dig deep into the internals of jQuery. Here's my saga, if you're interested.

graphical progress on MeshMaze


The best new feature is that custom graphics can be defined by a snippet of SVG. Before, it had to be done programmatically.

Although you don't see it, layers are working now. Objects can only interact with other objects on the same layer. (Inter-layer interaction might be useful.) Layers can help the level look more decent.

There is a new kind of portal that will send you to a different spot on the level as opposed to sending you to a different level. It can use relative or absolute coordinates. Or it can link to another portal (but if that portal is on the same layer as you, a chain reaction teleport occurs).

Objects can have different graphics depending on which way they are facing. You can see this with the default character, a green alien.

Movement is now smooth, using the handy animate method. For some reason, this method wasn't available for the svg viewBox, which is used to pan the camera view. I rigged my own loop to smooth out the panning, but I still need to perfect it or find another approach.

Tuesday, July 1, 2008

MeshMaze demo

In the past week I've been working every minute possible to get MeshMaze closer to completion. The levels can be any size (within memory limits), as well as the viewing area. You can push blocks, open gates with matching keys, step on land mines and die, and transport to other levels. I am quite happy with the system in place, because it allows flexibility in how objects can look and behave. I haven't put serious effort into the artwork, though--just placeholder graphics for now.

You can try 6 sample levels right now! I doubt if the game works in any browser other than Firefox 3.

To Do

  1. graphics layering
  2. Ajax level loading
  3. level editor