Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  JavaGL : old-school, 100% software, 3D engine  (Read 12158 times)
0 Members and 1 Guest are viewing this topic.
Offline N_I_C_S
« Posted 2012-07-09 05:38:50 »


( just to have a picture in the showcase  Roll Eyes )

Hello,

Today I'd like to present a project I develop from time to time since several years now : JavaGL (yes, again another one !) . It's a little library of graphical functions between the render API and the 3D engine.
Actually, firsly the application possesses a 3D software render system based on the OpenGL model and providing its main functionalities : render parameters (perspective, clipping planes, cullfacing), spatial transformations (rotation, translation, scale, pushMatrix/popMatrix), basical materials (diffuse color, shininess, wire-frame/solid faces), dynamic light, primitives display (triangles, lines, bitmap sprites), etc...
Secondly, above this are built some higher level functionalities touching numerous domains : skeletal animation, collisions/physics, file loading (OBJ and Milkshape3D ASCII), scene management, real-time game management (maps, sceneries, entities, events, pathfinding), etc...

I have to specify that the goal isn't to compete with 3DZZD or jPCT which are fantastic engines based on an emulation of graphic chipsets. The purpose is instead to come back to an old-school 3D, like on Atari ST for example, when material acceleration or display buffers didn't exist. So there's a lot of lacks, like the lack of textures, but also a few advantages like allowing large screens without (too many) loss of performances.

And so I announce proudly the release of JavaGL V0.8 !

This version isn't a revolution compared to the last one but corrects its main defaults and provides new functionalities that I learnt to implement since 1 year of Flesh Snatcher Wink .

The improvements :
- Timer in nanoseconds (-> JavaGL is now compatible Java 1.5 and + )
- Correction of a bug on gravity
- Correction of a bug on multiple collisions management
- Correction of a bug on bounce management
- Correction of a bug on Milkshape3D animations loading
- Detection and correction of possible collision errors
- Total prevention of file loading crashes
- Duplication functions of all the data structures (from the vector to the full game map)
- Control of "cleanness" of the BSP trees
- Lines display optimization

The new features :
- OBJ format support
- Shapes intersections detection system
- Cleaning of the invisible faces of a set of meshes
- Procedural primitives (cube, sphere, geosphere, cylinder, cone, height-map)
- Terrains management system (generation, display, collisions)
- Bitmap sprites integration
- Events management system (all events possible ingame)
- Pathfinding in a 3D graph (Dantzig algorithm)
- Game maps management (sceneries modifiable in real-time + entities)
- Implementation of a simple game loop

That's all folks ! The goal of this version is to gather the max possible functions to make a game like Tesseract in a minimum of code. As the lib manipulation can be different of "regular" engines, The accessibility is also a priority with simple functions (I hope so), and a set of demos/tutoriels integrated to explain the most disconcerting features. Finally, pedagogy is also an important aspect of the project (for me in first !), so the code is provided under GPL to allow to developers to criticize the "weirdnesses" I commit, and allow to everyone to comprehend more classical algorithms.

Thanks for your attention, and here are the traditional links Wink :

Download :
http://sourceforge.net/projects/javagl/

Web site :
http://javagl.sourceforge.net/

Direct accesses to demos :
JavaGL logo
Procedural shapes
Collisions
Skeletal animation
Billboard 3D sprites
Terrain generator

As usual, don't hesitate to post your comments Wink .

Flesh Snatcher : Java FPS
Last demo on http://fleshsnatcher.sourceforge.net/demo/
Offline version + sources on http://sourceforge.net/projects
Offline ReBirth
« Reply #1 - Posted 2012-07-09 06:12:32 »

I'm excited from the demos.

Offline sproingie
« Reply #2 - Posted 2012-07-09 07:23:16 »

I hate to be the mean nasty guy who asks, but ... why?  Even the cheapest phone I can buy (that runs third party apps) will run OpenGL.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mads

JGO Ninja


Medals: 24
Projects: 3


One for all!


« Reply #3 - Posted 2012-07-09 09:48:08 »

Impressive. Still needs permission to run though. What's the win?  Smiley

Offline ra4king

JGO Kernel


Medals: 322
Projects: 2
Exp: 4 years


I'm the King!


« Reply #4 - Posted 2012-07-09 09:48:32 »

This is really cool and all but I have the same concern as sproingie Tongue

Also, why did the JavaGL logo applet need permissions?

EDIT: Seems like permissions aren't necessary, because I declined permissions and yet it still ran....so why did you sign it? Tongue

Offline N_I_C_S
« Reply #5 - Posted 2012-07-09 10:26:46 »

@ReBirth
Hey, thank you ! I hope they make you wish to play a little with the sources Wink .

@sproingie and ra4king
Ha ha, that's a good question ! At the beginning it was to have a good grade in my ingeneer studies Cheesy , and I loved the idea to program graphical apps from A to Z. Then, as I added functionalities, the software renderer became a feature amongst others, the lib could be used for other reasons (for example I use it in my FPS Flesh Snatcher for math or collisions), so I continued to maintain it.
And now, with the "retro" wave that grows up, I think maybe it can be useful to someone (to make, for example, remakes of first 3D games, etc... without using heavy engines).
And finally, I must say I believe in the future of software rendering, with projects like Larrabee (infortunately abandoned) the graphic chipset will disappear and maybe the door will be opened for other kinds of 3D . Yeah, javagl accelerated by 32 dedicated CPUs, that would rock ! (Ok, I go back down...)

@Mads and ra4king
Thank you ! For the permission, yes I had to sign the jar (the same for all demos) just because of this damned class Robot I use in the "terrain generator", grrr !

Flesh Snatcher : Java FPS
Last demo on http://fleshsnatcher.sourceforge.net/demo/
Offline version + sources on http://sourceforge.net/projects
Offline ra4king

JGO Kernel


Medals: 322
Projects: 2
Exp: 4 years


I'm the King!


« Reply #6 - Posted 2012-07-09 10:32:07 »

I don't really understand this whole "software rendering" craze. Hardware rendering will always be faster and better.....why the need to take a step backwards into slower rendering?

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 605
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #7 - Posted 2012-07-09 10:54:34 »

And finally, I must say I believe in the future of software rendering, with projects like Larrabee (infortunately abandoned) the graphic chipset will disappear
FYI: the Larrabee was a graphics chipset: it had texture units, but ignoring that, I'd say: unlikely in the next decade. Dedicated hardware will always be faster (or have a more acceptable efficiency) than general purpose hardware.

Some day general purpose hardware will be 'fast enough' for realtime photon mapping. Let's say performance doubles every 18 months (Moore's Law says transistor-count doubles, but what the heck). In 10 years we'll have 2^(10 / 1.5)=~100x the performance we have today on our CPUs, so these futuristic CPUs will still be slower than current GPUs. Needless to say GPUs will advance too, and looking at the performance growth in the last 5 years, their performance is accelerating faster than that of CPUs.

My guestimate is 50 years from now, but until then, keep writing software-rasterizers, if only because it's so much fun Smiley

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline ra4king

JGO Kernel


Medals: 322
Projects: 2
Exp: 4 years


I'm the King!


« Reply #8 - Posted 2012-07-09 11:00:47 »

Actually have you heard that some researchers broke Moore's Law?

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 605
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #9 - Posted 2012-07-09 11:06:38 »

Offtopic:

Actually have you heard that some researchers broke Moore's Law?
Moore's Law is about commercially-viable CPUs. I'll take quantum computing serious when it becomes Turing Complete and can perform actual real-world tasks, as opposed to 'we know all answers before we finished the calculations, but we're struggling to feed it a question and selecting the answer(s) we care about'. *ramble ramble*


From TFA:
Quote
But physicists still can’t agree on whether a quantum computer can actually be built.
*ramble ramble*

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ra4king

JGO Kernel


Medals: 322
Projects: 2
Exp: 4 years


I'm the King!


« Reply #10 - Posted 2012-07-09 11:50:01 »

Well now I'm sad Sad

Offline N_I_C_S
« Reply #11 - Posted 2012-07-09 12:47:17 »

Hmm, very interesting, Riven...
Maybe the modeling of photons behaviors isn't the only way to use general hardware. maybe we can imagine kind of compromises (improved raycasting, I don't know)... I see that the power of GPUs is used more and more to make other operations than the classical textured triangle rendering : various shaders, GPGPU, complex illumination, etc... Maybe something new will emerge from that...

@ra4king

Quote from: Riven
keep writing software-rasterizers, if only because it's so much fun
Exacty ! The main reason to make that : there's a guilty pleasure to do "as" the hardware developers from your bedroom  Grin .

Flesh Snatcher : Java FPS
Last demo on http://fleshsnatcher.sourceforge.net/demo/
Offline version + sources on http://sourceforge.net/projects
Offline tberthel
« Reply #12 - Posted 2012-07-09 16:52:56 »

I believe that software 3D engines do have value.  While specialized graphics hardware can do great things it always misses out on unique graphics styling that takes away from many game possibilities. I expect some cheap hardware of the future will not have a 3D accelerated graphics chipset.

Offline sproingie
« Reply #13 - Posted 2012-07-09 17:30:57 »

Actually they both agree and disagree on whether quantum computers can be built, because they have and haven't been built and we're just waiting to see how the wave collapses Wink
Offline N_I_C_S
« Reply #14 - Posted 2012-07-09 18:04:40 »

Quote from: tberthel
I expect some cheap hardware of the future will not have a 3D accelerated graphics chipset.
I agree, it would be great to play on coffee machines thanks to software libs !

