Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


[java] Role Maker demo available for download.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
22 replies to this topic

#1 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 01:09 AM

Hi, I am at the moment nearing completion of my Master''s Thesis in Computer Science and are now done with the demo that is to accompany my written report. See screenshots and download it at http://www.rolemaker.dk The demo is a 3D application written in Java and I would be very pleased if some of you would try it out and tell me if you could get it to work, and if not what happened. The demo is written using the 6DX 3D engine (www.eldermage.com) using the Java interface (6DX for Java) and Suns Java 1.3.1. It requires a 3D card and DirectX 7.0 to be installed on your computer. I am pretty satisfied with the speed. It runs 40 fps on my computer (a 700Mhz Athlon with a Geforce 256) how fast does it run on yours? The source code is not yet available on-line but will be shortly. Also, the report is not completely done yet. The reason why the download is pretty big is because it contains its own JRE. This is essential since end-users should never know that Java is used or be concerned about it. Thanks, Jacob Marner

Sponsor:

#2 snowmoon   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 03:06 AM

Jacob,

havn''t tried the demo, but I am concerned with your mixed code approach. Why choose Jwindows and 6DX when both the AWT and Java 3d seem to have been all that you would have needed.

Don''t try and pass off Java 3d as slow, complicated mabye, but not necessarly slow.

I have read your "Java for Games" article on several occasions and STILL have problems with your conclusions. First off why even bother including the jre for your game if it only run''s on windows? Why not just do a native code compilation? That is what your essay suggested?

You really think you are exploting Java''s functionality by writing applicatons that are tied to windows when there are perfectly usable API''s for doing what you have done in a cross platform fasion? At this point you can get the same time to market advantage by using c# and it''s much more windows friendly.

Persoanlly I believe that you have wimpled out and are using the java language as a show piece, not really taking advantage of it''s main features. It seem like you are using java as a glue language for your other c and c++ windows projects. I have not problem with native code, but I shoot for a 99% pure approach if I do use it ( it''s a benifit, but does not detract from usability or main features ).

For the record, I''ve always had an issue with your article ( it makes quite the rounds ), as I feel your conclusions are biased, and not backed up by hard evidence. It recommends that games use the two c wrapper librarys you developed and compile java to native code. While this may have been an advantage 4 years ago, with the proliferation of good java API''s and JRE for all destop arcetectures ( Win, Mac, Linux, Solaris, IBM, ... ) it makes no sense to tie yourself to one platform. At least if you are going to use a native code wrapper, use one that supports cross platform development gl4java ( even supports Mac OSX ).

Oh, and you java navigatoin bar appears to have crashed with an IlleagalArgumentException, and wihtout a text version it''s extremly difficult to navigate your site.

I''ll stop ranting now.




#3 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 03:43 AM

Hi snowmoon,

Although I feel a bit overwhelmed I will attmept to take all this criticism constructively.

First off, many things has happened in the world since I started implementing Role Maker over a year ago. It seem that Java3D has gotten faster and I am glad to see the many new features in the JDK 1.4. However Java3D is still slow compared to what I have accomplished so I will pass it of as slow - you must always compare it with what is possible. This is the simple reason why no major commercial game has yet to use Java3D for their 3D. Also, Java3D may be part of the standard but it is only available on very few platforms so there is no real advantage here over using my own code.

Compared with say OpenGL, 6DX for Java gives you a higher level approach: load model, show model here, rotate it, animate it, etc. all with simple commands. No need to mess with low level things such a matrix calculations and so on.

And yes, had C# been available a year ago (it is still in beta) then I might very well have chosen that instead but that was not an option at the time. In fact I think that C# seems very promising and if I had to do a similar project in the future I will certainly consider it.

As for just using Java as a show language, I disagree. The majority of the code is written in java (about 50.000 lines) and I really enjoyed doing so because I had the feeling all the way of being very productive. Java is a nice language that I really want to use. I could just as well have used C++, but when doing high-level development Java is so much cleaner - as you probably know. For me Java is about ease of development - I don''t really care about cross platform development - I do however care about cross compiler (on the same platform) compatibility, something that Java accomplishes but C++ does not. And C# has only one compiler - so that is not cross compiler in anyway.

I know I recommend doing native compilation, but unfortunately my design for Role Maker requires the need for dynamically loaded classes, ie. classes not known at design time. The only native compiler supporting that is Excelsior Jet Professional and the price tag is too high for a license for my wallet - so for economic reasons I decided not to use it, but applying it will certainly give a speed boost.

As for my libraries - I don''t think I recommend using them in the article - I just pull them out as examples and a kind of proof that it is possible.

You request hard evidence. I am not sure for what. That it is possible? That is shown with my demo here. That it is faster to develop? I cannot prove it in the exact case but must draw on the previous articles on general Java development.

