Setting up and running furballz src

hey all.



So i got the idea that it was about time that i start studying the code of a working game and I figured furballz fit the bill. At first I tried setting furballz up as its own project in eclipse, and referencing my jme project. But that wasnt going too hot, and even with the library path set it was giving me trouble. So i figured what the heck, why not just past the src/data into my jme project and run from there, that way i wouldnt get these stupid lwjgl errors. But alas I`m getting errors again…I saw in a thread that the sound code was changed because it had been broken, but even with the latest code from the home page copied directly into my working jme directory i get the following error:


Could not load image...

Looks like the app is unable to load your sound files.  How do you have those placed in your project dir?

i just did a direct copy and paste to the jme project folder…so the sounds are under C:eclipseworkspacejmedatasfx



edit:



upon closer inspection…



I have FurBallz setup in its own project which points to jME as a project dependency.  The lwjgl problems you mention are solved via placing a copy of the lwjgl.dll and lwjglaudio.dll files in the FurBalls workspace folder or changing the working directory to the jME workspace folder.



Also (and this is likely the answer to your current problem) I have the data folder jarred up as data.jar and added to my project classpath.  The whole loading scheme can be tricky in Java…  Placing it in a jar in the classpath helps though.

well the good news is that creating data.jar made the furballz splash screen display correctly.



The bad news is that i get a new error


com.jme.system.JmeException: Bad file name: SF-02.JPG*null
at com.jmex.model.XMLparser.JmeBinaryReader.buildTexture(JmeBinaryReader.java:839)
at com.jmex.model.XMLparser.JmeBinaryReader.readBegining(JmeBinaryReader.java:166)
at com.jmex.model.XMLparser.JmeBinaryReader.loadBinaryFormat(JmeBinaryReader.java:112)
at com.jmex.model.XMLparser.JmeBinaryReader.loadBinaryFormat(JmeBinaryReader.java:141)
at com.jme.furballz.scene.ShipFactory.loadShip(ShipFactory.java:60)
at com.jme.furballz.FurBallzGame.addShips(FurBallzGame.java:686)
at com.jme.furballz.FurBallzGame.initFurGame(FurBallzGame.java:458)
at com.jme.furballz.FurBallzGame.initGame(FurBallzGame.java:428)
at com.jme.app.BaseGame.start(BaseGame.java:63)
at com.jme.furballz.FurBallzGame.main(FurBallzGame.java:170)


again i am mistified, as it seems to be able to load the splash screen from the jar just fine...and SF-02.JPG does exist in the jar

im not sure why atts.get("URL") in JmeBinaryReader is null .[com.jmex.model.XMLparser.JmeBinaryReader.buildTexture(JmeBinaryReader.java:839)]

Thanks again for any help you can give me.

Check the upper and lower case of the name vs. the source code.  That's usually the problem in a "case" like that.  (sorry bad pun)

ok this is getting annoying.



I tooled around with things a tad and now i have the game working, but when one of the ships is destroyed I get


java.lang.NullPointerException
at com.jme.furballz.scene.weapon.LaserShot.showShotDeath(LaserShot.java:124)
at com.jme.furballz.scene.PlayerShip.checkForHits(PlayerShip.java:252)
at com.jme.furballz.FurBallzGame.checkStatus(FurBallzGame.java:837)
at com.jme.furballz.FurBallzGame.updateWorld(FurBallzGame.java:725)
at com.jme.furballz.FurBallzGame.update(FurBallzGame.java:237)
at com.jme.app.BaseGame.start(Unknown Source)
at com.jme.furballz.FurBallzGame.main(FurBallzGame.java:170)


is there anychance you could zip your project folder for furballz and just let me dload it....cuz this is frustrating, and i dont think other people are getting the kind of errors that i am.

Actually, I think you are correctly setup now because I just got that error too.  Looks like it is something that has changed in the engine in the last couple of months.  :(  I'll look at tracking it down tomorrow.

ok, well its nice to know its not just me. I look forward to things being sorted out.



I appreciate the help you gave me.



ps



what is the eta for version .9?

Sorry I got to this a day later than I wanted to.  Anyhow, looks like FurBallz was relying on a bug in jME that kept the parent field of a Spatial set when that child was removed from a Node.  In other words, the child link was severed, but the link back to the parent was not.  I've fixed this and have updated the source.  Things seem to work well now.  Let me know though.

thanks a bunch renanse, I`m really looking forward to getting into furballz…oh man…that didnt sound right…maybe you should change the name…lol.



anyway…lame jokes aside…I really appreciate your help.



one last comment though…the audio ingame seems to default to a rather low volume…could this be connected to the audio problems from way back when?



other then that it runs great now.



also, is it possible to set things up so that you dont have to create data.jar?..If not, may i humbly suggest you add it to your download package so that newbs like me dont ask you the exact same question.



lastly, is there an eta for the next version of jme?

I guess the src zip was meant to be simply source for the curious, but I'll look at throwing in the zip as you suggest.  As for the sound being low, I'm not sure.  I'd have to say that sound has been fairly low priority compared to the visual part of the scenegraph, so I'm sure there are several issues waiting to be fixed there.



As for .9, it will be done when it's done.  :P  But seriously, work is being accomplished.  I couldn't guess at an exact date though.  Sorry.  The good news is, if you are using the most recent cvs all of the time, you are slowly getting .9.  :slight_smile: