Ludum Dare 23 - Forever Alone

So me and a friend, razorquick, participated our first ever Ludum Dare this past weekend!

I coded it using Java2D through my awesome game library while razorquick drew the amazing art.

In-depth description and gameplay can be found in the entry’s description.

Screenshots!

http://www.ludumdare.com/compo/wp-content/compo2/123793/4393-shot0.png

http://www.ludumdare.com/compo/wp-content/compo2/123793/4393-shot1.png

Play!

Don’t you think you should share your lib when you post the link?

I like the interface, very beautiful. The music too. My only problem is that I need to read before play it >.< Rated it.

Exception in thread "Game Loop Thread" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2786)
Prolly OS X specific with lower default setting or something.

I did increase it locally, but it only took me a bit further:
java.io.IOException: Error loading clip: jar:http://www.ra4king.com/games/LudumDare/23/ForeverAlone/ForeverAlone.jar!/res/ClairDeLune.ogg at com.ra4king.gameutils.Sound.extract(Sound.java:45) at com.ra4king.gameutils.Sound.extract(Sound.java:1) at com.ra4king.gameutils.Assets.add(Assets.java:29) at com.ra4king.gameutils.Assets.add(Assets.java:25) at com.ra4king.gameutils.Assets.add(Assets.java:21) at com.ra4king.spacegame.SpaceGame.initGame(SpaceGame.java:39) at com.ra4king.gameutils.Game.gameLoop(Game.java:435) at com.ra4king.gameutils.Game$8.run(Game.java:824) Caused by: javax.sound.sampled.LineUnavailableException: Failed to allocate clip data: Requested buffer too large. at com.sun.media.sound.MixerClip.implOpen(MixerClip.java:561) at com.sun.media.sound.MixerClip.open(MixerClip.java:165) at com.sun.media.sound.MixerClip.open(MixerClip.java:256) at com.ra4king.gameutils.Sound.extract(Sound.java:40) ... 7 more java.lang.NullPointerException at com.ra4king.gameutils.Sound.loop(Sound.java:70) at com.ra4king.spacegame.SpaceGame.initGame(SpaceGame.java:45) at com.ra4king.gameutils.Game.gameLoop(Game.java:435) at com.ra4king.gameutils.Game$8.run(Game.java:824)

Write once, debug everywhere :wink:

Hmmm seems like Macs don’t like to load large sound files :confused:

What a nice game! I really enjoyed playing it.

In Ubuntu 10.04 with java 1.6, all I got was a gray window… running at 120fps though! I like the idea and look forward to trying it in the future.

Did you find any exceptions in the Java console? If you don’t have a java console popping up, enable it in the java settings control panel :slight_smile:

Sorry for my lack of debugging. Crash is caused when no audio line is available:


java.io.IOException: Error loading clip: jar:http://www.ra4king.com/games/LudumDare/23/ForeverAlone/ForeverAlone.jar!/res/blast.wav
	at com.ra4king.gameutils.Sound.extract(Sound.java:45)
	at com.ra4king.gameutils.Sound.extract(Sound.java:1)
	at com.ra4king.gameutils.Assets.add(Assets.java:29)
	at com.ra4king.gameutils.Assets.add(Assets.java:25)
	at com.ra4king.gameutils.Assets.add(Assets.java:21)
	at com.ra4king.spacegame.SpaceGame.initGame(SpaceGame.java:36)
	at com.ra4king.gameutils.Game.gameLoop(Game.java:435)
	at com.ra4king.gameutils.Game$8.run(Game.java:824)
Caused by: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
	at com.sun.media.sound.HeadspaceMixer.nResume(Native Method)
	at com.sun.media.sound.HeadspaceMixer.implOpen(HeadspaceMixer.java:346)
	at com.sun.media.sound.AbstractMixer.open(AbstractMixer.java:286)
	at com.sun.media.sound.AbstractMixer.open(AbstractMixer.java:323)
	at com.sun.media.sound.MixerClip.open(MixerClip.java:162)
	at com.sun.media.sound.MixerClip.open(MixerClip.java:256)
	at com.ra4king.gameutils.Sound.extract(Sound.java:40)
	... 7 more
java.lang.NullPointerException
	at com.ra4king.gameutils.Sound.loop(Sound.java:70)
	at com.ra4king.spacegame.SpaceGame.initGame(SpaceGame.java:45)
	at com.ra4king.gameutils.Game.gameLoop(Game.java:435)
	at com.ra4king.gameutils.Game$8.run(Game.java:824)

These errors are common on Linux. No clue how to fix them. Anyone here a JavaSound expert on Linux?

I’ve been able to play sounds on Linux using Sun/Oracle Java 1.6, but it’s certainly glitchy. For one, it chooses the wrong mixer, failing if anything else is using sound at the moment & also blocks anything else from playing sounds. Under OpenJDK, my sound files won’t load (doesn’t understand the format of the WAV files).

To address the problem, I just catch any such exceptions from the sound system, log a warning, and otherwise ignore. Expert advice would be most welcome.

Ok, I updated it to only log errors and ignore. Try playing it now! :slight_smile:

It runs! The same exception is shown in the console, but the game plays. Thanks for the update.

I like the full screen mode. Is 8fps bad?

Is this actually running in full screen exclusive mode, or just using an undecorated frame and setting its size to the screen resolution? I’m asking because I’ve also had trouble with full screen mode in Linux, but this appears to do the trick.

This is full screen mode using GraphicsDevice.setFullScreenWindow(Window).

8FPS…what are your system specs? :o

It’s good to know that full screen does work - I think I’ll add a toggle to my game! My system specs are very modest. I have an ok AMD/ATI chip using FGLRX drivers in Ubuntu Linux 10.04, but I’ve not yet seen Java apps (or otherwise) actually utilize the GPU. I’m sure this is just my own weak configuration. I’ve tinkered with drivers and such, but only end up muddling other things, so I just stick with the most stable setup.

My excuse is that I want to test my game(s) at the lowest possible denominator, so I know it can perform well for the majority of players.

Forever Alone is still playable at 8fps!

ATI on Linux…that’s like telling Microsoft and Apple to get along XD

AMD/ATI cards have horrible support for Linux. In fact, they are horrible all-around :slight_smile:

I’m glad it’s still playable at 8FPS though :smiley:

Yeah, that’s pretty much what I concluded. Good to know it’s not just me. I’ve never really been a big 3D acceleration junkie, so it wasn’t a driving factor. (I put together my whole rig for less than a decent graphics card would have cost.)

Anyway, to stay on topic, I’ll try your game again later and get into the actual gameplay more.

OK, actually played a bit. It runs faster for me in (smaller) windowed mode (at a whopping 23fps), rather than full-screen. This implies that on my machine, full-screen is not getting any acceleration (just a normal window sized to fill the entire screen space). Ugh, linux.

In any case, I like the concept of your game. It’s difficult to know from whom I’ve looted (to avoid their retaliation on successive raids). I don’t think I’ve played enough to fully experience the build-up aspect, but I’m a fan of this type of gameplay.

Thanks for playing!

Nyhm: maybe you should try to run int from command-line with: java -Djava.awt.opengl=true -jar [whateverjar]

Hey this is pretty cool :slight_smile:

Performance seemed to be fairly slack though… sometimes dropping as low as 15 fps other times nice and consistently at 60fps… Either way, nice entry. Rated.