Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Infinite Scrolling background? on: 2005-09-24 01:37:27
Hey,

Basically, I want to add a background layer that would scroll infinitly. You know, such as a "clouds" layer that would scroll across the background of my level slowly...but would never end.

I'm not so much looking for code on how to do this....just help on an algorithm that could do this.

As much as I could figure so far would be to use two identical pictures (both bigger than the display size) and as one is X pixels away from the edge of it being the edge of the screen, start drawing the second picture after it so it smoothly scrolls on...then repeat the process as it reaches the end of the second picture (but switching back to drawing the first).

Though for some reason I cant settle on that idea, maybe I'm just paranoid or whatever....but I figured I'd ask and see if anyone can comment on my plan? I havent had a chance to try coding it yet as this isnt my machine I am posting from Smiley
2  Java Game APIs & Engines / Java Sound & OpenAL / Re: Loop a OGG without loading into memory? on: 2005-08-23 00:49:08
Doh! I noticed a problem straight out. I've been sending it a decompressed InputStream.

And the nullpointer exception is in JAvaEventDispatchThreadLine:145 apparently, followed by a bunch of error messages I dont understand.

Lemme try re-writing my method sending it the compressed stream and I'll get back to you! Thanks again Smiley
3  Java Game APIs & Engines / Java Sound & OpenAL / Re: Loop a OGG without loading into memory? on: 2005-08-23 00:28:16
Okay, as my forum title dictates I am quite obviously a fscking n00b and cannot figure this out. I keep getting null pointer exceptions each time I try to set it up to read X amount of bytes, play them, then replace those bytes with the next set of bytes..etc...

So can someone explain the theory behind this, as I think I have misunderstood the theory or I'm just too plain stupid to understand the Javadoc details for the OggInputStream.
4  Java Game APIs & Engines / Java Sound & OpenAL / Re: Loop a OGG without loading into memory? on: 2005-08-22 22:40:58
Thanks Smiley Now I just need to figure out how to write the player part to stream it and intergrate it into my sound system....If only I had thought ahead!
5  Java Game APIs & Engines / Java Sound & OpenAL / Loop a OGG without loading into memory? on: 2005-08-22 22:23:40
Hey,

I'm wondering if anyone can give me a hand looping an OGG file with the VorbisSPI WITHOUT loading the file into memory as a byte[ ]. So far, I can loop it as a byte[ ] by extending the ByteInputStream to be a loopingByteInputStream.....but that only works if the samples are loaded into memory....and as we all know uncompressed files in memory takes up alot of space.

Any help would be appreciated Smiley

     ~J~
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (55 views)
2014-04-15 18:08:23

BurntPizza (53 views)
2014-04-15 03:46:01

UprightPath (66 views)
2014-04-14 17:39:50

UprightPath (49 views)
2014-04-14 17:35:47

Porlus (66 views)
2014-04-14 15:48:38

tom_mai78101 (90 views)
2014-04-10 04:04:31

BurntPizza (151 views)
2014-04-08 23:06:04

tom_mai78101 (246 views)
2014-04-05 13:34:39

trollwarrior1 (204 views)
2014-04-04 12:06:45

CJLetsGame (211 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!