Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Is ZC a closed source project?

32 replies · 8,039 views · Started 12 April 2007

Eliwood wrote:Swing and AWT are not graphics libraries. They are GUI libraries.

I'm not sure I appreciate the distinction; as far as I'm concerned an API to draw primitives on a canvas => graphics library. Whether or not the library has additional functionality is entirely irrelevant.

Pointless semantics aside, I didn't know those two libraries existed, and am quite intrigued; one of my current research projects is a rapid prototyping framework whose server makes use of Java's dynamic class loading to allow users to replace simulation rules on the fly (much like Second Life). However the client has become unacceptably sluggish; I'd been thinking I'd need to port it to get back reasonable performance. I take it these Java OpenGL libraries have performance comparable to C++ implementations?

DarkDragon wrote:I take it these Java OpenGL libraries have performance comparable to C++ implementations?

They have identical performance to their C counterparts given that they are just Java-wrapped calls to the actual library thanks to JNI. The same goes for a host of other native libraries such as OpenAL, FMOD and more. Hobbyists and myself prefer LWJGL because it caters slightly better towards game development and also adopts a minimalist philosophy, but both end up doing the job equally well.

What has your profiler said about any potential bottlenecks in your code? Although Java2D is a major processor hog, it may not be the entire reason for the sluggish performance you are perceiving.

- Eliwood

Approximately 70% of execution time is spent inside rendering methods. Of the remaining 30% the majority is in networking code that I can't really optimize further.
Turning off alpha blending helps a lot, but is not an acceptable long-term solution.