Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (683)
Games in Android Showcase (196)
games submitted by our members
Games in WIP (751)
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] 2 3
1  Java Game APIs & Engines / Java 2D / Re: BufferStrategy on: 2016-05-13 07:59:18
Never ever do this:
1  
device.setDisplayMode(new DisplayMode(d.width, d.height, depth, refresh));


Java AWT just cannot cope with your own DisplayMode instances. Pick one from the DisplayMode[] reported by your device. Even a completely identical manually created instance will not function well. This has been the case for over a decade, learn from my mistakes. Pointing

It might not even be related to the issue you are facing, just fix it anyway Smiley

I fixed it. Thanks a lot.
Every suggestion to correct or optimize my code means a lot to me as I'm currently learning a lot of new stuff and trying to make a project
not as quick and dirty as before but rather elaborate.

Quote
Okay this is really not funny anymore Cheesy The DisplayModeTest works well here.

My suggestion is to remove whole java, eclipse, ... and then reinstall everything.

I reinstalled the newest version of both and it didn't have any effect on the outcome.
But it's not bad to have eclipse mars instead of luna now  Wink

Quote
I have this code with me (it's even working in 2016, but originally I wrote it in 2012). http://pastebin.com/TABWDFUE

Ask me if you have any questions regarding it.

And I had a look at your code, updating my frameclass as much as possible including Rivens corrections.

But the result for my own as well as Oracles tutorial class is still the same, a fully transparent frame which is only removeable by killing the process the hard way.
2  Java Game APIs & Engines / Java 2D / Re: BufferStrategy on: 2016-05-12 13:39:19
Now this isn't funny anymore....
I compiled and run the DisplayModeTest from
https://docs.oracle.com/javase/tutorial/displayCode.html?code=https://docs.oracle.com/javase/tutorial/extra/fullscreen/examples/DisplayModeTest.java
and it doesn't exit either.
The fullscreenmode seems to be exited but there's still a frameicon in my taskbar and I
have something like an invisible or transparent frame above my eclipse which takes no inputs.
Really awkward. Clueless

Maybe I should add something about my environment here:

Windows 7 Home Premium
Java 8 Update 91 (Build 1.8.0_91-b14)
Eclipse Version: Luna Service Release 2 (4.4.2)

on a Phenom II  X4, 8GB RAM, NVidia 465 GTX

Something else I should post in addition ?
3  Java Game APIs & Engines / Java 2D / Re: BufferStrategy on: 2016-05-11 20:58:21
I'm sorry, I should've written that as well.

With
1  
device.setFullScreenWindow(null);

I get the following exception:
Quote
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Invalid display mode
   at sun.awt.Win32GraphicsDevice.setDisplayMode(Unknown Source)
   at Game.Graphics.GraphicsEngine.showMe(GraphicsEngine.java:132)


As for the device it's definitly not null. Debug inspection says, it's a
Quote
D3DGraphicsDevice[screen=0]


I read the tutorial you mentioned a few years ago already, which led to my previous code.
In the past I didn't run into those kind of problems.
Some years have gone by without me using the fullscreen exclusive mode.
I'll go over the tutorial again tomorrow, to see if anything's got changed or updated.

Thank you for your help.
I'm a bit confused right now  Wink
4  Java Game APIs & Engines / Java 2D / Re: BufferStrategy on: 2016-05-11 16:07:15
The class of device is GraphicsDevice obtained from
1  
2  
GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice device = env.getDefaultScreenDevice();

and I'm using this inside a subclass of java.awt.Frame.

And you're right, the first command throws an Exception.

Should I replace
1  
2  
 
device.setFullScreenWindow(null);


with
1  
2  
 
device.setFullScreenWindow(displayMode);
where displayMode is obtained from the device before going into fullscreenmode ?
This works in closing the window now, but the program still doesn't finish.
I get the following console output:
Quote
Mai 11, 2016 6:04:29 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0
x80000002. Windows RegCreateKeyEx(...) returned error code 5.
5  Java Game APIs & Engines / Java 2D / BufferStrategy on: 2016-05-11 12:35:22
Hi there.

I use the following code for entering fullscreen mode via visible=true and exiting the game with visible=false
My problem is, that it doesn't exit but rather leaves a white screen that doesn't react to anything else than killing it with the taskmanager from windows.
Any suggestions on how to solve this ?

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
public void showMe(boolean visible) {
      if(visible){
         setIgnoreRepaint(true);
         setUndecorated(true);
         device.setFullScreenWindow(this);
         int depth = device.getDisplayMode().getBitDepth();
         int refresh = device.getDisplayMode().getRefreshRate();
         Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
         gg.setFrameSize(d);
         try{
            device.setDisplayMode(new DisplayMode(d.width, d.height, depth, refresh));
            createBufferStrategy(numJavaFullScreenBuffers);
            bufferStrategy = getBufferStrategy();
         }catch(Exception e){
            e.printStackTrace();
         }
         requestFocus();
      }else{
         device.setFullScreenWindow(null);
         setVisible(false);
                        System.exit(0);
      }
   }



Thanks for any help, I appreciate it.
6  Java Game APIs & Engines / Java 2D / Re: Clipboard Transparency on: 2016-02-16 08:48:08
It didn't get me any further.... Undecided
I tried all kinds of formats and still don't get what I need for some of the office tools.
Pasting an image with alpha channel into gimp and copying and pasting from gimp to office works fine.
And copying into java clipboard and pasting from there into office again doesn't work at all...
I think there's no easy way to solve this with only my java application.
7  Java Game APIs & Engines / Java 2D / Re: Clipboard Transparency on: 2016-02-15 17:38:27
Thank you KaiHH.  Smiley

The thread you posted is actually really interesting for me, especially since I already
searched the net for solutions and only found another stackoverflow thread, that wasn't helpful at all.
I read through all of it and I'll think I can use one of the solutions shown there.
I know it's already two months later and you replied very fast and I didn't look for a reply since then
nor did I get an automatic email...
I'm glad you answered and I write again when my program works the way it should  Wink
8  Java Game APIs & Engines / Java 2D / Clipboard Transparency on: 2015-12-23 11:17:27
Hello.

I have a problem with the System Clipboard.
I have a BufferedImage with type 
1  
BufferedImage.TYPE_INT_ARGB

I use the following for copying the BufferedImage to the systems clipboard:
1  
2  
3  
TransferableImage trans = new TransferableImage(sc);
Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard();
c.setContents(trans, this);

with TransferableImage implementing Transferable.
When I try to paste the image in a program like PowerPoint for example,
all that should be transparent is black.
But when I save the image by
1  
ImageIO.write(image, "png", file);

it still has its transparent parts.
So my question is:
Where is the transparency lost and how can I prevent that from happening ?
9  Java Game APIs & Engines / Java Sound & OpenAL / Re: Jre 1.7 Midi Soundbank problem on: 2011-10-23 20:47:13
Thank you for an answer to my problem, I use the default now which works at least,
that has to be the one you mentioned.
It got my game running again  Smiley


I hope I don't find more problems concerning 1.7.  Undecided
10  Java Game APIs & Engines / Java Sound & OpenAL / Re: Jre 1.7 Midi Soundbank problem on: 2011-10-23 09:56:07
For more information:
I changed nothing in the game.
It works well with 1.6 and not with 1.7.

The soundbankfile I use is the one found at

http://java.sun.com/products/java-media/sound/soundbanks.html

I used the deluxe version:
Quote
deluxe [4.92 MB]
A mammoth soundbank with the best quality sound samples.
11  Java Game APIs & Engines / Java Sound & OpenAL / Jre 1.7 Midi Soundbank problem on: 2011-10-23 09:24:39

I have a problem with the new JRE 1.7.
My game's midi doesn't work anymore.

The Exception occurs here:

1  
soundbank = MidiSystem.getSoundbank(new File("Soundbank"));


The Exception is:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
javax.sound.midi.InvalidMidiDataException: cannot get soundbank from stream
   at javax.sound.midi.MidiSystem.getSoundbank(MidiSystem.java:599)
   at Game.Main.Submain.Audio.MPlayer.getMidiTools(MPlayer.java:123)
   at Game.Main.Submain.Audio.MPlayer.init(MPlayer.java:103)
   at Game.Main.Submain.Audio.MPlayer.<init>(MPlayer.java:86)
   at Game.Main.Submain.Audio.MusicReaderMidiPlayer.init(MusicReaderMidiPlayer.java:67)
   at Game.Main.Submain.Audio.MusicReaderMidiPlayer.<init>(MusicReaderMidiPlayer.java:52)
   at Game.Main.MainEngine.init(MainEngine.java:65)
   at Game.Main.MainEngine.<init>(MainEngine.java:51)
   at Game.Main.Main.init(Main.java:66)
   at Game.Main.Main.<init>(Main.java:52)
   at Start.exe.main(exe.java:39)
Exception in thread "main" java.lang.NullPointerException
   at com.sun.media.sound.SoftSynthesizer.loadAllInstruments(SoftSynthesizer.java:791)
   at Game.Main.Submain.Audio.MPlayer.getMidiTools(MPlayer.java:134)
   at Game.Main.Submain.Audio.MPlayer.init(MPlayer.java:103)
   at Game.Main.Submain.Audio.MPlayer.<init>(MPlayer.java:86)
   at Game.Main.Submain.Audio.MusicReaderMidiPlayer.init(MusicReaderMidiPlayer.java:67)
   at Game.Main.Submain.Audio.MusicReaderMidiPlayer.<init>(MusicReaderMidiPlayer.java:52)
   at Game.Main.MainEngine.init(MainEngine.java:65)
   at Game.Main.MainEngine.<init>(MainEngine.java:51)
   at Game.Main.Main.init(Main.java:66)
   at Game.Main.Main.<init>(Main.java:52)
   at Start.exe.main(exe.java:39)



Does anyone here know a solution to this ?
12  Java Game APIs & Engines / Java 2D / Re: Fullscreen mode Screenshot awt.robot on: 2011-05-18 19:57:39
I solved the problem with a workaround.
I apply my whole rendering routine to a BufferedImage once
and save it, when calling the  "getScreenshot"- method.

But either way I'm curious to know if there's a way to get it directly.
13  Java Game APIs & Engines / Java 2D / Fullscreen mode Screenshot awt.robot on: 2011-05-18 19:13:57
Hi.
I have the following problem:
I have a game running in fullscreen mode with
1  
bufferStrategy = getBufferStrategy();

and I'd like to have an ingame button for making screenshots.
I've been using awt.robot so far, but the image is just plain white when I save it.
I read somewhere else that it has to do with java not drawing to it's own components
but rather to some OS-component...
So I hope for you to give me an answer to one of the two possibilities:
1) Is there an easy way to get an image from that external source with java-code?
  I don't want to use something like FRAPS, it should be possible ingame.
