d3caster: A 3D Browser Gaming Engine

d3caster is a 3D gaming engine in pure Java, featuring

  • a 3-D render core based on raycasting, without the need for special libraries, plugins, browsers
  • high-color (32K) textures and images with dynamic loading, allowing a short startup phase
  • dynamic light effects (e.g., on explosions), game objects and object collision handling
  • sound support for new and old browsers, also including Ogg Vorbis compression
    It is thought as a method to create everywhere-compatible 3D games,
    as long as Java 3D is not supplied, by default, within every browser.

Find the engine here, together with an instant demo game:
http://stahlforce.com/dev/

All available for free under GPL license, including some graphics and music (also created by me).

If anyone tries some development with the engine, please post questions,
feedback and announcements as a reply to this thread.

Looking at the floor in your screenshots it seems you have some kind of rounding error in the renderer.

i think it’s a little inprecision during float to integer conversion. the sreenshot’s resolutions are rather high (1600x1200), multiplying these little errors massively. however, in the usual game resolution of 620x300 it cannot be seen.

Nah, I think it’s some problem with rounding. Look at the floor on this pic: http://stahlforce.com/games/desks/realtime-moving-grey-concrete-grass-tubes-1600x1200.jpg. The texture looks ok in the up-left direction, but in the up-right direction it’s very jagged. You use integer maths, right?

I seem to recall a similar problem I had when creating a Doom engine many years ago. Can’t remember how I solved it though… ;D

Rounding, truncation, convertion… it all adds to accumulation of small errors. I use a mixture of doubles and pseudofloats - integers representing floats, left-shifted by 16 bits. Anyway, this engine isn’t about perfect high-res images, but about feasible, real-time 3d working within a browser. Whoever needs graphical perfection might be better off with local-installed Java 3D applications.

the d3caster package is now available with some severe updates, like

  • walking enemy bots
  • light source objects (lamps)
  • more detailed dynamic lightmap
  • sound on near pass-by of a rocket
  • dynamic sound loudness, depending on distance

http://stahlforce.com/

http://stahlworks.com/ext/aa2-snap-1.jpg

Nice stuff, although your instant demo crashed my browser (I.E. 6 with the built in 1.1 JIT).

I have been working on the same goal (real-time 3D in any browser) in my spare time, but I guess you could say mine is more of a Quake approach. That is, real 3D with light-maps. You can check out my latest incarnation at:

http://www.freestandingentertainment.com/chance/test3/

I tested d3caster with

  • a current IE 6 with a current SUN Java plugin (1.4.1)
  • Netscape 7 with a current SUN Java plugin
  • Netscape 4.79 with it’s supplied JDK 1 (WinXP and Win98 )
  • Mozilla Firefox (WinXP)
  • Mozilla 1.x (Win98 )
    and everything runs fine. Could it be that you’re primarily using Microsoft VM’s? MS is not Java compatible.
    Your demo, vice versa, crashed my Firefox… nevertheless, I would be interested in having a look at it.

I just fired it up in FireFox with 1.4.2_03 and it ran smooth. Hmm.

Finally! I got your thing running with Netscape 7 (don’t know yet what the problem could have been). I will try again later with Firefox.

The graphics are looking great. But it’s not a real game yet, is it? And I think that quake movement control (W, S, A, D plus mouse) is not so suitable for an applet - as you are forced to always keep the left mouse button pushed.