I mentioned something like this before:
THE AUTHOR OF SLICK2D ALREADY THOUGHT OF ALMOST EVERYTHING FOR YOU. YOU DON’T HAVE TO WORRY ABOUT STUFF. SO DON’T. WORRY ABOUT STUFF.
After my various struggles with getting CTYR working on linux and mac, I did a brief pre-prototype of JetLag (which means: an application that has an ASCII grid that randomly changes once per frame)
And, just for a lark, went through the following procedure:
- export my common library (pdgcommon) into pdgcommon.jar
- export my game (jetlag) into jetlag.jar
- Fire up jarsplice
- add pdgcommon.jar and jetlag.jar
- also add slick.jar, lwjgl.jar, and the jogg and jorbis jar
- *IMPORTANT* add the natives-(operatingsystem).jar files
- DON’T BOTHER ADDING ANY NATIVES, THEY ARE IN THE JAR FILES FROM STEP 6
- Set the correct mainclass (in my case, com.pdg.jetlag.Program)
- make the fat jar
- Put it in my dropbox public folder
- download on linux and mac
What I had been doing before was adding the natives I downloaded from lwjgl. *FACEPALM*. I needed NOTHING outside of the slick/lib folder. IT WAS ALL JUST THERE ALL ALONG!
So now, a couple of links:
CTYR that works on windows, mac, and linux.
JetLag pre-prototype that also works on windows, mac, and linux.
And now some screenshots, in the spirit of the internet being the refrigerator upon which we affix all of our proud works with magnets.
Both working on the mac:
And CTYR working on ubuntu
And jetlag working on ubuntu
I have the fps counter working on the JetLag pre-prototype.
On my windows machine (not shown), I am getting 43 FPS.
On the mac machine, I am getting 44 FPS.
On the linux machine, I am getting 10 FPS, which isn’t bad for a Dell Inspiron B120.
In other events leading up to this iteration of JetLag:
I had a version I was doing last year in C#.
For this version, I decided to make a small PNG for each of the characters in each of the colors.
I generated these programmatically.
For the Java version, I decided to import them and make use of them.
4096 16x16px images are about 670K, which isn’t bad, but I don’t actually need them.
Slick2D has a nifty colorizing function that will take the white one and shade it whatever color I want.
It also has a way provided that I can use a single PNG and split it into a tilesest which I haven’t investigated.
For anyone’s perusal, I have the flash version of jetlag stripped down to its bare essentials (I was in a weird minimalist phase, and sucked most of the campy fun right out of jetlag) available.