Java SDL Take two

I hate GPG :frowning:

Anyways, as I’m not certain that last message got out, here is the gist of
it. I seem to remeber that someone was working on the SDL port to Java,
inspired by my recent success at getting a minor SDL app done with
the JNI bindings, after reading the docs this morning, I’d like to
help. If no one is really tackling it, I’d be happy to start development
up.

If you are working on it please contact me, and if not but are
interesting in such a beast I’d also like you to contact me.

It will be a nice break from writing ther perl port :)–

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
David J. Goehrig #include <stdclaimer.h> dgoehrig at valinux.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Yes, I’d be very interested in a Java port of SDL.
Why? Because while using SDL via PyGame makes me
want to shout in delight at the power and ease
of use of that mucho excellent language, I have
seen a vanilla Java graphics applet
(http://rsb.info.nih.gov/plasma/), without any
additional coding effort, take advantage
of dual CPUS to nearly double its performance
(I get 100% dual CPU utilization without slowing
down other stuff). I would love to find out that
Python would be that amenable to multiprocessing
(specially because it has microthreads), but so
far all evidence points to the contrary.

Am I right in assuming though that such a Java
SDL port would have to be reimplemented on each
platform because it uses JNI (or other NIs)?> ----- Original Message -----

From: dgoehrig@valinux.com (David Goehrig)
Newsgroups: loki.open-source.sdl
Sent: Sunday, March 18, 2001 8:22 AM
Subject: Java SDL Take two

I hate GPG :frowning:

Anyways, as I’m not certain that last message got out, here is the gist of
it. I seem to remeber that someone was working on the SDL port to Java,
inspired by my recent success at getting a minor SDL app done with
the JNI bindings, after reading the docs this morning, I’d like to
help. If no one is really tackling it, I’d be happy to start development
up.

If you are working on it please contact me, and if not but are
interesting in such a beast I’d also like you to contact me.

It will be a nice break from writing ther perl port :slight_smile:

“David Goehrig” wrote in message
news:20010317161837.B12362 at valinux.com

I hate GPG :frowning:

Anyways, as I’m not certain that last message got out, here is the gist of
it. I seem to remeber that someone was working on the SDL port to Java,
inspired by my recent success at getting a minor SDL app done with
the JNI bindings, after reading the docs this morning, I’d like to
help. If no one is really tackling it, I’d be happy to start development
up.

If you are working on it please contact me, and if not but are
interesting in such a beast I’d also like you to contact me.

It will be a nice break from writing ther perl port :slight_smile:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-=-
David J. Goehrig #include <stdclaimer.h> dgoehrig at valinux.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-=-

Actually yes, there is someone working on a Java port of SDL. I am
interested in this as well, and have started working on it myself. :slight_smile:
The other guy (John Susi) who is working on it is stalled because of his
job, and the only reason that I haven’t waited for him is that I’m
having fun in JNI and I’m at a slow point in MY job.

Anyway, the point is, I think everyone interested in this should get

together so work isn’t duplicated. I’ve taken a more object-oriented
approach to the port than John, who told me that his port is basically
one class with a bunch of static native methods. I’d be happy to show
you guys what I’ve got, as well as host a project in CVS on our server
here.

Here's some sample code (everyone loves sample code):

    SDL sdl = SDL.getInstance();
    if (!sdl.init(SDL.SDL_INIT_VIDEO)) {
        debug("Failed to initialize SDL.");
        return;
    }

    SDLVideo video = sdl.getVideo();
    SDLVideoInfo vidinfo = video.getVideoInfo();
    SDLPixelFormat format = vidinfo.getPixelFormat();
    SDLSurface surf = video.setVideoMode(640, 480, 24,

SDLVideo.SDL_DOUBLEBUF);
if (surf == null) {
debug(“Failed to create SDL surface.”);
return;
}
sdl.quit();

Also, to answer Andy's question about reimplementing for each platform
  • the JNI code can be written in a cross platform manner…but it will
    of course need to be compiled for each platform.

Eric Wittmann
ericw at mirrorworlds.com

David Goehrig wrote:>

I hate GPG :frowning:

Anyways, as I’m not certain that last message got out, here is the gist of
it. I seem to remeber that someone was working on the SDL port to Java,
inspired by my recent success at getting a minor SDL app done with
the JNI bindings, after reading the docs this morning, I’d like to
help. If no one is really tackling it, I’d be happy to start development
up.

If you are working on it please contact me, and if not but are
interesting in such a beast I’d also like you to contact me.

It will be a nice break from writing ther perl port :slight_smile:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
David J. Goehrig #include <stdclaimer.h> dgoehrig at valinux.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

I’ve actually been sitting on a partially-complete implementation of a
Java->SDL interface:

http://www.fasterlight.com/hugg/projects/jsdl.html

My API so far looks remarkably similar to Eric’s, though I don’t have a
top-level “SDL” object. My reason for writing this is so I can
eventually tie-in to GL4Java and get rid of AWT forever.

Maybe we should combine our efforts and come up with a full-fledged
impl?

ericw at mirrorworlds.com wrote:>

    Actually yes, there is someone working on a Java port of SDL.  I am

interested in this as well, and have started working on it myself. :slight_smile:
The other guy (John Susi) who is working on it is stalled because of his
job, and the only reason that I haven’t waited for him is that I’m
having fun in JNI and I’m at a slow point in MY job.