Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Igor Kravtchenko, posted on April 10, 2001




Image Description, by Igor Kravtchenko



This is my first posting on flipcode for an Image Of The Day. This picture is my contribution and shows some screenshots taken from a 3d demo realised in Java. It uses my own engine called OZOS Web that actually fits into less than 40kb. My first motivation was the fact that Java was and is still not really exploited on the Web. Ofcourse, they are some beautiful offline demonstrations, but they are quite heavy and use in general only software routines. From this point, I've decided to focus only on speed and be able to animate 3d meshes on the Web with a good frame rate even in a 1024x768x24 bits screen browser. Ofcourse, I had to make some compromises because Java applet is not really as powerful as the C++ / DirectX duo (or OpenGL, whatever). The first and main interest of Java is that is plate-form independent (or is a plate-form as a wellknown person said) in the opposite of an ActiveX. So finally, I'm quite happy of the result and to be able to increase the interest of a Web site just by adding some logos in 3d, a head that welcome you, or a lot of things you can imagine, all with a code of just some tenth of kilo bytes (the engine also includes pure software routines, like bitmap tunnel, optimized transparency routines, mosaic effect, blurred images, etc..). Actually, I'm not sure to add features to OZOS Web because of the lake of time and especially to keep focused of the fact it must be light and adapted to the Web. You can watch the demo that uses this engine directly online at www.obrazstudio.com/demo.


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Sweex

April 11, 2001, 03:50 AM

First of all: Neat!

But, you should really see the Java demo's the demogroup "Pulse" made (a few years ago). They've made some supercool stuff and I haven't seen anything better yet...

Unfortunately, I couldn't find any link to the stuff. Maybe someone here knows?

.Sweex.

 
Frans Bouma

April 11, 2001, 04:27 AM

Toys wasn't from assembly 2k, m8 :) (nor '99, I can't find it which party is was from)

This demo is pretty ok, allthough the flatshading polies are not stunning technically, however with these resolutions, you have to make compromises, since in 800x600 or higher, nothing will run smooth in java. (allthough Godog/complex is almost in that resolution and runs fairly smooth).

We (Infuse Project) did some java projects to test how fast democode would run when resolutions were cranked up to par with normal demos, but it wasn't succesful, for the same reasons you also see in this demo: as soon as there is another layer added the framerate drops significantly. Bravestar/Infuse Project wrote such a system, but java is simply too slow to be competitive to any d3d/ogl/software rendered engine. Too bad though. (some projects are still reachable from cfxweb's java pages)

Otis, retired java-coder

 
kewldude

April 11, 2001, 05:12 AM

Well the java api rules, but java sucks because of the speed hit. Where do you guys get that lowest 25fps on my athlon 700, the framerate gets close 2-3fps on my p3 500mhz some places.

I really hate java, it needs lot of mem and a lot of cpu power, you loose all the performance asm/c++ has given, just because of some platform independence. How many people here are not using an x86 cpu anyway?

Well, it's nice enough, good work there, and the deformed wireframe cube is really nice.

 
danthalas

April 11, 2001, 05:54 AM

Well, I really like the demo. I'm very old-fashioned guy and I like low-resolution screens (like that 160x200 in my Amstrad) and flat polygons. I still have fun viewing Crystal Dreams 2 by Triton (This Java demo makes me remember this one) or Final Realiy by Future Crew.

Some parts are viewable (8fps, since some game manufacturers consider that 8fps is enough I must to say this is viewable. I like more when I reach 140fps on Quake3) on my MMX233 at work. On P2440 at home almost all runs nice. I don't really understand why the tunnel effect is so slow. If it is a plain 2D effect, only LUT access is done.

kewldude: I disagree with you. I think that Java is a very well designed language (It solves some black points of C syntax by the point of view of regularity). Of course the performance sucks but there is more people over there that doesn't use a x86 than you imagine. And of course you can't do such a funny things you can do with C++ and assembler. But its utility is well defined and constrained.

Taluego.

 
EvilOne

April 11, 2001, 06:46 AM

You are an complete idiot, are you?

 
opla

April 11, 2001, 08:39 AM

