Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (115)
games submitted by our members
Games in WIP (562)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Open Scene Graph  (Read 4435 times)
0 Members and 1 Guest are viewing this topic.
Offline zingbat

Senior Member




Java games rock!


« Posted 2004-12-27 23:43:05 »

I bumped into this stuff by acident today when i was looking for the x3d test suits:

http://www.openscenegraph.org/

It has bindings to java:

http://www.openscenegraph.org/osgwiki/pmwiki.php/Community/LanguageWrappers

I looks a good api with a solid design based on patterns. With the Java wrappers this stuff looks very usable to make some games. There are some games being made with it already. The screens look very nice:

http://www.openscenegraph.org/osgwiki/pmwiki.php/Screenshots/DIOSoftPirates
Offline baegsi

Senior Newbie




Java games rock!


« Reply #1 - Posted 2005-01-02 06:31:57 »

Interesting. But the pirates game is not written in Java, is it? Would be good to hear how well the Java wrapper is performing.
Offline zingbat

Senior Member




Java games rock!


« Reply #2 - Posted 2005-01-02 21:37:29 »

Its a comercial game i think. But whats the suprise of a game being written in java ? Vampire the Maskerade Redemption was written in Java and had only a small C++ core interfacing to SDL (not sure about the SDL part). If you don't believe me check out Vampire directory and look for the Java Virtual Machine .dll and the classes.zip file.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 379
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #3 - Posted 2005-01-03 07:14:09 »

Vampire just uses Java as a scripting engine I think.

Cas Smiley

Offline baegsi

Senior Newbie




Java games rock!


« Reply #4 - Posted 2005-01-03 08:45:18 »

Quote
But whats the suprise of a game being written in java ?


I'm not suprised of a game being written in Java (although I'm not aware of any successful title outside the indie scene but still believe it will happen sooner or later), but I'm wondering if writing a game in Java that uses bindings to a C++ engine is feasible and worth the extra effort.
Offline princec

JGO Kernel


Medals: 379
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #5 - Posted 2005-01-03 09:21:02 »

Short answer: no, not really.

Cas Smiley

Offline zingbat

Senior Member




Java games rock!


« Reply #6 - Posted 2005-01-03 17:02:14 »

Quote


I'm not suprised of a game being written in Java (although I'm not aware of any successful title outside the indie scene but still believe it will happen sooner or later), but I'm wondering if writing a game in Java that uses bindings to a C++ engine is feasible and worth the extra effort.


It still have some doubts, however, that interfacing directly to opengl is a better solution than interfacing to a small core 3d engine. You may gain something by having a scene graph being processed in the C++ core than in Java.

I think the only way to know this is to make small game prototypes and then measure the two aproaches.
Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


FYI
« Reply #7 - Posted 2005-01-03 17:36:44 »

FYI, RedStorm used Java 1.1 as the basis for a few of their games. Thin JNI calls to a high performance GL/DirectX engine allowed them to get the rest done quickly in Java. I don't know of all the games that use it, but I do know of a few for certain:

Tom Clancy's: Politika
Shadow Watch
IL-2 Sturmovik
Tom Clancy's Rainbow Six

This thread from last year has a few more.

Java Game Console Project
Last Journal Entry: 12/17/04
Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #8 - Posted 2005-01-03 20:28:50 »

Quote
It still have some doubts, however, that interfacing directly to opengl is a better solution than interfacing to a small core 3d engine. You may gain something by having a scene graph being processed in the C++ core than in Java.


I suspect that - ignoring explicit rolling and unrolling of data - the further you can go before traversing the JNI bridge, the fewer calls will be required.  How much time this saves, however, is open to debate.  (Probably not a lot.)

Unless you're interfacing to a previously-existing framework that provides sufficent features to make it worthwhile, it's hard to see what C++ will bring to the table.  Are there any examples you could mention, actual or theoretical?

Hellomynameis Charlie Dobbie.
Offline zingbat

Senior Member




Java games rock!


« Reply #9 - Posted 2005-01-04 21:46:11 »

No. But with a game proptotype we could actualy benchmark the advantages of having a small core engine versus a direct binding.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 379
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #10 - Posted 2005-01-04 22:03:13 »

Actually I think that's exactly what you can't do. Choose, stick to your guns, release.

Cas Smiley