And for the navigation bar, I don''t know why that happened. Never happened to me (I didn''t make it, you know) - I believe I read on the support site it can happen if you click the back button and then forward again while it loads the tree structure.
(It has something to do with applet caching in IE)

As for doing the pure approach, I will say again that I don''t consider using Java3D pure. You can''t consider anything else than the core API pure if you want to remain cross platform compatible since most ports of Java have trouble just to keep up with the core parts.

As for distributing the JRE this must be done even with native compiled code if that code uses any of the Sun dlls. This is because the JRE license says that the JRE may only be distributed in full, not in parts.

In conclusion, if I had to redo the project this day I might have chosen Java3D instead or maybe C# or even Visual Basic .NET - seeing the improvements done to them all - but I think the end result has become better.

Snowmoon, I hope you don''t hate me (because it sounds a little like that) but please hit me with more criticism. And if there are anything you would like changed in my article to make it "less misleading" please let me know.

Sincerely,
Jacob Marner

#4 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 04:06 AM

Hi again,

I have done a number of changes to the Java article that I hope will make it less misleading in your (snowmoon) eyes:

* I have made clear that the article does not care about cross platform development. I.e. if you do don''t consider it.
* I have made a link to GL4Java beside my own libraries and stated that my libraries are not perfect but merely proof of concept.
* I have made it clear that the article does not compare Java with anything else than C++. Using C# might be good idea but is just not considered in the article.

I hope this helps.

Please let me know if you want me to make other changes.

Jacob

#5 snowmoon   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 06:47 AM

Jacob,

Thanks for the responce. Your style of platform dependant java developemnt has a place, as long as you make it know to your audience.

I would check out the info on the Humid project from full sail. They have a full Quake II''ish clone running in 100% pure java under Windows, solaris, and Linux.

At times 99-100% pure java programming can be annoying, but it really does pay off in spades in terms of efficiency and dependancy. I know that my 99-100% pure programs will only contunue to get faster ( some an order of magnitude faster ). Then they were only 1 year ago. They will also work on ANY java platform that has the appropriate API''s installed without question.

The most misleading thing I think is that you say java in slow. For the most part I have found that even moderate ammounts of graphics required a finess when programming, but it is more than possible to keep the speeds up. Just like any other programming task you rise to the occasion and tackle it. I have investigated and found where most of the slowdowns begin, and have made signifigant progress. The API still have alot of leyway in terms of optimization ( come on SUN ) but the language itself is very fast.

Personally, it appears we both view the problem from diffrent angles. I would have tackeled the problem by first writing it using Java3d/gl4Java and Swing. I would THEN write pieces of code to dynamicly ( when availible ) take advantage of platform specific code. Take for instance fullscreen API''s in 1.4, this is not a native libeary, but something that''s not availible in 1.3 and my code does not require it''s use. The code gracefully degrade that feature and does not even hickup at all. I could very easly add a JNI feature to jre 1.2+ to do fullscreen, but one again it would be something that it a nice thing to have, not a requirement.

So, did not mean to bash... just trying to vent. This week ( mabye 1 1/2 mabye more ) has been all about venting in my life, but since my sorrid personal life details are not worth the time typeing all out here. Anyways....

The only thing I''de add to your article is that java is not slow, some of the generic API''s are slow ( but getting better ). I would also add jdk versions and dates upon which you did your testing to evaluate the speed of the various functions. This way people reading the article today are not confused as to the fact that most of your "slow" things were 2-3 years ago ( when they were more true ).

I also want you to know that a program of that size in any language is an accomplishment, and I would not want to deny you the satisfaction of a job well done.


Cheers,

#6 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 07:39 AM

I will check out the project.

The goal of the article is to convince people from the C++ world that Java is useful. I think it would be unwise if I start out claiming that Java is fast - they simply will not believe me. Most people will have tried running applet games in their browser and that is, dispite what you may say, deadly slow - mainly because most people don''t use Java plugins but use the built-in interpreters in Netscape or IE.

Also, differentiating between the language and the API complicates the article I think (it is complex enough already) so I would rather avoid it.

In fact any API for Java (standard, core or not) is in fact a native library of some sort. It is merely a matter of classification. It is of course possible to write Java APIs as fast as C++ code - since the libraries themselves often are written in C++ - but today the standard libraries are still fairly slow. When someday they get really fast I agree to change it. Take for instance Swing - that is deadly slow even with the newest VMs.

I agree however to make it sound like that using 1.3 or 1.4 is quite fast as long as you stay out of the slow APIs.

I think you are right about the approach you would have used instead - but that was not feasible a year ago. Java has gotten faster since then but was the time I wrote the article I don''t think it would have been a good idea.

Thanks for the feedback.

I think it is time to given article an overhaul. Check back on it in a few days and tell me if you think it got any better.

