Limbo-inspired graphics

Download

Just a little demo of the graphics for a potential 4k game. Not much room left for gameplay or music, unfortunately, so I’ll probably have to change this drastically to turn it into a real game.

It’s all random and procedural; use A and D to move left and right. Move the mouse to test light scattering aka “god rays.” The blurs, vignette, gradients, light rays, and film grain are all achieved by mimicking the functions of GLSL fragment shaders.

Todos:
[]Endless parallax scrolling.
[
]Floaty particles
[]Gameplay
[
]Sound
[*]Better compression? Right now I’m just proguarding + pack200

I like it a lot!

I can’t wait to see the scrolling and floaty particles

Added parallax scrolling. (A and D keys)
http://www.mediafire.com/?f6n9kwn3mbe01x3

Still no idea how I’m going to turn this into a game… :-\

Let me know how it performs – I’m getting ~85 FPS on Safari.

dude, this is amazing! I don’t know how you’re drawing things here, but since you’re already drawing trees, how about just making the player a simple circle on a triangle with 2 small rectangular “legs”. With that kind of blurring I think it’d look great. Really amazed at what you’ve done here. But yeah, how to make a game of it? Difficult with that kind of size limitation.

Between 87 and 95fps here in Firefox, and looking awesome!

Thanks! Just tested on an older PC and I’m getting slower speeds (~20FPS), may need to tweak or entirely remove the light scattering effect…

Well, it looks very cool, but unless you’re going to make the player the sun or a lightbeam, maybe it isn’t such a useful feature. Space better spent on gameplay? I don’t know. It’s so cool. Maybe you can think of a use for it?

I enjoyed playing Limbo (PS3). There’s quite a few interesting casual (i.e. non-shoot em up) gaves on PSN these days. (Journey, Stacking, papa and yo, and just released ‘unfinished swan’). These all are more like an interactive media experience than a game. I.e. not that hard, but the experience is interesting. Frankly there are just too many shoot-em-up sequels in main stream games these days. Sure they are fun, but do we (I?) really want more of the same?

Anyway, vaguely back towards the topic. Great graphics effect. Its easy (I do it every time) to get keen on some neato graphics or other idea, go full out on that and ‘forget’ that it’s really about good gameplay. Maybe you could move into the screen, rather than sideways and make it a horror title, with something nasty jumping out at you after a while.

Alternatively one could move both sideways and a limited amount forward back and make it maze-like as you manoeuvre around the trees. Maybe there could be pits and something chasing you (left to right), so it becomes a time-trial of panic driven flight (to the right, but navigating forwards/backwards to avoid trees, pits etc.).

Good luck, I’m looking forward to playing.

I love the lighting effects, but maybe it would work better as a fixed light-source that the user moved left/right relative to? Like you were walking through the woods, towards a bright light. For the “sound” in your ToDo list, are you thinking effects or soundtrack? If you’re interested, I’ve been working on ways to play soundtracks using minimal code. Here’s what I came up with for last year’s contest: http://www.java-gaming.org/topics/music/25429/view.html

My maze entry last year included a full length, 8-bit version of the song “Music Box Dancer”, where the full song was encoded in 203 bytes before compression. It uses a 1-byte per note format that I created, which covers the 64 of the 88 keys on a standard piano keyboard (centered on middle C) and allows 4 note lengths. Since most songs have a lot of repetition (eg: a repeated chorus), I found that when gzipped the soundtrack used only about 40-60 bytes in my final jar. The code required to decode the soundtrack into pcm and then play it looks big, but there are lots of comments and constants, so proguard shrinks that down nicely. Some sort of deep, slow music would go well with a wander through your spooky woods, maybe with some jarring high/fast chords when you get jumped by a creep. And it wouldn’t be hard to play the chord in the corresponding left/right channel based on the direction of the creep - I’m hoping to do that with one of my games.

The other way to do this is with javax.sound.midi, but I’m having trouble finding a way to figure out what instruments are supported on a given system. For example, on my system the default instrument seems to be a piano, which would be great to use, but I can’t figure out if that’s the default for everyone or not. (Imagine if the default for someone is drums or clarinet instead!) If I can get it figured out, I’ll start a new thread with example code, and all our games will sound a lot better (well, better than procedural PCM.)

You need to be careful with the MIDI approach. If you look over the Java4k rules (http://java4k.com/index.php?action=view&page=rulesjudg:

… which leaves us with generated sounds. Personally, I’ve had an issue with sound effects through the javax.sound.sampled is the delay between writing to the audio buffer and hearing it. I’ve seen some systems have up to about a half-second delay, which means it’s really, really tough to synchronize the audio with the video.

Hmm, I haven’t noticed that, although I can see how that would happen if you were continuously writing the bytes to a buffered input stream. Instead of doing that, I pre-parse the music and load it into a Clip. That way I can just use the loop() and stop() commands to start/stop the music, and as far as I can tell there’s no lag. Running at a fixed frame rate of 60fps, the Clip reports that it has already started playing by the time the next frame is ready.

I do the same with sound effects (one Clip object per type of sound effect), except that you have to set the frame position back to zero each time, like this:


// Play the level up sound
if (levelEnd) {
	levelUpSound.stop();
	levelUpSound.setFramePosition(0);
	levelUpSound.start();
}

PS: I forgot about the MIDI prohibition. Makes sense, since we can’t know what instruments are supported, although it’s annoying. Maybe I can figure out the waveform for a piano note and use that instead of a sign wave.

I had been thinking a lot about what could work well with the graphic style

honestly a simple Canabalt style runner, where the sunbeams move around on player(instead of mouse)
could be quite nice given the right atmosphere

Or even a 2d maze http://bobscrafts.com/bobstuff/maze.gif type image transparent infront of everything, as you move a ball or whatever through some simple puzzles, once again having the light beams follow the mouse/ball

Lastly,
it could be something else simple, like one of those ‘pop the balloons’ or click the ‘object’ style

Something that has you move the mouse around a bit but still will get the background, once again the object/art will be greatly important.

Were you intentionally going for 480x320 because I feel like it could greatly utilize larger resolution, even nearest neighbor scaled 2x(4x?) or even some stretch fullscreen of window, because when i zoom in on it, it still looks phenomenally great scaled up using browser based zoom/scaling

I had an interesting idea for sound… Taking an alorithmic one-liner and stretching it to the extreme to create an ambient dronescape. I’d need to read up a little on PaulStretch and its code… Not sure how feasible it is.

An easier idea would be to just have the sound of subtle footsteps, which should be “eerie” enough on its own.

Thanks for the gameplay ideas. :slight_smile:

Still deciding on a final size… Might scale it up x2 using nearest neighbour scaling.

[quote]I had an interesting idea for sound… Taking an alorithmic one-liner
[/quote]
If you find some that sound good in Java, could you share a link to them? When I went looking last year, I couldn’t find any that had a sound I liked and that could be easily implemented in Java. The ones that sounded good relied on language specific quirks, like using JavaScript’s loose variable typing or doing pointer manipulation in C++ (I think that’s what it was doing.)

[quote]Might scale it up x2 using nearest neighbour scaling.
[/quote]
You could also use Graphics2D’s scale() method, the two lines required would probably be less code than doing nearest neighbour yourself. e.g.:


g.scale(0.5f, 0.5f);
// existing drawing code here
g.scale(2f, 2f);

Looks impressive, but it runs at only 35 FPS on my not so very old PC.

To make use of the parallax scrolling effect I’d recommend a horizontal platformer. The player controls a character, some monster hunter, traveling to the right, and has to kill monsters with an axe or something. Vampires, zombies, werewolves come to mind.

Just wanted to give an update on sound. I’ve managed to port a simple PaulStretch implementation to Java. Right now it relies on Mario’s Audio-Analysis FFT, but I’m hoping to trim that down for the sake of this contest.

The input is the following code:

		float[] samples = new float[1024*10];
		for( int t = 0, i=0; i < samples.length; t++, i++ ) {			
			byte b = (byte)((t*(4+((t>>10)&7))) & (t*3&(t>>8)));
			samples[i] = Math.max(-1f, Math.min(1f, b/127f));
		}

Using a sample rate of 1600, I get a nice 32 second drone:

Starting to sound pretty good. :slight_smile:

EDIT: More output…


And if you wanted to hear an example of some “input” (i.e. the algorithmic one-liner):

Awesome, i honestly did not expected such a atmospheric sound and i’m sure it will suite to whatever game you have in mind.