Monday, May 28, 2012

Libraries make things bigger :)

Decided to port my ~90 line XNA project TinyGame to Java using LibGDX, cuz, why not?
The setup (application wise) is fairly similar, and Java is a lot like C# right?

Well, it ended up taking quite a bit more time than I originally assumed (at about 3 hours), but it works, same as the original. Technically, it's actually a bit better now, as the XNA version has an issue with artifacts on some of the sprites due to the way the sprites are packed and  the way things get blended with floats.

One thing I'm not happy about is the 5MB package size... Compared to the 14k of the XNA version, it's a regular behemoth. Most of this though, has to do with how the required libraries get packed along for the ride (The code is only ~170 lines compared to ~90), and with that being said, it's a sight better than a 7MB installer required for XNA 4 (and it doesn't have that pesky Shader 1.1/2.0 requirement).

Anyway, if you're interested, you can download it here and give it a try.

As an added bonus, having written it using LibGDX means the "game" cross compiles to Android. Tested it out in an emulator using both 2.1 and 4.0 and it worked well enough. Too bad a device that fits the game (Tall 480,600 or so screen with keyboard) pretty much doesn't exist. XD

Thursday, May 24, 2012

A very tiny game!

So, last night over in XNAChat, a conversation led to someone mentioning having used 93 lines of code for a fairly trivial sounding task. This led to someone claiming that they'd seen games written with less lines than that. This, of course, I interpreted as a challenge, and got to work.

 Took a few of the sprites from the CQX project, hacked about for a couple hours and, 91 lines later, we have mission completed!



You can try the project out here, and if you want to see the terrifying code I came up with, you can look here.

Speaking of CQX; I've nearly finished refactoring the game state management system. Won't be long before it's functionally back to where it was with MUCH more maintainable, usable, extensible code. Stay tuned for more updates!

Monday, January 16, 2012

Just quick post...

Playing around in Java with LibGDX...



I think I could like this thing. Pretty easy to make it do this easy task. Very similar to the XNA I'm used to, but for the inverted Y.

Also, look out world! My terrible art is approaching!