Jacob

#7 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 08:38 AM

Hi,

The article is now fully updated.

Snowmoon, after reading it more closely I see many placed where readers may have mistunderstood it.

I think it is more to your liking now. I don''t think I have actually changed my opinion about how things is, it is just more clear now what the points are, I think.

Do you like it better now?

It is after all an article that get pretty many hits (50-60 a day) so it is part of the face of Java gaming to the outside world, so I don''t want java people to think I am unfair to them.
But I have to write it on the terms of the C++ or they will never believe a word of it.

Jacob

#8 snowmoon   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 09:22 AM

The inital responce was that java was slow because most people did not understand the language.

Try the links under games and big list of links under http://www.javagaming.org/ it''s a site run by sun engeneers. The list of games is impresseve ( most of them run from the browser with jdk 1.1 ). These demos/games should go quite a ways tward changin your mind that browser based games are slow/butt ugly.

Other links to cool browser based goodies in java

http://www.javaonthebrain.com/

... I know there are more... I''ll post more later.


#9 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 09:35 AM

I am sorry, but this has nothing to initial response. I have yet to see a single pure Java application that comes even close to what is released commercially for the PC. Snowmoon, have you actually played some of the new 3D games (released within the last 6 months)? There is major differences here.

I tried a few links you gave me at random but they are all crap. Nothing can compete. However, the mixed code approach as proved to work - Nihilistics Vampire - The Masquerade proves this - they were happy about it as proven in the Vampire postmortem at gamasutra.

Point me to the single best looking/fastest pure Java application you know that actually are have something that we can see or buy and I will change by opinion, but until then I remain true to the statement: Java applets are terribly slow and can''t be used for anything competitive. (I have seen some fun games in these gamelets, but it still does not compete with, say, Soldier of Fortune)

But other than that, what do you think of the changed article?

Jacob

#10 buh   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 04:13 PM

Don't know if it's as good as SOF but Roboforge has a demo out. You can buy it too. The only other big time pure Java games I can think of are Cosm and Blackscape. Anyone know of any others?

Edited by - buh on August 1, 2001 11:15:49 PM

Edited by - buh on August 1, 2001 11:17:55 PM

#11 snowmoon   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 06:55 PM

Jacob,

It''s 2am, I''ll get to the article tomorrow. I have not bough and paid for a game ( nor had any intrest in ) since I got starcraft as a gift.

Besides that I play nintendeo, SNES, and mame all the time. All of the games where gameplay was king, and flash and graphics were more than good enough.

I''ll try and pull some more links toghter. Roboforge is an ok example, but it does use it''s own timing JNI and a fullscreen JNI because neither was avalible at the time of development.

More tomorrow sfter lot''s of sleep and some more venting to friends about my now ex-wife.

Cheers,

#12 snowmoon   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 07:12 PM

Red storm entertainment has two commercial games availible made in 99% pure ( fullscreen JNI ). Politika and Ruthless.com both avalible for sale from www.redstorm.com.

I saw a full functional Quake clone running in java on a pentium 120 without any JNI. It was using straight java bit pushing power ( in a browser ).

More as I dig them up.

#13 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 11:50 PM

Although those examples are better than I had expected possible there is still some way to what is seen in real graphic pumping games, like say Serious Sam. Those Java games are *not* state of the art. You should try downloading the Serious Sam demo and compare. If you only look at Java games for some time you cheat yourself from seeing what is really possible.

So since I last looked at this kind of thing (about a year ago) some significant improvements has certainly happened. At that rate things may be perfect within a few years, but until then I stay by my previous words and claim that pure Java can

Sure, there is the old discussion that says that games can be good without so fast graphics, but the fact is that it helps sell games. The purpose of my articles is to win C++ developers to go the the Java side - and claiming that those games you point out are comparable with real games will just make the article untrustworthy. Mixedmode coding has proven its worth with Vampire - The masquerade and that has gained recognision so that certainly works.

I wrote the article knowing that we could never get C++ developers to go to pure Java - and decided that getting them half-way would be the most realistic thing to do.

Finally, let me make it clear I love Java and would love to use it purely, but I stay by my words and say that this unfortunately is not possible if you want to do real graphic pumping games. I hope the gap closing even more in the future so we will see actual pure Java games.

Jacob

#14 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 02 August 2001 - 02:36 AM

BTW, I just want to point out that most of those application does *not* use pure Java. I am not sure that pure Java is precisely defined anywhere (if it is, please point me towards it) but in my book only Java applications using the the language and the core API only can be called pure Java. Otherwise all the talk about portability is crap because only the core API is generally available on non-SUN and non-PC platforms.

