Mage Wars (Complete)

Final (I hope) ;D

-Sky now changes to dusk to herald your impending death.

Unsigned pack200 file is 4093 bytes.
http://homepage.ntlworld.com/alan.d.waddington/java/competitions/java4k/2011/MageWars4k_kzip128.jar.pack.gz
The unsigned version can be played (if you set up a suitable web page), but multiplayer doesn’t work.

If you want to see the source, here it is:
http://homepage.ntlworld.com/alan.d.waddington/java/competitions/java4k/2011/M.java

Just tested this on my Dad’s iMac (2.66GHz Intel Core i5 OSX 10.6.5) where it works fine. Also Java4k.com also works on this machine.

Minor bugfix uploaded to Java4k

(If you collided with a wall, while you appeared to stop, the velocity information transmitted over the network wasn’t zero’d and you appeared to continue moving to all other players. Now fixed)

Unsigned Pack200 4087 bytes (Actually a bit smaller than the previous release!)

How does the 3D rendering algorithm work?

It’s been a month (sorry), but in case you still are interested…

It’s raycasting through a terrain height-map sampled for a non-linear set of Z-depths, resulting in an effect a bit like stage scenery. i.e. there is a set of flat scenery for a range of discrete depths. This results in drastic undersampling at long distance, but in practice it isn’t really distinguishable from the ‘normal’ X-Y undersampling you get at long distance, so it works better than one would think. Oh and there’s a second set of height-map sampling through any objects that are in view. This allows for rotation of objects around the vertical axis, with the result that players and enemies can turn around. The fireballs are overlayed on afterwards, using a Z-buffer.