@gouessej
Ha ha, Julien, I see you behind your little medals Grin ! I know we had lively debates about this lib but I thought you finally appreciated tesseract...

PS : while speaking quantic stuffs, I just learnt they found the Higgs Boson. That's enormous !! We will finally understand gravity (and maybe confirm some parts of the superchords theory).

Flesh Snatcher : Java FPS
Last demo on http://fleshsnatcher.sourceforge.net/demo/
Offline version + sources on http://sourceforge.net/projects
Offline EgonOlsen
« Reply #15 - Posted 2012-07-09 20:13:07 »

Looks like it lacks sub-pixel accuracy...apart from that, i always appreciate some good old software rendering...  Grin

Regarding the "who needs this?"-discussion: People are still using software rendering these days. I don't know the exact reasons, but they ARE using it. If that wouldn't be the case, i would have removed the software renderer from jPCT some time ago. Instead, i had to extend it recently because some user was missing a feature.

Offline gouessej

« In padded room »



TUER


« Reply #16 - Posted 2012-07-09 20:38:33 »

Hi

@gouessej
Ha ha, Julien, I see you behind your little medals Grin ! I know we had lively debates about this lib but I thought you finally appreciated tesseract...
I have always said this project is mainly useful for pedagogical purposes. If you have fun developing it, just go on but don't expect from creating the next replacement of OpenGL. I agree with ra4king and Riven, you cannot make something faster than hardware rendering, GPUs will go on becoming faster as time goes by and they have been used in mobile phones for more than a decade through M3G and JOGL-ES (which has been integrated in JOGL 2.0). Raytracing can be done on GPUs with shaders and it is more efficient than those solutions based on software rendering even on a PS3 (25 FPS just to display a car, the floor and some buildings).

How do you want to target low end machines with software rendering? As there are fewer Celeron 700 Mhz used nowadays, the CPUs will allow you to display much things but 3DzzD has still one of the fastest software renderer, some people claimed it was a fake software renderer until its author open sourced his code under LGPL.

Some people are still using software rendering in Java because it doesn't require signed code, it is a nice alternative to WebGL (which is particularly slow on all machines I tested) for moderately complicated scenes. However, a very few games are using it except Tesseract (whose gameplay is really nice). This game would have been slower with full 3D models. Some people don't want to simplify their models to use software rendering, you have to face it.

Anyway, applets are being killed by Apple, Google, Mozilla and Microsoft, they just use the security concerns as an excuse whereas Silverlight, WebGL and Flash have security flaws too. Therefore, regarding the "who needs this?" discussion, I see fewer people than before because I don't see the interest of software rendering in heavy clients as it seems easier for me to get user permissions for such applications.

I'm ill so my brain is not as efficient as usual. Good luck.

Offline vyh

Senior Newbie





« Reply #17 - Posted 2012-07-09 20:49:49 »

[Off-topic]
I'm think 3D Software Renderer's is good for Web(HTML5 Canvas, JavaScript) because WebGL does't supporting in Microsoft Internet Explorer, but Java( Desktop applications, Applets ) I'm think can use OpenGL and don't need 3D Software Renderer.
[Off-topic]

Good luck with JavaGL, Demos looks good.  Smiley
Offline gouessej

« In padded room »



TUER


« Reply #18 - Posted 2012-07-09 20:55:16 »

[Off-topic]
I'm think 3D Software Renderer's is good for Web(HTML5 Canvas, JavaScript) because WebGL does't supporting in Microsoft Internet Explorer, but Java( Desktop applications, Applets ) I'm think can use OpenGL and don't need 3D Software Renderer.
[Off-topic]
You can use WebGL on MSIE thanks to IEWebGL and Google Chrome Frame.

Offline Roquen
« Reply #19 - Posted 2012-07-09 22:18:13 »

To jump into a thread hijack.  Software scanline rendering is dead and will remain dead. amen.  Moves toward less special purpose hardware rendering will occur...but that's a different animal.  (Actually this has been going on for awhile anyway)
Offline Quarry
« Reply #20 - Posted 2012-07-10 13:45:35 »

I like this a lot, will there ever be textures tough?
Offline gouessej

« In padded room »



TUER


« Reply #21 - Posted 2012-07-10 15:11:19 »

I like this a lot, will there ever be textures tough?
If N_I_C_S stays focused on keeping the old-school style of Atari ST, he won't implement texture support but some other software renderers already support that.

Offline ReBirth
« Reply #22 - Posted 2012-07-10 16:31:15 »

[Off-topic]
I'm think 3D Software Renderer's is good for Web(HTML5 Canvas, JavaScript) because WebGL does't supporting in Microsoft Internet Explorer, but Java( Desktop applications, Applets ) I'm think can use OpenGL and don't need 3D Software Renderer.
[Off-topic]
You can use WebGL on MSIE thanks to IEWebGL and Google Chrome Frame.
[OT] Why you still concern IE [/OT]

