JGadget - fake 3d rendering in Java

Gadget3D, which was originally created for Game Maker (during Game Maker 4 [so I would assume 2004-ish]), was the game engine’s first “3d” engine, before they had support for directX. I found an old copy of it on my computer some months ago, and decided to recreate it in java, only adding more abilities to it. Basically, all this engine is, is a bunch of textured rectangles that are drawn at specific points (which are positioned by using simple trig.), and are sorted by depth. :point:

Controls:
WSAD = move
Space = jump
Ctrl = crouch
1 = pistol
2 = flamethrower
LMB = fire
Q/E = turn
G = change quality
H = change render distance
F = turn off/on fog.

http://gamejolt.com/online/games/other/jgadget-2-0/8323/
or
http://globalanarchy.net84.net/Java/JGadget/

It may be a little slow, not only because I use Java2D, but also because I don’t use it efficiently :slight_smile:
(feel free to decompile the source, and give me some pointers on how to make my draw calls more efficient).

Unfortunately there’s no FPS display. I have no prob in ultra, but I can feel it’s little faster when you use low. However, no matter quality you choose, big FPS drop on enabling fog.

Pretty good.

Added a fps counter :3
It’s maxed out at 30, the fps.
What are your computers’ specs, if you don’t mind my asking?

Hi

The applet cannot get the focus, then I cannot move, it comes from gamejolt. I get between 6 and 22 frames per second which is the expected result for a low resolution display in a small frame; if I could put your game into full screen mode on my machine, I would probably get about 0.5 frames per second. JGadget 2.0 seems nice to display simple scenes in low resolution inside a small frame in an unsigned application or applet (without requiring the permission of the end users to run) but there are already better engines using software rendering like 3DzzD and JPCT. If you used plain JOGL just to draw what you send to your software renderer (the pixels) or if you used GLG2D with JOGL, it would be faster but you would be forced to sign at least the JARs of these libraries.

If you plan to handle bigger scenes, I advise you to use hardware acceleration (and spatial partitioning) but JGadget 2.0 is already fine for your current needs, isn’t it?

Edit.: Disabling all extensions do not fix the problem. I use Firefox 10.0.5 under Mageia Linux 1 with OpenJDK 1.6. I see that gamejolt uses some Flash above the “java-applet-game-container” element. Please can you deploy your game somewhere else?

Seems to be running at constant 30fps here, but as with gouessej I can’t get focus either (and I can already display a still image at more than 30fps! :wink: )

Pretty nice, applet was focusable for me (Vista, FF13). Any plans to actually release the source, or actually make a mini-game out of it?

[quote]Pretty nice, applet was focusable for me (Vista, FF13). Any plans to actually release the source, or actually make a mini-game out of it?
[/quote]
yes and yes :stuck_out_tongue:
Though I doubt the source would be very useful.

[quote]Please can you deploy your game somewhere else?
[/quote]
Sure :3

You should put it on GitHub or something.

yes and yes :stuck_out_tongue:
Though I doubt the source would be very useful.
[/quote]
It would be useful, I started my own first person shooter by looking at the source code of something very similar in 2006.

What was the thing similar? If you don’t mind my asking :slight_smile:

The game “Art Attack” created by Vincent Stahl, using d3caster, a 3D engine relying on software rendering and raycasting like Wolfenstein 3D. Vincent used the source code of “Java Maze” created by Jonathan Thomas. As you can see, a source code released in the beginning of the 2000s has been useful for some developers :wink: even though I now use a completely different solution based on hardware acceleration (JOGL 2.0) with another 3D engine (Ardor3D, JMonkeyEngine 2 some years ago, my own engine in 2007) and spatial partitioning (cells and portals).

I like the retro feel of it, but it has some rendering flaws. It seems to lack perspective correction and at some angles, it renders…this…

Ultra, far, and fog… 30 fps?
Your hardware rocks O:

I’ll try to fix that :slight_smile:
The reason it occurs is because of the really cheap trick I used to even allow floors to work :slight_smile:

Runs at 25fps for me with fog and far rendering, sometimes 30fps. The ceiling is weird when you look on the right direction, but that’s the only problem I had. Pretty nice work. 8)
Focus would be nice.
Are you planning on making a game ?
2.5d always bring some retro gaming memories :smiley:

This is super neat! Runs really smoothly on my computer. I wish I understood how this 3D stuff works :frowning:

I also found the same visual glitch as EgonOlsen:

And the ground too:

shift to shoot
my sticky keys are going nuts =D

also writing a 3d shooter in java2D, I dont know if its really cool or really sad ;D

Can I see a demo/pic of yours? :smiley:

Btw is Prelude Of The Chamber Java2D too ?

It is.

I dont mean any disrespect; the opposite actually.

But it’s like painting the mona lisa with a magna doodle thing