2) Is there a way to get an image from bufferStrategy or related components ?

Thanks, I appreciate any help.
 Smiley
14  Games Center / 4K Game Competition - 2011 / Re: Gator4k on: 2011-01-06 10:33:07
I'd really like to know how to generate these watereffects myself.
It would push the graphics of any RPG to a new level,
especially the one I'm actually on  Wink
Is there a name for the effect or did you invent it yourself ?
15  Games Center / 4K Game Competition - 2011 / Re: 4Kanabalt on: 2010-12-06 21:53:11
Nice game - is it actually a game ?
But it's fun somehow and a real challenge, so lets call it a game  Wink
As said above, I like the parallax scrolling, too.
2240m  btw.

Keep going!!
16  Game Development / Newbie & Debugging Questions / Re: KeyListener, Multiplayer input on: 2010-02-16 11:06:26
It's working now.
I managed to choose the right keys.
That's also possible because a player won't need
to press the steer-left-key and the steer-right-key at the same time.
On other keyboards it may fail again, but
I think most keyboards are the same concerning at least the letters (I don't use 'Z' or 'Y').
When the problem appears on another keyboard one can
change the keysettings ingame (This isn't the nicest way but it works).

If anyone wants to know:
I chose  W,A,S,D for moving the first player and NUM_5,NUM_1,NUM_2,NUM_3 for the second one.
F and G are for firing bullets with the first player and for the second one it's NUM_+ and NUM_Enter.
I'm trying to find the right keys for the 3rd player now, but the game will
mostly be played by just two players.
17  Game Development / Newbie & Debugging Questions / Re: KeyListener, Multiplayer input on: 2010-02-14 20:25:16
Awesome !!!
Your link was really helpful, I understand the actual problem now.
Now it should be possible to change my keyboardsettings
in order to fit every players movement.
I will post it here, when the game works with 2 or maybe 3 players.
Maybe anyone else with a similar game can use
the layout I choose for the movement.

Thank you a lot  Smiley

P.S.
You may think: "Who in the world is playing a game with two people on one keyboard nowadays?"
Actually it is quite fun to play such games in a little tournament with a friend once in a while.
Red Baron in J4k is one of our favorite games in the tournament,
it is written for one keyboard as well  Wink
18  Game Development / Newbie & Debugging Questions / Re: KeyListener, Multiplayer input on: 2010-02-14 19:12:43
Well,
I made some tests
and here's the result:
When too many keys are held down,
some of them aren't recognized by java.
Also it seems to depend a little on which keys are pressed.

For example the first player
steers to the right while accelerating and
firing some bullets and the second player
steers right but can't fire,
because pressing the fire-key doesn't have any effect.

(I had WASD for player one and the cursorkeys for player two for moving
and B / NUM_0 for firing with player one / two)

 Cry

I hate this, the game would be lots of fun
but instead it's straining my nerves even before playing.



Would it work with slick ?
19  Game Development / Newbie & Debugging Questions / Re: KeyListener, Multiplayer input on: 2010-02-14 18:02:14
Doesn't anyone know
why java cannot handle multiple keys pressed at the same time ?
Or is my approach wrong ?

As it looks, there seem to be some keyReleased and keyPressed events
which aren't processed...
Otherwise the boolean values would't remain in their state.


I just read something about the problem with multiple keys
pressed at the same time.
I have WinXP and my keyboard was connected with the pc by PS2.
I read that USB doesn't have this problem (with 3 or more keys pressed
also a noisy beep appears).
So I changed the connection from PS2 to USB...
I hope it helps, couldn't try so far...
20  Game Development / Newbie & Debugging Questions / KeyListener, Multiplayer input on: 2010-02-07 13:43:29
Hi again  Wink

I wrote a little game where up to 4 players can
drive a little car and play against the other players.
You can use four keys to steer the car and two
keys to shoot some nasty little bullets (from a pneumatic stapler for example).
It works really well with different maps and special effects and runs
with up to 60 fps with Fullscreenmode.

The big problem is that sometimes the keyevents don't do what they should do.
The game should be played on  one keyboard and even with only two players
errors already occur.
Sometimes when I realease  the firekey, it keeps on firing
or I can't steer left or the other player is accelerating although he released the key.

Here's the code:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
public void keyPressed(KeyEvent e) {
      int key = e.getKeyCode();
      if(active){
         int i = 0;
         for(int[] q : SnS.keys){
            int i2 = 0;
            for(int q2 : q){
               if(q2 == key){
                  keyDown[i][i2] = true;
               }
               i2++;
            }
            i++;
         }
      }  
   }

   public void keyReleased(KeyEvent e) {
      int key = e.getKeyCode();
      if(active){
         int i = 0;
         for(int[] q : SnS.keys){
            int i2 = 0;
            for(int q2 : q){
               if(q2 == key){
                  keyDown[i][i2] = false;
                  if(i2 == 0 || i2 == 1){//release steeringwheel
                     smoothSteering[pl[i].plIndex] = 0;
                  }
               }
               i2++;
            }
            i++;
         }
      }        
   }


public static int maxSmooth = 10;
   public void move(){
      int i = 0;
      for(Player p : pl){
         if(p.alive){
            if(p.canMoveCar()){
               if(keyDown[i][0]){
                  if(smoothSteering[p.plIndex] < 0){
                     smoothSteering[p.plIndex] = 0;
                  }else{
                     smoothSteering[p.plIndex]++;
                     smoothSteering[p.plIndex] = Math.min(smoothSteering[p.plIndex],maxSmooth);
                  }
                  p.angle += p.getMoveAngle(Math.abs(smoothSteering[p.plIndex]));
               }
               if(keyDown[i][1]){
                  if(smoothSteering[p.plIndex] > 0){
                     smoothSteering[p.plIndex] = 0;
                  }else{
                     smoothSteering[p.plIndex]--;
                     smoothSteering[p.plIndex] = Math.max(smoothSteering[p.plIndex],-1*maxSmooth);
                  }
                  p.angle -= p.getMoveAngle(Math.abs(smoothSteering[p.plIndex]));            
               }
               if(keyDown[i][2]){
                  p.changeSpeed(-1);
               }
               if(keyDown[i][3]){
                  p.changeSpeed(+1);            
               }              
            }
            if(keyDown[i][4]){
               p.tryShot(p.angle);
            }
            if(keyDown[i][5]){
               p.tryBackShot();
            }
            p.angle = p.angle%360;
            move(p);
            i++;
            p.update();
         }
      }
      checkMapForCollisions();
      checkMapForWallCrash();
      resetCrashedPlayer();
   }


If you don't understand any of the code, please ask.
The smoothSteering is just so that the player has better
control of small angles.
int[][] keys contains the KeyEvent_VK... keycodes where the first dimension is for the 4 players
and the second dimension is for the 6 keys: up, down, left, right, shot, backshot.
boolean[][] keyDown is the same for the dimensions and just stores if a key is held down or not.

I played the red baron (http://marcin-kochanowski.com/RedBaron4K.html)
which was programmed for the java4k contest in 2009
with a friend for hours and it works well with many keys pressed at the same
time. (Up to 9 keys, when 3 people are playing)
Unfortunately the programmer didn't release the code, so
I couldn't learn from it...
If you read this: please help me  Wink

21  Game Development / Newbie & Debugging Questions / Re: Waiting for input with TextArea on: 2010-02-07 13:10:52
This is a really nice way to get the user input from a TextArea
and as I only used the simple ActionListener, KeyListener etc. until now,
it's good to know.
I also made a tool with keyword suggestion, but I didn't need it there
because I used a thread there which checked the input every 1/25 sec.
I used the StringBuffer.reverse() method to compare the actual input to
a list of keywords.
But here the thread-approach is not a secure solution as you can see.

What I really need though is something equivalent to the Dialog function
1  
setModal(true);

I need something that behaves like the java.util.Scanner for the default System.in-console
with my TextArea.
Probably the easiest way to describe this is:
I want to emulate a console in my game.

For example i have a method:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
TextArea console;
void enterUserData(){
  console.append("Please enter your name\n");
  String name = getInputFromConsole();
  console.append("Which type of warrior do you want to be?\n");
  console.append("(1) Assassin\n");
  console.append("(2) Archer\n");
  console.append("(3) Berserker\n");
  String type = getInputFromConsole();
  ....
}


I should have written this before, didn't I ?  Undecided
22  Game Development / Newbie & Debugging Questions / Waiting for input with TextArea on: 2010-02-05 10:18:08
Hi.

I want to do the following, but don't know how:
I have a TextArea and I want to use it as a console.
1  
2  
3  
4  
5  
TextArea console;
void doSomething(){
  String input = getInputFromConsole();
  ...
}

What I want is, that the method doSomething() waits
for me to press ENTER in the TextArea
and then return the text which is in the TextArea
into the String input.
How can I do that ?
23  Java Game APIs & Engines / Java 2D / Re: IllegalArgumentException: More than one component per pixel on: 2010-01-14 21:43:36
That is what methods are for  Grin
Doing things the easy way without knowing what they really do...
I think the performance will not dramatically decrease when I use
the method, but it's always good to know  Smiley
24  Java Game APIs & Engines / Java 2D / Re: IllegalArgumentException: More than one component per pixel on: 2010-01-14 12:43:43
Thank you Riven,
my program works fine now  Smiley
The second one
1  
int alpha = (new Color(rgb, true)).getAlpha();

did the job.
I already looked into the javadocs, but
what I found was only
that
1  
int alpha = (new Color(rgb)).getAlpha();

isn't right and  the ColorModel as I wrote earlier...
@ pjt33: Thank you, too, but
I'm not really into the hexadecimal stuff and shifts, so
the other solution is the better one for me  Wink
Still, I will keep that in mind.
25  Java Game APIs & Engines / Java 2D / IllegalArgumentException: More than one component per pixel on: 2010-01-08 14:08:23
Ich tried to get the alpha-value from a certain pixel of a
BufferedImage with:
1  
int alpha = drawLayer.getColorModel().getAlpha(rgb);   


drawLayer is the BufferedImage  and rgb the int value of
the actual pixel.
But then
Quote
IllegalArgumentException: More than one component per pixel
appears.
How can I get the alpha value properly ?
At first I tried to get it with
1  
int alpha = (new Color(rgb)).getAlpha();

but that returns always the same value, independent on
the actual alpha value which is in the BufferedImage.
26  Java Game APIs & Engines / Java Sound & OpenAL / Re: Java midi sound is weird on: 2009-11-03 22:48:48
If I understand correctly the user there put
his soundbank into the JRE directory to replace the default one.
That solves the problem on a really low level,
because everybody has to do the same in their own
installation. One should not need to change the JRE package I think.
And that is also just a way around the actual problem.

Is this maybe a new bug in 1.6 ?
27  Java Game APIs & Engines / Java Sound & OpenAL / Re: Java midi sound is weird on: 2009-11-02 15:26:34
Yeah, you're right, here as well without loading the soundbank
the program plays the default soundbank although the getLoadedInstruments()
method returns an emty array...
I tried something else:

With
1  
2  
3  
4  
Info [] dat = MidiSystem.getMidiDeviceInfo();
for (Info q : dat) {
  System.out.println("ff"+q.toString());
}


the output is:
Quote
ffMPU-401

ffMicrosoft MIDI-Mapper

ffMicrosoft GS Wavetable SW Synth

ffMPU-401

ffReal Time Sequencer

ffJava Sound Synthesizer

When I compiled the code
with 1.5 (done by changing the used JRE in eclipse)
the "error" disappeared and on all machines the sound was correct.

Maybe that helps you to help me  Wink
28  Java Game APIs & Engines / Java Sound & OpenAL / Re: Java midi sound is weird on: 2009-10-27 15:38:50
I acted on your advice but
it didn't help.
Actually the synthesizer has 0 instruments loaded from the default soundbank.
It's empty...  Huh
Also as I said, it seems really weird to me because the program
is working on my pc.
And in the past it worked on my friends pc as well, so it
can't depend on the hardware, which hasn't changed.
It's also not the code.
I don't know what to do, I
can't even think of anything I could try out to examine this more.
29  Java Game APIs & Engines / Java Sound & OpenAL / Java midi sound is weird on: 2009-10-22 21:40:12
Hi @all,

2 days ago java did something, that I don't understand at all.
I have a little program that plays music with javax.midi
and the   soundbank-deluxe.gm
which I loaded by:
1  
2  
3  
4  
5  
6  
7  
soundbank = MidiSystem.getSoundbank(new File(soundbankFile));
sequencer = MidiSystem.getSequencer();
trans = sequencer.getTransmitter();
synth = MidiSystem.getSynthesizer();
synth.loadAllInstruments(soundbank);
rcvr = synth.getReceiver();
...

On my computer it works quite well,
but 2 days ago a friend of mine called me and said,
that my tool has something like an echo.
It plays normal notes and with some milliseconds delay
something different, which sounds awful.
We have the exact same program, both the same
OS (XP) and the same java version (Build 1.6.0_15-b03).
Without loading the soundbank the problem doesn't occur
on her pc. I don't know what to do, this is completely strange.
As I said the problem seems to be down to loading a different soundbank,
but what difference could there be between my pc and hers?
30  Java Game APIs & Engines / JOGL Development / Re: New to jogl on: 2009-09-15 09:59:09
Thank you again  Smiley
This worked and as you assumed, I have all the stuff in
a subdirectory called 'lib'.
Just as I want it, so I can share the game with anybody
interested without having them install anything beside JRE,
which of course everbody should have on their pc  Wink
I know google and I already looked it up how to
separate classpath entries, but with
1  
SET CLASSPATH=.....

it just led to java not finding my starterclass anymore  Undecided
Your suggestion seems to me better anyway, so
I'll use my .bat-files this way in the future.

Now I can really start with the fun stuff of JOGL.
I'm really curious how much JOGL improves my fps.
I already have a little testprogram for
some "weathereffects" like rain, snow, mist, earthquakes, light and dark etc.
But when activating all of it at the same time with heavy rain/snow/mist
my fps drop to ~20.
I'll write again, when I have the results with JOGL.

Here goes...  Cheesy

...
Done !!!
I tried out slick as you mentioned in your first post,
set it up with the classpath entries and libraries
and changed my effecttester.
It's now using slick and the fps is around 50 with
double the amount of raindrops and snow Cool
Also the timer in slick seems to be really thought out.
If I had known this earlier...
I have a strategygame with Graphics2D as "engine"
and did (performance tuning)³ to achieve 23 fps
from 5 fps at the beginning.
It was a really long way there, but
for some nice weathereffects a better engine would help.
I learned much by changing every single detail
to give better performance,
but I guess with slick now
I can use a sledge-hammer to crack nuts  Grin
Pages: [1] 2 3
 
orrenravid (217 views)
2016-07-16 03:57:23

theagentd (288 views)
2016-07-11 14:28:54

Hydroque (375 views)
2016-07-06 05:56:57

Hydroque (527 views)
2016-07-03 08:52:54

GrandCastle (399 views)
2016-07-01 09:13:47

GrandCastle (392 views)
2016-07-01 09:09:45

CopyableCougar4 (445 views)
2016-06-25 16:56:52

Hydroque (420 views)
2016-06-22 02:17:53

SwampChicken (386 views)
2016-06-20 13:22:57

SwampChicken (306 views)
2016-06-20 13:22:49
Making a Dynamic Plugin System
by Hydroque
2016-06-25 00:13:25

Java Data structures
by BinaryMonkL
2016-06-13 21:22:09

Java Data structures
by BinaryMonkL
2016-06-13 21:20:42

FPS Camera Tutorial
by Hydroque
2016-05-22 05:40:58

Website offering 3D Models specifically for games for free
by vusman
2016-05-18 17:23:09

Website offering 3D Models specifically for games for free
by vusman
2016-05-09 08:50:56

Website offering 3D Models specifically for games for free
by vusman
2016-05-06 11:10:21

Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17
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!