Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
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 / Re: javax.sound: Applet Clip latency on: 2009-05-08 18:03:45
EDIT: ouch... my ears ! you must hande when Applet is destroyed to stop all sound... leaving when there is the Red alien make the sound continue to play even when  game web page closed and that's really annoying

Ups, of course  Undecided My wife discovered the problem a few minutes ago when I proudly presented the new page look to her.  Grin Ok, fixed that.

I noticed another interesting thing: The sound in Ubuntu plays *ways* better if I use Applet.newAudioClip() instead of the JApplet-Method getAudioClip(). The latency problems gets better, the sounds are all preloaded before first play, the sound stutters less.

Thanks for the link to "Applet Boot", will add this tomorrow!
2  Game Development / Newbie & Debugging Questions / Re: javax.sound: Applet Clip latency on: 2009-04-25 15:05:05
Hi there,

thanks to h3ckboy,SimonH,DzzD,Hansdampf for comments and help!
Went back to simple usage of AudioClip as recommended. Having implemented the ufo and speeded up gameplay meanwhile.

Although simply copying these classics isn't a creative masterpiece, it simply helps getting me started with simple concepts.
Already have some ideas for own games  Wink
3  Game Development / Newbie & Debugging Questions / Re: javax.sound: Applet Clip latency on: 2009-04-20 17:46:29
Thanks for all the advocacy, looks like I have found the right forum after all.  Grin

I did not mean it like that! Just imagine that I hadn't removed my extremely sarcastic post Wink.

Ok, lets put some cooldown and peace here. You simply caught me on the wrong foot as I was already angry having so little time for this hobby.
Was like throwing oil on the fire. Sorry if I sounded like a hothead here...  Wink

Meantime, I managed to get the game online: http://www.mibran-games.de/.
Still have to implement loading screen and the ufo. Code is ugly, nearly no OOP right now, simply 'hack & forget' spaghetti.
And there is a tiny bug when aliens change direction sometimes. But hey, first running game, helpful comments welcome  Wink
Has anybody bad experiences by violating copyrights of real classic arcade games (being some decades old)?

If Bloodridge plays OK on the problem machine then I'm sure Egon wouldn't mind if I gave you the code.

Thanks very much, same issue with it.
But even Flash plays sounds laggy. I really think now that it must be an OS problem...

cu
Michael
4  Game Development / Newbie & Debugging Questions / Re: javax.sound: Applet Clip latency on: 2009-04-19 09:13:31
So far, thanks for all helpful answers.

you really mean it when you said it would take some itme.

Assuming that I've spent 24/7 for two months on this topic, sure. But it had other reasons which needed my fully attention. I've been aware of that while posting the first message, that's why I said that. I know what you want to say: "If you are too dumb or do not have enough time, simply don't try to get started in java game programming, you won't arrive anyhwere, TGT. And don't bother us here any longer."

Message delivered and agreed. Ok, Mr. "JGO Ninja", your wish is fulfilled.
5  Game Development / Newbie & Debugging Questions / Re: javax.sound: Applet Clip latency on: 2009-04-17 13:09:15
Ok, I've got behind it (even all that ThreadLocal usage I have to do if I want to play sounds simultaneously).
Unfortunately, all mixers my Ubuntu 8.10 with onboard sound gives me, are these:

mixer #1:Intel [plughw:0,1], version 1.0.17, maxLines:1)
mixer #2:Java Sound Audio Engine, version 1.0, maxLines:32)
mixer #3:Port Intel [hw:0], version 1.0.17, maxLines:1)

So far for playing sounds in Java without use of external libraries... Sad
Any hints? JOAL?

cu
Michael
6  Game Development / Newbie & Debugging Questions / Re: javax.sound: Applet Clip latency on: 2009-02-17 07:13:06
Thanks for the detailed answer so far!
Will take me some time to get familiar with that concepts.

Michael
7  Game Development / Newbie & Debugging Questions / javax.sound: Applet Clip latency on: 2009-02-16 17:59:57
Hi there,

I'm new to Java game development and having a question about sound problems.

Using Ubuntu Linux 8.10, I encounter enormous playback latency when playing
sounds like the code sample below. For learning purposes, I'm programming
a Space Invaders clone, and taking every sound approx. 0,5 seconds to
happen isn't really acceptable here.

This is only on Linux/Firefox (where it also affects Flash games), on Windows
systems there is nearly no problem. Starting the clip from the GUI thread or
from an extra created thread does not change anything.

My question: Is there any way to give some runtime parameters to the JVM
whether to use Alsa, PulseAudio or OSS ?

As I've seen on the forum, many problems disappear when using OpenAL-Wrapper
libraries instead of the javax.sound framework. I'm trying to avoid any extra libraries,
so if there is an solution, please let me know...

Thanks in advance,
Michael

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
   private Clip loadSound(String name)
   {
      Clip clip=null;
      try
      {
         URL url=getClass().getResource(resDir + name);
         AudioInputStream sample=AudioSystem.getAudioInputStream(url);
         clip=AudioSystem.getClip();
         clip.open(sample);
      }
      catch (Exception e)
      {
         System.err.println(e.getMessage() + " : " + name);
      }
      return clip;
   }

   private void playSound(Clip sound)
   {
      sound.setFramePosition(0);
      sound.loop(0);
   }
8  Game Development / Newbie & Debugging Questions / Re: Deployment: Bundling the official Sun java JRE installers? on: 2007-11-01 13:52:35
Ah ok, thank you.
9  Game Development / Newbie & Debugging Questions / Deployment: Bundling the official Sun java JRE installers? on: 2007-10-31 14:45:25
Hi there,

I'm new to this forum and have a question about distribution and deployment of Java games, offline(!).

As far as I understand, it seems to be a problem to provide any installer that comes bundled with an official Sun java JRE installer. Is that right?

Are we (or are we not) allowed to include such an JRE installer with any kind of installation routine? I'm talking about Freeware and/or OpenSource-licensed games.

I do *not* mean creation of some fat or wrapped jar including any runtimes. I think of simply putting the offical JRE installer into an (e.g. selfUnzip-distributed) installation directory and calling it from my (non-Sun) installer routine (before or after) game binaries installation...

Besides Webstart, how do you solve that problem?

Thanks in advance!

Brgds,
Michael
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.

rwatson462 (37 views)
2014-12-15 09:26:44

Mr.CodeIt (31 views)
2014-12-14 19:50:38

BurntPizza (62 views)
2014-12-09 22:41:13

BurntPizza (99 views)
2014-12-08 04:46:31

JscottyBieshaar (60 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (77 views)
2014-11-29 21:32:03

toopeicgaming1999 (138 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (38 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

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