Announcing sdljava 0.9.0

Hello everyone,

I’m happy to announce the release of sdljava 0.9.0! sdljava is a
binding to the SDL API for java.

You can find it here:
http://sdljava.sourceforge.net

sdljava provides a complete binding to all the SDL API functions.
Almost the entire binding has been implemented. Please see the TODO
for a list of what is still pending.

Required/Recommended Libraries: (higher version should be fine)

 - Java 1.5
 - SDL 1.2.7
 
 - SDL_image 1.2.3 (optional)
 - SDL_mixer 1.2.5 (optional)
 - SDL_ttf 2.0.6   (optional)
 - SDL_gfx 2.0.13  (optional)
 - Ant 1.6.2       (optional, only if you need to compile
               sdljava.jar)
 - ruby 1.8.2      (optional, only if you want to re-generate
               native layer)
 - SWIG 1.3.22     (optional, only if you want to re-generate
               native layer)

Please let me know any questions, comments or feedback. I hope you
will find this useful!

Regards,
-Ivan/

It’s about time someone made an SDL binding to java.

And this thread should be in the java.net or in the shared code forum to get more atention.

nice!
This rekindles the whole java/lgpl issue :slight_smile:

Is it just me or does this seem targetted a bit awry?

I’ve got a feeling the announcement has changed since I originally looked (ISTR it had some unfortunate statement implying that sdljava was the only way you could write high quality games in java, apparently as if java didn’t have all the various features we’ve all been using without sdl…if there was something there fortunately somoeone noticed and corrected it. Or maybe it’s just my mind playing tricks on me), but even so it’s still a bit over-excited:

“Soon OpenGL will be available with extreme ease to java programmers via sdljava.”

Surely it already is, in a more convenient and appropriate manner (LWJGL), or in a manner with much greater longevity and support (i.e. sun’s backing), whilst still being open-source (JOGL)?

Of course I appreciate that for SDL programmers this could provide a gentle upgrade path into java, but it strikes me that that’s its only major benefit:
“sdljava lets C programmers move smoothly into java at minimal cost”

i.e. its not for java developers, but instead for people trying to migrate in.

Still is good to have an sdl java binding as an option to choose from. SDL has been used in many games and the code is very stable and eficient. It would be cool to have some examples compiled for this api that use advanced opengl techniques, like the nvidia demos.

It gives us a little competition. And honestly it provides stuff that we don’t actually do in LWJGL - I’m seriously investigating it for a 2D blitting library.

Cas :slight_smile:

Windows: SDL --> DirectX

Windows: Java2d --> Directx

???

Java2D --> Some complicated magic rubbish that invariably doesn’t work properly --> DirectX / OpenGL / Software
I think you’ll find.

Cas :slight_smile:

[quote]Java2D --> Some complicated magic rubbish that invariably doesn’t work properly --> DirectX / OpenGL / Software
I think you’ll find.
[/quote]
OpenGL --> A really complex method for blitting a few pixels to the screen, because it’s really designed for 3D. Has all kinds of “gotchas” that can potentially crash your program or your entire machine. Cas likes it because he’s used to it.

Java2D --> A very nice API that is still maturing in the gaming field. Can blit pixels just fine when used, but has a different set of “gotchas” than OpenGL. Different than OpenGL, so Cas hates it. :wink:

You can’t crash a machine through OpenGL, unless the video drivers are broken in the first place.

And it was designed to do both 2D and 3D with equal ease!

Cas :slight_smile:

[quote]You can’t crash a machine through OpenGL, unless the video drivers are broken in the first place.
[/quote]
The sad state of affairs, however, is that video drivers are perpetually broken. It’s easy to blame NVidia or ATI for this, but the truth is that the “Beta” drivers (back when NVidia called them “Detonator”) became so popular that constant driver upgrades are the rule rather than the exception. :frowning:

[quote]And it was designed to do both 2D and 3D with equal ease!
[/quote]
Definitely an advantage if you need something 3D in addition to something 2D. But if you just need to whip out a 2D game that runs on a wider variety of system configurations, then Java2D is where it’s at. :slight_smile:

I disagree with this, for two reasons.

  1. Java2D usually brings with it crap that devalues it. AWT crap, the evil events model / thread, etc.

  2. Rendering 2D on a 3D card has lots of very cool effects, including but not limited to:

  • scaling tricks
  • rotation tricks
  • hardware anti-aliasing
  • special effects (pixel shaders)

I’ve seen all of these used to achieve 2D games and “demos” (the pretty-looking flashy things) that would be impossible on the same hardware if rendering in 2D from the CPU.

This is especially true of per-pixel special effects, such as blurring and anti-aliasing, where using the 3D card’s built-in stuff to do this is IIRC an order of magnitude faster than using the CPU to do it and de-accelerating your images all the time.

Really, 2D using 3D hardware is the way forward, and the only barriers are the inconveniences currently of using 3D at all in java (“all permissions”, additional download, the noted hardware problems, etc). Personally, I’ve already hit the point where I won’t develop any more games using java2D because the combination of webstart and a now rather mature LWJGL has cured me of enough of the problmes - especially if I can referenece a shared LWJGL (either from lwjgl.org or from jgf.org) so that many people won’t even be downloading it.

[quote]1. Java2D usually brings with it crap that devalues it. AWT crap, the evil events model / thread, etc.
[/quote]
You know, to this day I still think Sun should have made AWT fully operational before worrying about Swing. There was no need for Swing, other than the fact that Netscape had their IWT library to cover the holes in AWT. Funny thing too. IWT worked a lot like SWT does. No wonder I hated it with a vengeance. :slight_smile:

[quote]2. Rendering 2D on a 3D card has lots of very cool effects, including but not limited to:
[/quote]
All well known, and I’m not disagreeing with them. However, you’re assuming that the target machine has:

  • OpenGL
  • A sufficiently powerful vid card
  • Operational 3D Drivers

And the more OpenGL features you use (Vertex Shaders?), the more you limit your market. Not a good thing if your customer is someone who wants a quick break to play a simple and mindless game, and doesn’t necessary want to upgrade his machine to do it.

[quote]I’ve seen all of these used to achieve 2D games and “demos” (the pretty-looking flashy things) that would be impossible on the same hardware if rendering in 2D from the CPU.
[/quote]
Which again misses the point. If you need a fun 2D game whipped out quickly that operates across the broadest range of machines, then Java2D is where it’s at.

If you want enough glitz to pack it into a shrink-wrapped box, then OpenGL bindings are the way to go.

[quote]Really, 2D using 3D hardware is the way forward,
[/quote]
I agree with you. So does Sun. That’s why the DirectX pipeline was created, and that’s why the OpenGL pipeline has been introduced. Sun’s biggest Java2D problem is that it’s not finished. All the necessary stuff is there to do the same effects as OpenGL, Sun just hasn’t yet accelerated most effects. :slight_smile:

Edit: Sorry, the Netscape toolkit was called IFC, not IWT. Got confused there. :slight_smile:

Edit 2: I’ll be damned, but you can still download IFC! How’s that for a trip to the twilight zone?

This thread is from a while back, but the reference to IFC got me all nostalgic. I completed a medium sized project with IFC back in 1997 that was a visual simulator of a single cycle implementation of MIPS (albeit a reduced instruction set).

I created a separate thread here to get some opinions and perhaps convince some folks running Linux to try it out as I’ve tested it through web start on win32 and OSX.

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=Announcements;action=display;num=1107534874

I must agree that an SDL binding for java makes little sense.
Java2D works just fine and it’s accelerated just fine on most systems. The “evil” event model is not all that hard to turn into something useful for game and using OpenGL is pretty easy as it is. The issue here being easy cross-platform’ness so why depend on one more native binding?

SDL makes little sense for a traditional Java programmer but it makes a lot of sense for a) someone who already knows SDL inside and out, migrating from C, and b) someone who might want to ship without the burden of AWT bloating their distribution.

Cas :slight_smile: