Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: JSFML - A Java binding for SFML  (Read 51301 times)

0 Members and 3 Guests are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
JSFML - A Java binding for SFML
« Reply #45 on: August 01, 2011, 06:28:51 pm »
And it is the AudioDevice which prevents the application from exiting??
Laurent Gomila - SFML developer

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
JSFML - A Java binding for SFML
« Reply #46 on: August 06, 2011, 09:11:46 am »
Quote from: "Laurent"
And it is the AudioDevice which prevents the application from exiting??

Yes.
I just created a Destroy() method for myself to make exactly sure of this.
When I manually destroy the AudioDevice from my Java application, the OpenAL thread will be stopped and the application will exit properly.

I don't know why the global exit destructor does not work inside the JVM heap space, but even if I knew I doubt there would be anything I could do about it. So if it doesn't take too much time from other things, I'd appreciate this to be a 2.0 feature already.
JSFML - The Java binding to SFML.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
JSFML - A Java binding for SFML
« Reply #47 on: August 06, 2011, 09:58:29 am »
Ok, I see :?
Laurent Gomila - SFML developer

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
JSFML - A Java binding for SFML
« Reply #48 on: August 24, 2011, 05:07:11 pm »
Ported the new / changed sf::Texture, sf::RenderTexture and sf::Image classes.
JSFML - The Java binding to SFML.

coolhome

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
JSFML - A Java binding for SFML
« Reply #49 on: August 31, 2011, 04:38:29 am »
Quote from: "pdinklag"
Ported the new / changed sf::Texture, sf::RenderTexture and sf::Image classes.


Very nice! Keep up the good work! Can't wait to play with this when its released.

-Slightly off topic below-
I just started a test project to use JNI and I figured why not use SFML for fun. I got the sf::Clock usable in java. Then I googled jsfml and found this! Man I thought I was being original! Oh well, at least I can say I played with JNI ;)
CoderZilla - Everything Programming

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
JSFML - A Java binding for SFML
« Reply #50 on: August 31, 2011, 11:16:43 pm »
Heh. :)
I'm not the first doing this either, but whoever worked on it first cancelled it.

I should definitely do some "demo" source and binary releases soon, been saying this for months. :roll: Things are working well, but I've still only tested on Win32, and besides there's one large SFML2 change still coming up (new Drawable API) which I'm waiting for.

Recently I've mostly worked on the javadoc, the latest version of that is currently up here: http://stuff.pdinklag.de/jsfml/javadoc/
JSFML - The Java binding to SFML.

coolhome

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
JSFML - A Java binding for SFML
« Reply #51 on: September 01, 2011, 01:45:31 am »
Quote from: "pdinklag"
Heh. :)
I'm not the first doing this either, but whoever worked on it first cancelled it.

I should definitely do some "demo" source and binary releases soon, been saying this for months. :roll: Things are working well, but I've still only tested on Win32, and besides there's one large SFML2 change still coming up (new Drawable API) which I'm waiting for.

Recently I've mostly worked on the javadoc, the latest version of that is currently up here: http://stuff.pdinklag.de/jsfml/javadoc/


I seen that thread a long time ago and noticed it died. So yesterday I got bored and I've always wanted to try JNI so I had some fun.

I'm excited for the demo. If you need anything just let me know I would love to help. Totally reasonable for waiting. I had to change so much of my code in the past few months with these internal changes.
CoderZilla - Everything Programming

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
JSFML - A Java binding for SFML
« Reply #52 on: September 29, 2011, 01:08:34 pm »
Still waiting for the new graphics API to be finished before I continue. However, that seems to be the case soon. :)

Meanwhile, I tried to build and run JSFML on Linux, and except for a few problems (especially with the Swing integration), everything seems to work fine. Linux support is not too far away. :)
JSFML - The Java binding to SFML.

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
JSFML - A Java binding for SFML
« Reply #53 on: September 30, 2011, 12:25:57 pm »
I started refactoring the chaos that is my C++ code and sorting stuff in general.  :lol:
Once that's done, I will create a github repository for this project.
JSFML - The Java binding to SFML.

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
JSFML - A Java binding for SFML
« Reply #54 on: October 02, 2011, 01:12:09 pm »
Here's a website prototype: http://jsfml.pdinklag.de/
The logo is greatly inspired by Haikarainen's new SFML logo, the color scheme by Oracle's decision to pick red for Java. :)

I also decided to release this under the zlib/png license like SFML itself. I already created a github repository, which is still empty. I'm still refactoring and moving around here and there before I will fill it.
JSFML - The Java binding to SFML.

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
JSFML - A Java binding for SFML
« Reply #55 on: October 02, 2011, 09:40:29 pm »
Worked on "self-containment" and loading resources from InputStreams today. With self-containment I mean that JSFML will extract the required binaries from its own jar file into the user's home directory, much like Minecraft does it. What this ultimately means is that JSFML can be used in Java web applets! For Windows this already works perfectly, I have yet to fix some AWT integration problems in Linux.
JSFML - The Java binding to SFML.

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
JSFML - A Java binding for SFML
« Reply #56 on: October 15, 2011, 11:35:48 am »
Here's a first little demonstration:
http://jsfml.pdinklag.de/?page=demo

You'll have to trust the publisher. I'm not entirely sure why it's "UNKNOWN" as I entered my name in the certificate, but I'll try to fix this soon.

Would be cool if somebody could try this and report possible problems. Note the focus is on that it works at all, not the sloppy game. ;) You'll have to refresh the page if you want to restart. There should be sounds and a waving JSFML logo in the background (shaders!), also input should work.

It's currently Windows 32-bit only. Windows 64-bit users should be able to run it as well, because most browsers are 32-bit and have a 32-bit Java plugin installed.

KNOWN PROBLEMS:
  • After refreshing the page, rendering might suddenly stop working.
JSFML - The Java binding to SFML.

jscombs91

  • Newbie
  • *
  • Posts: 1
    • MSN Messenger - jscombs91@gmail.com
    • View Profile
JSFML - A Java binding for SFML
« Reply #57 on: October 17, 2011, 05:05:10 am »
Looks great. Only problem I've seen was on refresh the applet was white and the audio was "frozen" and kept repeating the same sound, but that only happened once. Definitely following this project and hopefully going to use it soon. Thanks a lot, pdinklag.

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
JSFML - A Java binding for SFML
« Reply #58 on: October 17, 2011, 07:24:45 pm »
Thank you for the support! :)

Ah yes, I had that problem a few times when testing, but never in the web browser applet, good to know it occurs there as well. For some reason the JSFML "game loop" thread misses that the applet becomes visible. I hope I can fix this.

A friend of mine reported a crash in the JVM when the graphics system was unloaded, I will try and investigate.
JSFML - The Java binding to SFML.

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
JSFML - A Java binding for SFML
« Reply #59 on: December 04, 2011, 07:43:47 am »
Just noticed the new graphics API (or at least some kind of release candidate of it) has been pushed to github. I have little time at the moment, life is keeping me busy, but I'll continue work on JSFML later this month. Just so nobody thinks this is dead - it's not at all! :)
JSFML - The Java binding to SFML.