Offline zingbat

Senior Member




Java games rock!


« Reply #11 - Posted 2005-01-05 13:31:42 »

I don't get it. The only thing its necessary is to write two game prototypes. One uses a direct binding. The other is exactly the same game but working on top of a small core engine. You then run the two games in similar environments and benchmark the two.

Here's how the game could be divided in layers for the prototype using a core engine:


(Java) Game Logic | (Java) Scripting Language
--------------------------------------------------------------------------
(Java) Physics Plugin | (Java) AI Plugin | (Java) Complete Scenegraph Plugin | ...
--------------------------------------------------------------------------
(Java/C++) Renderer Plugin | (Java/C++) Basic Scenegraph Plugin | (Java/C++) Basic OS Services Plugin
--------------------------------------------------------------------------
(Java/C++) Plugin Layer


With a Java binding the only thing that changes is the bottom layers:


(Java) Game Logic | (Java) Scripting Language
--------------------------------------------------------------------------
(Java) Physics Plugin | (Java) AI Plugin | ...
--------------------------------------------------------------------------
(Java) Renderer Plugin | (Java) Complete Scenegraph Plugin | (Java/C++) Basic OS Services Plugin | (Java/C++) OpenGL Bindings Plugin
--------------------------------------------------------------------------
(Java/C++) Plugin Layer

Offline princec

JGO Kernel


Medals: 379
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #12 - Posted 2005-01-05 14:07:04 »

The one thing you might be able to measure vaguely is "complexity", and even that's going to be vague. My gut feeling is that the bigger it gets, the easier it will be to have done it all in Java.

Performance measurements are meaningless for a prototype. Only the end result actually counts and you will never know until you've done it.

The concrete proof is that no-one is going to bother doing this prototype Smiley There are better things to do, like actually writing games!

Cas Smiley

Offline nonnus29

Senior Member




Giving Java a second chance after ludumdare fiasco


« Reply #13 - Posted 2005-01-05 18:15:01 »

Or use a currently available binding to the irrlicht engine or ogre/ode to test with....
Offline zingbat

Senior Member




Java games rock!


« Reply #14 - Posted 2005-01-05 21:05:55 »

I think it depends on how close the prototype is to the final product. After a certain point of game production (usually after the proof of concept) building the game resumes itself to adding more art and building more maps, which is mostly the job of the game designer and the artists.

So if you build a prototype that accurately matches parts of the game you are planning to do, its possible to actualy take useful benchmark info from it.
Offline kevglass

JGO Kernel


Medals: 164
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #15 - Posted 2005-01-06 05:18:05 »

Less of a prototype really then tho isn't?  Grin More of an empty engine.

Kev

Offline zingbat

Senior Member




Java games rock!


« Reply #16 - Posted 2005-01-06 10:14:14 »

Prototypes in computer science are used a little differently than in other areas. Another way to look at is to consider an engine divided in parts (plugins). This way its possible to switch parts with similar interface but different internal design (jni access could be hidden in here) and test them in a controled environment similar to the one your game will run. Im not saying anything new here. This stuff is done in other areas (like digital components) for ages and even in some java apps i have seen.

Notice that some games like HL2 already suport something similar to this. You can switch the renderer in HL2 to any of DX7, DX8, DX9 shaders v1.0, DX9 better shaders. This happens without reseting the engine. The game recaches its textures and models at the moment without messing with the game status.

A similar thing could be done with Java with a choice of having a renderer that supports more stuff in an hidden native layer or a renderer that just uses binding facilities or even just a software renderer that would allow the game to run as an applet.
Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #17 - Posted 2005-01-06 10:21:12 »

EXperienced developers know that there's no such thing as a  prototype. Once someone has your prototype in hand, they'll just say "Oh, this is great! We can just use this!"

Anyone who's believes their employers about it "just being a prototype" is either inexperienced or not very smart. :-)

Java Game Console Project
Last Journal Entry: 12/17/04
Offline princec

JGO Kernel


Medals: 379
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #18 - Posted 2005-01-06 10:37:38 »

LOL! So very true.

Cas Smiley

Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #19 - Posted 2005-01-06 10:53:53 »

Yes, and any further assertion on the part of the programmer that what has been produced is only a prototype usually - in my experience - provokes the response of "Oh, but we've already sold it..."