The use of Java3D is in other words not pure Java. Java3D is just a wrapper (although fairly thick) around DirectX or OpenGL and does itself use JNI. So in effect Java3D is no different from any other mixed code application (such as my own) with the sole exception that the C++ code was provided by Sun instead of a 3rd party developer. And who said that Sun was the best to build this kind of library. For C++ many many engines exist and using these may provide (and it does) provide significant speed up compared to java3D.

However, as Java3D clearly has become better over the last year developers should naturally consider it before making their own specialized version since doing so will save them a lot of time.

Jacob

#15 snowmoon   Members   -  Reputation: 122

Like
Likes
Like

Posted 02 August 2001 - 03:44 AM

FYI:

Any application the depends ONLY on the java and javax libraries including possible add-on''s from sun would be consitered pure java. This includes java3d, sun provides Java3d on windows, solaris, and linux, and the free-d project provedes it on most unix-like platforms with opengl.

None of the example I have given would NOT work on any java platform as far as I know, despite the fact they use JNI for ancilary features.

As a mesure of good taste, I''m going to stop contributing to this topic as it''s getting into a pissing contest. I do believe in the power and flexability of a 99% pure java approach, and I believe that over the next 2 years I will be vindicated as the first pure java games really start to crank up.

I''m sorry if I hi-jacked the thread to soapbox.



#16 Mornelithe   Members   -  Reputation: 122

Like
Likes
Like

Posted 06 August 2001 - 07:26 PM

My specs:
AMD 1.4 GHz Athlon Thunderbird
IWill KA266-R Motherboard
768 MB PC2100 DDR SDRAM
NVIDIA GeForce3

640x480x16: 42 fps
800x600x16: 42 fps
1024x768x16: 42 fps

Are you limiting the displayed framerate?

#17 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 06 August 2001 - 09:01 PM

Thanks Mornelithe,

That sounds awfully low and odd. no, there is no fps limit.

When did you read those values? The frame rate varies a lot depending on how you view the scene. The intention is to get the value at the beginning before you move the camera. Otherwise it is hard to do comparsons since the frame rate varies with a factor of 2 or 3 depending on how you place the camera.

I have spoken with another guy with a setup *very* similar to yours and he claims a frame rate of 86 fps at the initial camera position.

But thannks anyway,
And for everybody else, there is no need to report back any more. I have had plenty of stats and info about what works and what does not.

Jacob Marner

#18 Mornelithe   Members   -  Reputation: 122

Like
Likes
Like

Posted 07 August 2001 - 06:36 AM

Okay, I redid the demo and got different results this time.

From the starting position:
640x480x16: 74 fps
800x600x16: 74 fps
1024x768x16: 74 fps

Which is faster, but still seems weird that they''re all the same.

If I move the little box off the screen, then I can get a couple more fps, but even with it there, it hovers around the 74 mark, sometimes going down to 73, and sometimes shooting up to 77 very quickly before coming back down. I think it depends on where the fox is in the picture.

When I move around the scene, say, to looking down into the area with the table, I can actually get the fps to increase sometimes. One time I got it up to a pretty steady 76 fps even when I was moving around and making the guard walk places. It was still the same at all resolutions, though.

Hope this helps a little.

#19 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 07 August 2001 - 07:40 AM

Ok, those results sound more right.

I think the reason why the frame rate is the same on each resolution is because the 3D card (GeForce3 is very fast!) are actually waiting every frame for the CPU to send it the triangle data over the bus. I would suppose you get the same behavior in most games with that system - until you get up to some certain resolution that is.

The reason why frame rate goes up when you move the camera is because the 3D engine can cull more of the geometry (because it it is out of view) and it is therefore not sent to the 3D card - which makes speed go up. In other words, at all times it tries to keep the frame rate at maximum - this will make it vary a lot but I think that is better than a general low one.

On my own system (which is at 40 fps normally) I can make it vary between 30 and 95 depending on the screen contents.

So I think all is at it should be here.

Cheers,
Jacob

#20 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 07 August 2001 - 11:14 AM

Hi Mornelithe,

I have found out what is going on. The reason why your frame rate is not higher is because the 3D engine synchronizes the screen update with the monitor refresh - which apparently on your system is 72hz on all those 3 resolutions. This is the same behavior your get in all modern games, includes games such a Quake 3, which will also cap there (This I have confirmation for from a Quake 3 user).

If you want to see your frame rate go even more up, you should be able to turn of the use of vertical blank periods by, in the Geforce card settings, turning it off. I.e. go to the display properties and find the Geforce Direct3D settings and there find the Vertical Blank period setting and turn it off. I don''t have a Geforce3 (only a Geforce1) so I can''t tell you exactly where the setting is placed but I know it is there.

This setting effectively caps the frame rate - and it might as well because your monitor cannot show anything higher and if you do it might cause your display to "tear", so in normal curcumstances you should just let the setting be where it is.

Jacob




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS