Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Limbo-inspired graphics  (Read 4926 times)
0 Members and 1 Guest are viewing this topic.
Offline davedes
« Posted 2012-11-13 18:21:55 »



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

Offline namrog84

JGO Ninja


Medals: 46
Projects: 4


Keep programming!


« Reply #1 - Posted 2012-11-13 19:28:51 »

I like it a lot!

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



"Experience is what you get when you did not get what you wanted"
Offline davedes
« Reply #2 - Posted 2012-11-14 02:21:53 »

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... Undecided

Let me know how it performs -- I'm getting ~85 FPS on Safari.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ultroman

JGO Knight


Medals: 25
Projects: 1


Snappin' at snizzes since '83


« Reply #3 - Posted 2012-11-14 03:44:48 »

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!

- Jonas
Offline davedes
« Reply #4 - Posted 2012-11-14 03:58:45 »

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...

Offline Ultroman

JGO Knight


Medals: 25
Projects: 1


Snappin' at snizzes since '83


« Reply #5 - Posted 2012-11-14 04:57:15 »

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?

- Jonas
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #6 - Posted 2012-11-14 07:23:01 »

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.


Time flies like a bird. Fruit flies like a banana.
Offline Sunsword

Junior Duke


Medals: 3



« Reply #7 - Posted 2012-11-14 17:55:20 »

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.)
Offline Groboclown
« Reply #8 - Posted 2012-11-14 18:03:29 »

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:
Quote
No soundbanks may be used because they are not a default part of the "public" JRE. You will have to create your sounds at runtime rather than use MIDIs.

... 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.

Offline Sunsword

Junior Duke


Medals: 3



« Reply #9 - Posted 2012-11-14 18:22:19 »

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:

1  
2  
3  
4  
5  
6  
// 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.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline namrog84

JGO Ninja


Medals: 46
Projects: 4


Keep programming!


« Reply #10 - Posted 2012-11-14 20:55:02 »

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
http://www.mathchimp.com/img/games/balloon-pop-integers.png
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

"Experience is what you get when you did not get what you wanted"
Offline davedes
« Reply #11 - Posted 2012-11-14 22:00:56 »

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. Smiley

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

Offline Sunsword

Junior Duke


Medals: 3



« Reply #12 - Posted 2012-11-15 18:04:00 »

Quote
I had an interesting idea for sound... Taking an alorithmic one-liner
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.
You could also use Graphics2D's scale() method, the two lines required would probably be less code than doing nearest neighbour yourself.  e.g.:
1  
2  
3  
g.scale(0.5f, 0.5f);
// existing drawing code here
g.scale(2f, 2f);
Offline StephR

Senior Duke


Medals: 9



« Reply #13 - Posted 2012-11-15 18:17:49 »

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

JGO Wizard


Medals: 51
Projects: 4


I always win!


« Reply #14 - Posted 2012-11-15 19:59:28 »

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.

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline davedes
« Reply #15 - Posted 2012-11-19 23:12:27 »

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:
1  
2  
3  
4  
5  
      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:
https://www.dropbox.com/s/wohsnte0gji5qh0/output.wav

Starting to sound pretty good. Smiley

EDIT: More output...
https://www.dropbox.com/s/85ne80vfald3ijs/output_1.wav
https://www.dropbox.com/s/x26kmoamuz0dfod/output_2.wav
https://www.dropbox.com/s/4l47ol3asf0uqe2/output_3.wav

And if you wanted to hear an example of some "input" (i.e. the algorithmic one-liner):
https://www.dropbox.com/s/87v2vymjgaap6cs/tune.wav

Online Localhorst

Senior Newbie





« Reply #16 - Posted 2012-11-29 12:15:27 »

Awesome, i honestly did not expected such a atmospheric sound and i'm sure it will suite to whatever game you have in mind.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (45 views)
2014-10-17 03:59:02

Norakomi (35 views)
2014-10-16 15:22:06

Norakomi (27 views)
2014-10-16 15:20:20

lcass (31 views)
2014-10-15 16:18:58

TehJavaDev (61 views)
2014-10-14 00:39:48

TehJavaDev (61 views)
2014-10-14 00:35:47

TehJavaDev (51 views)
2014-10-14 00:32:37

BurntPizza (67 views)
2014-10-11 23:24:42

BurntPizza (39 views)
2014-10-11 23:10:45

BurntPizza (81 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!