
- 1
- 2

![]()
Jabaco Source
1 2 3 4 5 6 7 8 9 10 Public Function LoadResData(resID As IResource) As InputStream Set LoadResData = Nothing Set LoadResData = getClass.getResourceAsStream(resID) End Function Public Function GetWavResClip(ResID As IResource) As Clip Set GetWavResClip = Nothing GetWavResClip = AudioSystem.getClip GetWavResClip.open(AudioSystem.getAudioInputStream(LoadResData(ResID))) End Function
Hmmm.... seems that the compiler do more then what I have expected. Have decompiled your last index.jar with the FernFlower decompiler. This is the code of this two function:
|
|
Jabaco Source |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
public InputStream LoadResData(IResource resID) { InputStream LoadResData = null; Object Err = null; try { this.lblStep.$Caption("20.0"); LoadResData = null; this.lblStep.$Caption("20.1"); LoadResData = super.getClass().getResourceAsStream(resID.toString()); this.lblStep.$Caption("20.2"); } catch (Throwable var6) { Interaction.MsgBox((Throwable)var6); return LoadResData; } return LoadResData; } public Clip GetWavResClip(IResource ResID) { Clip GetWavResClip = null; Object Err = null; try { this.lblStep.$Caption("21"); GetWavResClip = null; GetWavResClip = AudioSystem.getClip(); GetWavResClip.open(AudioSystem.getAudioInputStream(this.LoadResData(ResID))); } catch (Throwable var6) { Interaction.MsgBox((Throwable)var6); return GetWavResClip; } return GetWavResClip; } |
To port it back to Jabaco, it would be
|
|
Jabaco Source |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Public Function LoadResData(resID As IResource) As InputStream lblStep.Caption = 20.0 Set LoadResData = Nothing lblStep.Caption = 20.1 Set LoadResData = getClass.getResourceAsStream(resID) lblStep.Caption = 20.2 End Function Public Function GetWavResClip(ResID As IResource) As Clip lblStep.Caption = 21 Set GetWavResClip = Nothing GetWavResClip = AudioSystem.getClip GetWavResClip.open(AudioSystem.getAudioInputStream(LoadResData(ResID))) End Function |
Possible the compiler integrates as this way additional debug-code or something else. I only wonder about this.
Greatings
theuserbl
As I suspected, it appears playing sounds while under linux is just not a go right now, not the same way at least...
Btw, the applet worked completely normally for me, via Firefox on KDE running on Slackware Linux.. via Virtual Box..
I have updated the jar file on the site, try clearing your cache and reloading the page... the login screen should now say "JRPGT 2.9c" in green... if it says 2.9b, the cache wasnt cleared.
I have set it so that if its not running under Windows, to completely disable the sound, this should allow us to know if that is the main problem or not.
As far as the lines your seeing in the decompiled code that look like:
lblStep.Caption = "46.1"
... Those are markers I have purposely put in the code itself to trouble shoot some major issues, that do not always result in an exception dialog...
-Jason
Btw, the applet worked completely normally for me, via Firefox on KDE running on Slackware Linux.. via Virtual Box..
I have updated the jar file on the site, try clearing your cache and reloading the page... the login screen should now say "JRPGT 2.9c" in green... if it says 2.9b, the cache wasnt cleared.
I have set it so that if its not running under Windows, to completely disable the sound, this should allow us to know if that is the main problem or not.
As far as the lines your seeing in the decompiled code that look like:
lblStep.Caption = "46.1"
... Those are markers I have purposely put in the code itself to trouble shoot some major issues, that do not always result in an exception dialog...
-Jason
I have set it so that if its not running under Windows, to completely disable the sound, this should allow us to know if that is the main problem or not.
I have tested it. And now it worked really normal. Only two NullPointerException windows exists.
But the said one of this windows is, that a VB#Timer or so creates this exception. When I close the Exception-window, it comes again and again.
I only wonder, why on Windows the exceptions are not called. And why the program even though the exceptions are called, the program runs normal.
But the exception window are crazy. They exists and comming again and again until the JavaVM is completely terminated. And that is only the case, if I close my browser. :-( But it can be possible, that this is a bug of the Jabaco Framework, that the window comes again and again.
Oh, one NullPointerException comes after I close the program:
|
|
Source code |
1 2 3 4 5 6 7 8 |
java.lang.NullPointerException at VB.PictureBox.PaintPicture(PictureBox.jsrc) at Applet1.SetSpriteTile(Applet1.jsrc:436) at Applet1.AniLogo(Applet1.jsrc:853) at Applet1.Timer2_Timer(Applet1.jsrc:833) at Applet1$Timer._Timer(Applet1.jsrc:2334) at VB.Timer.actionPerformed(Timer.jsrc) [... etc] |
Java sound in general worked on my System.
This one works without problems:
http://www.jsresources.org/examples/Simp…layer.java.html
Greatings
theuserbl
The exception when closing the applet, is normal.
However, the exception you are getting while trying to run the applet, ... what does it say in the step count label? I have attached a screenshot of where that is. It should be a green number... Do you still get sound? And what does the OS name say when you first load the applet? Simply "Linux" ? (under JRPGT .... on login screen)
Thanks,
However, the exception you are getting while trying to run the applet, ... what does it say in the step count label? I have attached a screenshot of where that is. It should be a green number... Do you still get sound? And what does the OS name say when you first load the applet? Simply "Linux" ? (under JRPGT .... on login screen)
Thanks,
Im guessing the green step label says '9' ... If so, this is the line of code it is referring to:
And i have no idea what is wrong with it... it is the line of code the picks each users sprite out of a set, cuts it out, pastes it into picCurTile1, and then uses PaintPicture to blt it onto picBuffer2, ... its part of the animation loop. I wonder why it has no issues using PaintPicture other places but yet it does here?? And only on linux.. your flavor of linux to be precise..lol. This issue is not present on Slackware running KDE... it seems like Jabaco framework also had issues with GetWavResData on your flavor of linux too.. but not mine =(
|
|
Jabaco Source |
1 |
picCurTile1.PaintPicture picSprites.Image, (txsrc * 32),(tysrc * 64), (txsrc * 32) + 32,(tysrc * 64) + 64, 0, 0, 32, 64 |
And i have no idea what is wrong with it... it is the line of code the picks each users sprite out of a set, cuts it out, pastes it into picCurTile1, and then uses PaintPicture to blt it onto picBuffer2, ... its part of the animation loop. I wonder why it has no issues using PaintPicture other places but yet it does here?? And only on linux.. your flavor of linux to be precise..lol. This issue is not present on Slackware running KDE... it seems like Jabaco framework also had issues with GetWavResData on your flavor of linux too.. but not mine =(
It is already before the login. It is a short time "38" and switches fast to "30". After some time it changed for a short time again to "38" and back to "30". And so on.
I have no idea if the error comes before "30" or "38" or with this. Because it goes so fast.
My Java-Version I have alraedy postet at
[ http://www.jabaco.org/board/p2988-orpg-i…t.html#post2988 ]
Java 6
Greatings
theuserbl
I have no idea if the error comes before "30" or "38" or with this. Because it goes so fast.
My Java-Version I have alraedy postet at
[ http://www.jabaco.org/board/p2988-orpg-i…t.html#post2988 ]
Java 6
Greatings
theuserbl
Bugs fixed
Just an update on jrpgt...
I recently have fixed many, many bugs within the Jabaco Client and the Server source. Its current version is 2.94L, I have also updated the client source zip file link mentioned previously in this thread.
At this point, there are several utility programs that are part of the server package. You could literally use the client applet, server, and utilities I have created here, throw in your own graphics, create your own maps, and have a completely different game... the only thing is the graphics are embedded into the Jabaco project.. so you would have to do some editing to the applet, but not much.
I added smooth scrolling on all character sprites.. there are still a few bugs minor glitches to fix involving that (mainly when changing maps.. it draws characters either on the wrong side of the map or at position x0,y0 for a split second) .. also now all weapons are globally visible to each other (swords, arrows, bombs, and now magic dust).. soon NPCs will be able to use weapons besides standard sword too.
Currently only HP exists as a score, but soon LVL will be added, along with more 'character actions', pick up/drop objects, and some other misc things.
I still have a few minor game play bugs to work on.. but almost all of the major bugs have been fixed.
Sincerely,
Jason
I recently have fixed many, many bugs within the Jabaco Client and the Server source. Its current version is 2.94L, I have also updated the client source zip file link mentioned previously in this thread.
At this point, there are several utility programs that are part of the server package. You could literally use the client applet, server, and utilities I have created here, throw in your own graphics, create your own maps, and have a completely different game... the only thing is the graphics are embedded into the Jabaco project.. so you would have to do some editing to the applet, but not much.
I added smooth scrolling on all character sprites.. there are still a few bugs minor glitches to fix involving that (mainly when changing maps.. it draws characters either on the wrong side of the map or at position x0,y0 for a split second) .. also now all weapons are globally visible to each other (swords, arrows, bombs, and now magic dust).. soon NPCs will be able to use weapons besides standard sword too.
Currently only HP exists as a score, but soon LVL will be added, along with more 'character actions', pick up/drop objects, and some other misc things.
I still have a few minor game play bugs to work on.. but almost all of the major bugs have been fixed.
Sincerely,
Jason
Version 2.95b
Hello,
I have fixed a lot of more things in Jrpgt. I have updated the packet splitter, seems as if there was some inconsistency in it, on both the server and client, but not anymore. It is quite a bit faster on map file transfers too.. Bad error correction was causing a random tile, or two per map to be drawn as the incorrect tile, sometimes.. usually only when the map contained a lot of non-blank tiles. Anyways, I am happy to say that issue is gone, along with many other very annoying problems.
I will be working on a new tileset, new spriteset, and new interface graphics soon. After that, dropable/pickable items.. item handicaps/enhancements, items when you kill something, several different levels of skill, and a different HP system. A few premade spells.. At that point, I will be close to being done with this project after making a few things 'more customizable' (animated tile cords not preset in applet code anymore.. ability to customize 'game messages, etc--I want one to be able to use this applet and server how they want to without having to edit the applet or server). I will keep updated.
Sincerely,
-Jason
I have fixed a lot of more things in Jrpgt. I have updated the packet splitter, seems as if there was some inconsistency in it, on both the server and client, but not anymore. It is quite a bit faster on map file transfers too.. Bad error correction was causing a random tile, or two per map to be drawn as the incorrect tile, sometimes.. usually only when the map contained a lot of non-blank tiles. Anyways, I am happy to say that issue is gone, along with many other very annoying problems.
I will be working on a new tileset, new spriteset, and new interface graphics soon. After that, dropable/pickable items.. item handicaps/enhancements, items when you kill something, several different levels of skill, and a different HP system. A few premade spells.. At that point, I will be close to being done with this project after making a few things 'more customizable' (animated tile cords not preset in applet code anymore.. ability to customize 'game messages, etc--I want one to be able to use this applet and server how they want to without having to edit the applet or server). I will keep updated.
Sincerely,
-Jason
JRPGT Client & Mapeditor source code & server executables
http://www.tecktronic.net/jrpgt/jrpgt_clientsrc.zip
I have updated & included here a link to the source code for the JRPGT client and online map editor. I have also included the required server daemon and utilities executables. A few things to know about the server/client. You must host the client applets on a web server, define in the source code your servers hostname, and open port 21 (port forwarding) on your firewall to this domain/hostname. Static IP or hostname is recommended for best results. I also would recommend putting the server executable in the servers startup, and enable auto console logon feature of windows.
First, whatever directory your JRPGTD server executable sits in, a sub directory 'Userdata' must exists (Ex: C:\JRPGTD\Userdata). The server executable must have full read/write privs on C:\JRPGTD (or whatever directory you use), and its sub directories. Sub directory 'newmaps' in the server directory--this is where maps get saved when an anonymous map upload occurs via the web applet map editor.
A few utilities the server comes with..
IP2L.exe .. this accepts some information about the person joining the game, and converts it to their logon date/time, nickname, and country flag and appends it to the file C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\visitors.html
MAILMSG.exe uses settings from file settings.dat in server directory. It sends an email to the specified receiver (line 3 of settings.dat). Its 'from' address is defined in line 4. Line 1 is the smtp server to use, and line 2 is the port number to use to connect to smtp server.
USERPASSEDIT.EXE allows the server admin the edit/maintain users passwords (userbank.dat). I have not yet integrated user password changing into the client/server.
Even if you are not using the web interfacing with the Server daemon, this directory ('c:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\') should exist or the server may crash when it tries to write files to this directory.
The current version is at 2.99. I will be adding a few more features for version 3.0, and this may very well be the last version I work on for this project.
If anybody has any questions, please free feel to ask.
Regards,
Jason Shinkle
www.tecktronic.net
I have updated & included here a link to the source code for the JRPGT client and online map editor. I have also included the required server daemon and utilities executables. A few things to know about the server/client. You must host the client applets on a web server, define in the source code your servers hostname, and open port 21 (port forwarding) on your firewall to this domain/hostname. Static IP or hostname is recommended for best results. I also would recommend putting the server executable in the servers startup, and enable auto console logon feature of windows.
First, whatever directory your JRPGTD server executable sits in, a sub directory 'Userdata' must exists (Ex: C:\JRPGTD\Userdata). The server executable must have full read/write privs on C:\JRPGTD (or whatever directory you use), and its sub directories. Sub directory 'newmaps' in the server directory--this is where maps get saved when an anonymous map upload occurs via the web applet map editor.
A few utilities the server comes with..
IP2L.exe .. this accepts some information about the person joining the game, and converts it to their logon date/time, nickname, and country flag and appends it to the file C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\visitors.html
MAILMSG.exe uses settings from file settings.dat in server directory. It sends an email to the specified receiver (line 3 of settings.dat). Its 'from' address is defined in line 4. Line 1 is the smtp server to use, and line 2 is the port number to use to connect to smtp server.
USERPASSEDIT.EXE allows the server admin the edit/maintain users passwords (userbank.dat). I have not yet integrated user password changing into the client/server.
Even if you are not using the web interfacing with the Server daemon, this directory ('c:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\') should exist or the server may crash when it tries to write files to this directory.
The current version is at 2.99. I will be adding a few more features for version 3.0, and this may very well be the last version I work on for this project.
If anybody has any questions, please free feel to ask.
Regards,
Jason Shinkle
www.tecktronic.net

- 1
- 2

Similar threads
-
General topics, questions and discussions »-
Redirect web page from applet
(Dec 3rd 2009, 5:07am)
-
Allgemeine Themen, Fragen und Diskussionen »-
Security Meldung
(Sep 15th 2009, 9:09pm)
-
Allgemeine Themen, Fragen und Diskussionen »-
Übergabe von daten über http
(Mar 1st 2009, 9:54pm)
-
Allgemeine Themen, Fragen und Diskussionen »-
Verwendung von Jabaco als Steuerungszentrale
(Jun 9th 2009, 7:50am)
-
General topics, questions and discussions »-
how to implement mouse and keyboard events in an Applet?
(Mar 15th 2009, 12:43pm)