It's either that or "I know this is a prototype, I know it needs to be re-written before anything else happens, but - just out of interest - what problems are we likely to run into if we deploy it anyway?"

Zingbat, have you thought about using Xith3D?  That's already nicely abstracted out into user, scenegraph, and render code.  Why not write yourself a software renderer to test the Pure Java codepath, and reimplement the scenegraph packages in C++ to test the Native Scenegraph codepath?

Hellomynameis Charlie Dobbie.
Offline Tomas

Junior Member




Agency9


« Reply #20 - Posted 2005-01-06 21:59:35 »

Just buy AgentFX I'll solve all your problems Grin  ... or try the PLE.

// Tomas   Wink

CTO Agency9
Offline zingbat

Senior Member




Java games rock!


« Reply #21 - Posted 2005-01-06 22:16:59 »

On the prototype thing and experienced programmers this is a technique documented in software engineering books and the way it is use has little to do with the way it is used in other areas. Still it is recommended in complex tasks. A plugin architecture is also recomended when the application is complex and modular in nature and will get benefit from many upgrades.

Since i never made any game engine i'll go by the books on software engineering made by experienced programmers who have recognized work. When facing a complex problem what an experience programmer shouldn't do is to think that he is good enough  for anything.

If you guys think you are good enough for anything then i can give you a design doc for a reasonably complex game. I can give you maps, dialogs, detailed huds and interfaces, even game logic details and then we will see how you will do when things start geting hard. This is not a scroller or a simple platform game, its a fully 3d game with douzens of pages of dialogs and intrincate rpg style gameplay. So if you can take this then you could say you can take anything.

" Zingbat, have you thought about using Xith3D?  That's already nicely abstracted out into user, scenegraph, and render code.  Why not write yourself a software renderer to test the Pure Java codepath, and reimplement the scenegraph packages in C++ to test the Native Scenegraph codepath?"

Yes. I also looked into the monkey engine. In fact we could consider many of the interfaces as given a subset of the benefits of a plugin architecture without the complexity. I need a complete plugin architecture however and thats the why i have stay away from those apis.

A reasonably good plugin architecture (don't mention Photoshop plugins or any of that sort) means that plugins can be loaded without having to reinitialize the game. It also means that plugins can be initialized and loaded any time in the execution of your app.

Another advantage of using plugins is that you can make manage and automate tests a lot better.

Yet another advantage is that you can copyright your plugins plugins with the GNU copyright while profiting from other plugins. For instance you could copyright your core engine under the GNU license and take your profit from selling the content and the specific game plugins. The users are allways free to choose if they want to run a plugin or not without messing with the code.

So in short a plugin is not just a programming feature like an interface with a dynamic behavior. It also has to do with testing, copyrights and the freedom of the user to choose what plugins he wants to run the game with.

Offline kevglass

JGO Kernel


Medals: 164
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #22 - Posted 2005-01-07 05:24:45 »

Um, but how is this related to the Open Scene Graph, and more to the point, how is this news?

I'm not trying to be arrogant or ignorant, just I'm trying to work out what point you're trying to make?

Kev

Offline Bombadil

Senior Member





« Reply #23 - Posted 2005-01-07 07:28:45 »

Quote
Um, but how is this related to the Open Scene Graph, and more to the point, how is this news?

Fully agreed.
What has all this talk to do with the Open Scene Graph?

The screenshots of the various games/projects using the OSG look very impressive. Also there's a long list of importers/exporters for various 3d formats including Lightwave. Looks very professional indeed!

So somebody using OSG with the Java binding could share his experiences please. Or his ones with the Java binding which has been done by Noodle-heaven (a funny name and yes I like noodles).

Please stick to the topic, guys. :-)
Offline zingbat

Senior Member




Java games rock!


« Reply #24 - Posted 2005-01-07 08:17:28 »

I was just being polite by providing an answer to the previous posts.

As for Open Scene Graph my point is with an heavly  customizable engine by using modules and plugins we have the choice to choose whatever we want to use and whener we want to use with our engine. Besides we can benchmark (not micro-benchmarks) our plugins and modules simply by switching to a different plugin and running the same tests in the exactly same environment we are building our game.