I'm using IE5.5 (in 1600x1200x32b)

 
opla

April 11, 2001, 08:48 AM

That's all you found ?
any arguments ?

I don't like java too ...

 
L.e.Denninger

April 11, 2001, 09:24 AM

One doesn't need arguments if one's right :-)

-

If you only have a hammer, you should smack every problem you see upside the head until it starts bleeding and looking like a nail, or breaks into tiny pieces - whichever happens first.

 
Igor Kravtchenko

April 11, 2001, 10:06 AM

"ToYS la Valse Des Jouets" was released at Trip'99 (Mediartech at Florence/Italy).
About Godog demo from Complex, I don't see very well why you say it almost reaches that resolution (800x600) since it's in 512x256. An easy calcul shows then that the number of pixels differ of a factor 3.7 between 512x256 and 800x600, that is just enormous. Thus, still not comparable.

 
Igor Kravtchenko

April 11, 2001, 10:08 AM

Hehe, and you are able to remember so far ? ;)

Good luck for your game !


 
Igor Kravtchenko

April 11, 2001, 10:13 AM

Can you tell me what "slow" is ?
On a PIII-700 I get approx 5 vbls for the tunnel on a 800x600 screen. That's approx 15 fps and I think it's quite reasonable with that relative Java "slowness". So what the hell this "slow" means ? ;-)



 
Igor Kravtchenko

April 11, 2001, 10:30 AM

Well, don't be so rude with him. I think kewldude simply see the dark side of Java and limits his point of view with some prejudices. Java is slower than C++ that's a fact and its memory consumption depends of the JVM installed on your system (the lightest for applet being actually the Microsoft one). But you can't have this kind of "argument" : 'How many people here are not using an x86 cpu anyway?'. If *YOU* only use x86, that's your choice (because of your needs I imagine), and nothing more. Computer world is very huge and please don't always reason with Microsoft, Windows, VC++ and hungarian notation as I'm used to notice in the "young" world coders community.

 
kewldude

April 11, 2001, 10:56 AM

I did that tunnel effect on a p2-266 once, with some assembly optimizing it did 600fps in 320x240. Now considering that your resolution is only 6,25 bigger and run on a p3-700 with twice the mem bandwidth, then 15fps is really slow. And i cant see 15fps on my machine, i see about 5-6fps in 800x600, but i could use another virtual machine and bla bla ........

I'm sorry for being a little negative. I just dont like when a small demo consisting of a few pictures, LQ music and some 3d models take up 80megs of ram. Your talking about some small logos or similar, and thats 5-10megs at least.

Then theres the demo which claims to be the fastest on the inet, the babble about not using plugins and the ridiculous resolutions on this thing.

 
Rodex

April 11, 2001, 10:57 AM

Crashes the "Sun Java Runtime Environment 1.3"...
Try to make it standard and I'll try to watch it second time.

 
kewldude

April 11, 2001, 11:04 AM

I just read my last message and i want to apologize, not for my opinions, but for not saying anything nice :)
The demo looks good and it does run fast for java, this is great for the iodt.

I am planning an iodt, then you people can slaughter me, okay?

 
Igor Kravtchenko

April 11, 2001, 12:03 PM

You can start by giving me a hand.
What exception is thrown ?

I've already seen some "pity" problems (that I've fixed in 1.31 version) as for example the follow:

consider a zero string named with "car"
The memory will be filled with:
c a r 0
0 1 2 3
some JVM throws an exception when you attempt to acces the 4th char using string.charAt() instead of returning 0.

It can have a lot of these "little" problems, that not really help the programmer to be "plate-form independent".

 
EgonOlsen

April 11, 2001, 12:04 PM

kewldude - Java relies on a garbage collection process to free up memory of abandoned objects. When the JVM is busy doing other things (like in this demo) it tends to eat up more and more memory without freeing the unused mem. It seems to wait until either memory is full (and it has to free some) or there is time to do it (when it's idle). This may be (i don't say that it is...) the reason for the huge memory requirement of the demo. A program may start the garbage collection process itself, but that can cause other problems (doing a gc when none is needed costs time).

 
Igor Kravtchenko