I believe the OP will keep on style, no texture.

Offline Roquen
« Reply #23 - Posted 2012-07-10 17:06:31 »

Why IE? Perhaps the user based that uses IE?
Offline gouessej

« In padded room »



TUER


« Reply #24 - Posted 2012-07-11 00:36:01 »

[Off-topic]
I'm think 3D Software Renderer's is good for Web(HTML5 Canvas, JavaScript) because WebGL does't supporting in Microsoft Internet Explorer, but Java( Desktop applications, Applets ) I'm think can use OpenGL and don't need 3D Software Renderer.
[Off-topic]
You can use WebGL on MSIE thanks to IEWebGL and Google Chrome Frame.
[OT] Why you still concern IE [/OT]
Why I still concern Windows? Because of its user base. I don't like Windows and MSIE.

Offline ReBirth
« Reply #25 - Posted 2012-07-11 06:21:41 »

I can understand the windows part, but IE is not your only option. Pretty sure most windows users has alt browser(s).

Offline Roquen
« Reply #26 - Posted 2012-07-11 06:51:03 »

Indeed it is user experience optimal to choose what's good for them.  If their running IE (just 25-50% of browsers depending on whom you believe) pop up a "Best experienced in XXX browser". 
Offline N_I_C_S
« Reply #27 - Posted 2012-07-11 13:03:22 »

@EgonOlsen
Thank you, I'm very proud you appreciate Wink .


@gouessej
Oh yes, I know all you said, and I agree in majority, I just want to specify I don't want to replace OpenGL at all !
And according to your position on software rendering, I don't really understand why you "defend" 3DzzD, it's favouritism Grin !
Quote
some people claimed it was a fake software renderer
C'est petit, c'est mesquin ! (sorry for french Grin )
However, what do you mean by lack of full 3D models in tesseract (btw thanks for gameplay Wink ) ?


@Quarry
Thank you ! As said by gouessej, there won't be textures Sad . I limit the project to make retro games like Carrier Command on Atari ST or StarFox on SuperNES (ah, memories !).

@ReBirth
Quote
I believe the OP will keep on style, no texture.
Ah ah ! That's my point of view.


Concerning IE, I just specify javagl isn't made excusively for applets Wink .

PS : it seems there was a viewport problem in the demos sequence, I just fixed it, enjoy Wink ! (and now only the "terrain generator" needs permission)

Flesh Snatcher : Java FPS
Last demo on http://fleshsnatcher.sourceforge.net/demo/
Offline version + sources on http://sourceforge.net/projects
Offline gouessej

« In padded room »



TUER


« Reply #28 - Posted 2012-07-11 19:30:25 »

Oh yes, I know all you said, and I agree in majority, I just want to specify I don't want to replace OpenGL at all !
You wanted to replace OpenGL on mobile phones some years ago.

And according to your position on software rendering, I don't really understand why you "defend" 3DzzD, it's favouritism Grin !
3DzzD supports both hardware accelerated rendering (JOGL) and software rendering, it is still compatible with oldest and most crappy JVMs, its author has really done a great job, it's highly optimized.

Quote
some people claimed it was a fake software renderer
C'est petit, c'est mesquin ! (sorry for french Grin )
3DzzD's software renderer is so fast that some people claimed he used hardware accelerated rendering under the hood even in its software renderer until he open sourced his code. It's a compliment.

However, what do you mean by lack of full 3D models in tesseract (btw thanks for gameplay Wink ) ?
Enemies are composed of a very few triangles in Tesseract. If you used the same soldiers than me, Tesseract would be really slower.

Offline BoBear2681

JGO Coder


Medals: 18



« Reply #29 - Posted 2012-07-11 21:47:34 »

Indeed it is user experience optimal to choose what's good for them.  If their running IE (just 25-50% of browsers depending on whom you believe) pop up a "Best experienced in XXX browser". 

The fun part of writing webapps professionally is that you have to support IE since so many of your customers force their employees to use it.  Thankfully cross-platform Javascript frameworks have gotten pretty good, otherwise my head would explode.

Testers get cross when you tell them "It works in (Firefox|Chrome)."
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (47 views)
2014-04-15 18:08:23

BurntPizza (43 views)
2014-04-15 03:46:01

UprightPath (59 views)
2014-04-14 17:39:50

UprightPath (41 views)
2014-04-14 17:35:47

Porlus (57 views)
2014-04-14 15:48:38

tom_mai78101 (80 views)
2014-04-10 04:04:31

BurntPizza (139 views)
2014-04-08 23:06:04

tom_mai78101 (239 views)
2014-04-05 13:34:39

trollwarrior1 (199 views)
2014-04-04 12:06:45

CJLetsGame (207 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!