Uncategorized

How to just trust @cokeandcode, and thus not be an idiot

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:

  1. export my common library (pdgcommon) into pdgcommon.jar
  2. export my game (jetlag) into jetlag.jar
  3. Fire up jarsplice
  4. add pdgcommon.jar and jetlag.jar
  5. also add slick.jar, lwjgl.jar, and the jogg and jorbis jar
  6. *IMPORTANT* add the natives-(operatingsystem).jar files
  7. DON’T BOTHER ADDING ANY NATIVES, THEY ARE IN THE JAR FILES FROM STEP 6
  8. Set the correct mainclass (in my case, com.pdg.jetlag.Program)
  9. make the fat jar
  10. Put it in my dropbox public folder
  11. 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.

Uncategorized

Difficult, Not Difficult, and @cokeandcode

First, here’s a link to a stand-alone Click the Yellow Rhombus JAR file that works on my 32 Bit Windows 7 machine. No guarantees. Your mileage may vary.  I’ll be trying it out on my mac and linux machines shortly.

All the cool kids share their stuff on dropbox, I’m told.

Second, the tale of coming up with this JAR was harrowing.

Granted I am pretty much a Java n00b (although less and less as time goes on), I didn’t know some things.

One, resources (like PNGs and OGGs) need to be in the source tree. Handy tip.

Second, don’t export as a runnable jar and expect to jarsplice it into a big runnable jar that works.

Third, I’m still missing something important regarding making Applets.  I’ll be tackling this next.

And now we know.

 

Next, some stuff that has worked our marvelously.

Most importantly, Slick2D.

Here is why I really like Kevin Glass, author of Slick2D (@cokeandcode on “the twitter”).

Y’know how most of the time in any framework dealing with graphics in a particular language, there are those things that the library provides, and those things that your have to build.

For me, these things are typically state machines and resource managers.

I didn’t have to build the state machine. There’s already the basis for one there.

And a master volume control? Its there.

And xml functions that don’t suck (unlike any other xml functions I’ve seen in Java, which all DO suck), somewhat like the ones in .NET that I am used to working with.

Basically, he thought to make 99% of the stuff I usually need to make when coming to a new platform.

I still had to build my resource managers, but so many other things were just already there that I don’t mind.

In short, I’m able to work on content, and not framework.

Thanks, Kev!

Uncategorized

I like easy.

Development of software doesn’t have to be difficult.

I recall plenty of times when the platform I was working on didn’t know that.

In particular, the time I was dabbling in Objective-C for the iPhone.

At the time Xcode was hard to use.

I’ve heard it has gotten better, but there is just a bad taste in my mouth from it.

So, as one of the first steps towards my goals (stated yesterday), I came across JarSplice.

JarSplice is a really easy way to package the various pieces of a Java application as a single runnable JAR file, complete with natives.

This doesn’t help with the running in a browser part, but it does help with the running on a person’s desktop without having a huge tree of items to unpack. Just download the single JAR and go.

The applet part will be more complicated to set up (for me), but at the same site as JarSplice there are tutorials on it.

So basically, I will stand on the shoulders of Mr. Ninjacave, and be able to progress further in the quest.

—-

Next on the docket: the fate of PlayDeez.com.

Naturally, I want to keep it, but its current state (hopelessly broken) is no good, and I don’t want to be paying even the $4/month for the hosting.

So, I think I’m going to sign up for dyn.org’s service, get rid of the shared hosting on brinkster, and point playdeez.com to my little router at home and though that router to the little mac mini currently running MAMP.

My router is one of those that supports talking to dyn.org whenever its IP address changes, so we’re good to go there. I just have to set that and be done.