Hi !
Featured games (86)
games approved by the League of Dukes
Games in Showcase (649)
Games in Android Showcase (181)
games submitted by our members
Games in WIP (699)
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-23 23:37:27

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-22 22: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-22 22: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 20: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 20:23:40

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

Pages: [1]
KaiHH (55 views)
2016-01-31 23:15:29

sci4me (84 views)
2016-01-23 21:47:05

sci4me (72 views)
2016-01-23 21:46:58

KaiHH (104 views)
2016-01-19 13:26:42

theagentd (186 views)
2016-01-05 17:10:00

ClaasJG (204 views)
2016-01-03 16:58:36

chrisdalke (194 views)
2015-12-28 06:31:21

Guerra2442 (225 views)
2015-12-25 03:42:55

Guerra2442 (223 views)
2015-12-25 03:27:21

theagentd (261 views)
2015-12-21 14:43:24
List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48 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‑
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!