That's the reason why i pointed out Open Scene Graph. I would also point out the SDL binding or a binding to the Irrlicht engine. Even if people don't wish to use C++ code and prefer to do everything with jogl or lwjgl (which is a reasonable atitude) you can allways use one of external C++ apis i mentioned, which are proven high quality, to do high-level benchmarks to thecode and comparing the performance of those apis. It's also possible to do useful prototypes, not just prototypes to measure complexity and then throw away.

But of course that to do an high-level benchmark you will also need a game. It could be anything for the purposes of testing that will have the same performance demands and quality requirements of any other commercial game competing on the market today. So my proposition for giving you guys a design doc already game for a complex 3d game is still up.

Look people talking is nice and we could be here forvever debating all kinds of stuf but i have an interest in developing games in java like the ones i mentioned before. So if anyone wants to implement a plugin architecture in Xith3d or the monkey engine that will allow us to dynamically swap modules at runtime without reseting the game i have a couple of ongoing projects i can contribute to the java gaming community (gnu license): like a software rendering engine im doing for tests and compatibilty purposes and i can also start developing the game i mentioned before (in case no one else has the balls     Grin ) for which i already have a complete design doc. I could have done the plugin architecture myself but i won't get any free time for another project in the near future.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #25 - Posted 2005-01-07 15:29:47 »

Quote
So if anyone wants to implement a plugin architecture in Xith3d or the monkey engine that will allow us to dynamically swap modules at runtime without reseting the game i have a couple of ongoing projects i can contribute to the java gaming community (gnu license):


It's already there - the java ClassLoader, that has little to do with actually loading classes. All you need to do is make a new one and kill the old one, basically (gross over simplification, but the API's reasonably well documented. Probably cause a lot of headscratching if you've never used it before...)

IIRC JOGL is already using multiple classloaders (?) to some extent somewhere, I recall seeing stuff about it in the games.java.net CVS repository...

Quote

like a software rendering engine im doing for tests and compatibilty purposes and i can also start developing the game i mentioned before (in case no one else has the balls     Grin ) for which i already have a complete design doc. I could have done the plugin architecture myself but i won't get any free time for another project in the near future.


Making your engine render to Xith should be next to trivial, assuming you wisely already based it on an SG and you didn't have a really strange SG. You should be able to do it in one lazy Sunday. I would guess most java game devs could actually do it in 4 hours or so. At least, that's my personal experience from faffing about converting old scanline java renderers to Xith (just toy examples, but the amount of wrapping needed was very little - mainly the effort was in fact in cleaning up and refactoring/improving my existing code, and fixing naughty design shortcuts I shouldn't have used in the first place Smiley)

I presume that a jME conversion is similarly quick...

malloc will be first against the wall when the revolution comes...
Offline zingbat

Senior Member




Java games rock!


« Reply #26 - Posted 2005-01-07 17:08:38 »

I don't have such an experience on working with software rendering engines so it will a little longer, probably a lot longer.   Grin

The plugin archhitecture i need is more complex than that. It requires a simple process for the end user to be able to disable/enable, install/uninstall plugins at will. The end user may be a player who knows nothing  of programming but can, at least, edit a text file and copy files with the explorer. Alternatively the end user could be a developer that is building a game for a new version of his renderer that is almost 100% content compatible with the previous version but since the new version is still in development (and thus unstable) the artists can start working with the old renderer right away.

It also has to be completely transparent. That is you get the renderer interface with a factory method and you are not required to explicitly destroy the class and create a new one. That renderer just delegates its call to the real renderer that is invisible to the game code. The user can be switching renderers at any time but the game code is allways working with the same delegator class while the switching process happens transparently, maybe with a slight pause depending on the circunstancies. Alternatively the engine code can force a list of choices for renderer plugins and deny others.

This is probably too complex to go on without a UML diagram and a precise defenition. Anyway i was hoping someone already made something similar.
Pages: [1]
  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.

radar3301 (10 views)
2014-09-21 23:33:17

BurntPizza (28 views)
2014-09-21 02:42:18

BurntPizza (18 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (27 views)
2014-09-20 20:14:06

BurntPizza (29 views)
2014-09-19 03:14:18

Dwinin (46 views)
2014-09-12 09:08:26

Norakomi (74 views)
2014-09-10 13:57:51

TehJavaDev (102 views)
2014-09-10 06:39:09

Tekkerue (50 views)
2014-09-09 02:24:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!