April 11, 2001, 12:08 PM

How could you compare a highly optimized assembler code with a Java code which stays, in a certain manner, an only big opcodes emulator ?
In a term of speed, you should find an adversary of your level, the combat is unequal.

 
kewldude

April 11, 2001, 12:24 PM

Sure, that's what im saying, it's a fast JAVA demo! I guess my main point was, that it's slow compared to other asm/c++ stuff, but some people dont realise that and still try to do 800x600 effects which are slow as hell and then claim that they made the fastest java engine ever. (And the filler is not even made by the coder, but a function in native code!).

It looks good, runs fine, but it's missing a 320x200 option.

 
Rodex

April 11, 2001, 12:25 PM

Sorry, but I haven't ever coded anything in java. =)

But i'm sure you get it right if you go to SUN pages and
check out their java developing stuff.. allso try looking
up what issues or bugs vm version 1.3.

I just got "applet crashed" message, nothing more.
It might be me and need to update the jvm.

(And I keep pressing Ctrl+S after every !"#%&/ lines?!)

 
Igor Kravtchenko

April 11, 2001, 12:44 PM

Ok, so we got A, we got B.
You said that A != B and one is much "better" than the other by taking the only argument of speed.
IMHO that's a little bit "tiny", but well okey.

 
Wolfier

April 11, 2001, 12:53 PM

Sigh. Only if we had a good native Java compiler, or a byte-code to native code converter. As fast in theory as they might seem, JIT's just don't cut it.

Do we have something that does some once-and-for-all conversions?

 
EgonOlsen

April 11, 2001, 01:16 PM

There are bytecode-to-native compilers like JET (a good one). But the speed gain (at least in my applications) compared to JITs or Hotspot is neglectable. These compilers can't change the basics of Java like the mentioned gc-stuff, that can consume quite a lot of computing power. Anyway, i like Java very much. And remember that Java is very well suited for Server-site applications.
This Java-is-too-slow-discussion reminds me of the amiga days, where people said that asm is the way and C is much too slow. Later, everybody was using C because it was fast enough. Then, C++ grew more popular and again some people (some do this still...) claimed that C is superior, because C++ is too slow. But usually, it's fast enough nowadays. This may not be the case for Java in every situation but we'll see what the future will bring...

 
Wolfier

April 11, 2001, 04:45 PM

ElgonOlsen:

What you said is very true, indeed, the moving from low abstraction to high abstraction always takes place.

ASM->C granted.

C->C++ maybe - OO is not the only nor the best paradigm for all applications. AND, C++ is not a very good language on OO merits alone.

C++->Java defintely. Java addresses a lot of C++'s shortcomings w.r.t. OO.

However, for procedural programming, C is still one of the most used and most balanced language.

I now almost use C exclusively for low level stuffs. When higher abstraction levels are needed, I use scripting languages (Tcl/Tk, Ruby, Python) bypassing C++ altogether. So far my code have been very maintainable, beautiful (well, at least not ugly), and works well with good speed.

 
MC BAXTON *UNCENSORED*

April 11, 2001, 05:19 PM

We should always note the fact, that pure C++ language is never used. It always has elements of C (functional programming) and OOP (C++). I've heard discussions about pure C++ style, and in fact that should be considered as nonsense - even in C++ you use functions, such as sprintf() etc ... So in C++ we see just combination of C and OOP.

ANd about IOTD - I can only repeat that it's slow. However, from constantly appearing text we can understand that it's best, it's fast, it's nice ...
Well, just try to make program achieving that goals and remove that messages. - just suggestion.

 
bigyellowtoe

April 12, 2001, 03:19 PM

i really like this demo.

the memory (like most things java) is outrageous. this thing likes to own my machine, but it does run smoothly even at the highest of resolutions save for the tunnel.

why bother with textures and all that rot? it looks really cool even with simple colors instead of textures. they only add to the d/l time and memory consumption.

i'm curious to see what people do with it, what applications it's used for, so i'll keep my eye on it.

nice work

 
This thread contains 56 messages.
First Previous ( To view more messages, select a page: 0 1 ... out of 1) Next Last
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.