Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
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] 2 3 ... 9
1  Java Game APIs & Engines / OpenGL Development / Re: problem using LWJGL with slick image support on: 2008-11-17 12:08:43
Just to be sure, did you set them both?
1  
2  
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_CLAMP);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP);


not at the time when i wrote my reply. but i've tested it again with both statements and it still has no effect.
2  Java Game APIs & Engines / OpenGL Development / Re: problem using LWJGL with slick image support on: 2008-11-16 09:30:09
i tried this:
1  
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_CLAMP);

but it had no effect at all.
GL_CLAMP_TO_EDGE seems to be only available in OpenGL 1.2
3  Java Game APIs & Engines / OpenGL Development / Re: problem using LWJGL with slick image support on: 2008-11-15 19:50:57
I also posted this at the slick forum: http://slick.javaunlimited.net/viewtopic.php?t=1326
4  Java Game APIs & Engines / OpenGL Development / Re: problem using LWJGL with slick image support on: 2008-11-13 12:53:16
i noticed that rotation and scaling of an image seems to have an influence on other images. i'm sure that's bullshit but this is what i currently see:

i have one image (a cannon) which needs to be rendered with a defined rotation angle. all other images are static (no rotation and scaling)
when i comment out the scaling and rotation in the code which draws the cannon, all other images are drawn just fine (ie. no grey lines appear).

is there something wrong with the way i use scaling and rotation?

1  
2  
3  
4  
5  
6  
// this leads to grey lines around the other (static) images
image.setRotation((float) Math.toDegrees(object.angleRadians));
image.draw(x, y, (float) object.scale);

// this doesn't (but obviously i cannot draw rotated objects any more)
image.draw(x, y);
5  Java Game APIs & Engines / OpenGL Development / problem using LWJGL with slick image support on: 2008-11-13 12:19:14
hey,
i'm currently trying to use slick-utils with my lwjgl game framework. the main reason to use slick-utils was because of its TrueType font support. after the fonts were working i used the complete slick.jar instead of just the slick-utils.jar and changed my code to work also with the slick image object. basically everything works now but there's one litte annoyance:
sometimes grey vertical lines appear at the edges of the textures.
here's a screenshot:
http://www.rastaduck.org/tmp/slick_graphic_problem2.jpg
(you might have to turn up the brightness on your monitor to see it)

it sometimes appears, sometimes not, and the brightness of the lines changes from time to time. i can't find out what causes this behaviour but that's probably because i'm not too familiar with the openGL stuff. it might be related to the mixture of slick code and do-it-yourself LWJGL code but as i understood it should be possible to use a combination of LWJGL and slick.

does anyone have an idea what the reason could be?
thx for any feedback.

btw, here are some details about my screen and the slick library:
Thu Nov 13 13:18:01 CET 2008 INFO:Slick Build #237
Thu Nov 13 13:18:01 CET 2008 INFO:LWJGL Version: 2.0rc1
Thu Nov 13 13:18:01 CET 2008 INFO:OriginalDisplayMode: 1280 x 800 x 32 @60Hz
Thu Nov 13 13:18:01 CET 2008 INFO:TargetDisplayMode: 640 x 480 x 0 @0Hz
Thu Nov 13 13:18:01 CET 2008 INFO:Starting display 640x480

6  Games Center / Archived Projects / Re: Bubble Bazinga on: 2008-10-29 15:30:29
Cool game there. I did find the applet freezing for a few secs a few times while playing though.
The game would go well on android.
Hmm, strange. Did it freeze in the main menu or in the game?
I wonder how the gaming experience will be on an Android phone. I don't think i will buy sucha phone in the near future. Do you know if there are any guys around in this forum which own a G1 phone and are willing to do some testing?
I would be interested how the gameplay would be with a touchscreen. Maybe i have to draw a cursor at the "mouse position" to make aiming easier.
7  Games Center / Archived Projects / Re: Bubble Bazinga on: 2008-10-29 15:25:39
Yay, bubble bobble!

Can you make them fall when you hit a combo?
I could but i personally like the popping so much. I prefer to let them pop instead of fall.
8  Games Center / Archived Projects / Bubble Bazinga on: 2008-10-28 22:45:05
Here's my newest game: http://www.rastaduck.org/games/BubbleBazinga/
It's just sort of a remake of the well-known "Puzzle Bobble" game. Yet another one ...
I find it very addictive and i always wanted to make my own version of it.
There will also be an Android version of that game available.
9  Java Game APIs & Engines / OpenGL Development / Re: problem with multiple key press events at the same time on: 2008-09-04 10:36:59
interesting. thanks for the info!
10  Java Game APIs & Engines / OpenGL Development / problem with multiple key press events at the same time on: 2008-09-03 20:41:58
hey,

i think everyone knows the problem: the user presses multiple keys at the same time and one of the key presses is not recognised in your game. one particular example is when i press and hold right arrow, then press and hold space and then press up arrow. the up arrow key press is not recognised. in my lwjgl-based game this means i cannot fire, accelerate and jump at the same time, which is a bit odd. i wonder if this is purely a hardware problem with my keyboard or if there's something i can do against it.

any help is greatly appreciated!

11  Java Game APIs & Engines / OpenGL Development / Re: How to deal with max. number of loaded textures on: 2008-08-25 16:43:37
phew, that's good to know.
thanks for the info!
12  Java Game APIs & Engines / OpenGL Development / Re: How to deal with max. number of loaded textures on: 2008-08-25 15:09:08
@OrangyTang: i have to apologize. you were right. i had a texture which had the dimensions 15x16 pixels. it's strange that this doesn't pose a problem on my pc. thanks again for the hint with glGetError()!!
13  Java Game APIs & Engines / OpenGL Development / Re: How to deal with max. number of loaded textures on: 2008-08-25 14:56:24
@OrangyTang: when i reduce the number of images/textures which i load, i don't get the error. i don't think it's a wrong value which is passed in. additionally i have no problems on my pc with a gamer graphics card. the error only appears on my laptop with weak graphics.
but thanks for the hint with glGetError.

@VeaR: i'm not sure if i get you right. are you saying i can reach a higher number of textures in total but i would still not be able to display more than 4-32 images at the same time (in on game scene)?
14  Java Game APIs & Engines / OpenGL Development / How to deal with max. number of loaded textures on: 2008-08-25 10:20:49
hey,

i just realized that there seems to be an upper limit of textures which can be loaded and that limit is different on different graphics cards.
it ranges from 4 to 36 on the computers where i tested my game. since i never really had the time (or the brains) to dig deeper into lwjgl/opengl it's very likely that i'm doing things not the right way. so i wonder if you opengl gurus can give me a hint on that. do i really have to live with that limitation or is it likely that there's some bug in my code? if this is a hard limit i wonder how others can create such amazing games with tons of images on screen at the same time...

here's my exception that i get when i try to load too many textures:
1  
2  
3  
4  
5  
org.lwjgl.opengl.OpenGLException: Invalid value (1281)
   at org.lwjgl.opengl.Util.checkGLError(Util.java:56)
   at org.lwjgl.opengl.Display.swapBuffers(Display.java:555)
   at org.lwjgl.opengl.Display.update(Display.java:571)
...

it disappears when i reduce the number.

i will post my code later (if needed) but first, i'd like to know you guy's opinions.
thanks a lot for your help!
15  Games Center / Archived Projects / Re: Zapfab: JOGL-powered online 3D print shop on: 2008-03-13 12:01:52
awesome stuff!

when starting the applet it showed the certificate info and i noticed you use a WrapperApplet from sun microsystems. i googled a bit but didn't find info about it. i wonder what that is and if it could be beneficial for my work, too.
16  Games Center / Archived Projects / Re: TypeMania on: 2008-03-08 13:52:55
Stop with the flies on the wall, I thought one landed on my monitor. Grin

That's actually intended! If you look closer, the flies are *above* all other objects. This is to create the "flies are on your monitor" look.
17  Games Center / Archived Projects / Re: TypeMania on: 2008-03-07 10:40:18
i'll correct the "sheeps" asap, thx.

i haven't taken the sheep sound from worms but from some free wav download site. maybe they've taken it from worms, i don't know.
18  Games Center / Archived Projects / TypeMania on: 2008-03-07 07:32:49
Hi folks,

Here's my first LWJGL game:

http://www.rastaduck.org/games/TypeMania/

I wonder if and how it runs on various platforms.
19  Java Game APIs & Engines / OpenGL Development / Re: color depth problems with LWJGL on: 2007-08-15 09:07:18
cool, that solved the problem. thx a lot!
20  Java Game APIs & Engines / OpenGL Development / Re: color depth problems with LWJGL on: 2007-08-14 08:10:17
i played around with the quality settings on my office dual-monitor system (where i have the same problem as on my private workstation with only one monitor) and now i have a nice gradient on the second monitor but on the primary monitor the problem is still there. strange...


21  Java Game APIs & Engines / OpenGL Development / color depth problems with LWJGL on: 2007-08-13 20:38:32
hi,

i'm working on my first LWJGL-based game and noticed that on my workstation the images are rendered like 8bit color depth while on my laptop everything looks as expected.

i'm referencing the LWJGL libraries in my jnlp like this:
<extension name="lwjgl" href="http://lwjgl.org/jnlp/extension.php" />
so i should get the newest stable libs, right?

the java console output on my workstation looks like this:
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  
GLApp.initDisplay(): Current display mode is 1280 x 1024 x 32 @75Hz
checking display mode 800x600 @ 75Hz - 32 bits per pixel
checking display mode 640x400 @ 60Hz - 16 bits per pixel
checking display mode 1024x768 @ 85Hz - 32 bits per pixel
checking display mode 640x480 @ 75Hz - 16 bits per pixel
checking display mode 1280x800 @ 85Hz - 16 bits per pixel
checking display mode 1280x1024 @ 60Hz - 32 bits per pixel
checking display mode 1280x800 @ 75Hz - 16 bits per pixel
checking display mode 640x480 @ 85Hz - 16 bits per pixel
checking display mode 720x400 @ 70Hz - 32 bits per pixel
checking display mode 1024x768 @ 75Hz - 32 bits per pixel
checking display mode 1360x768 @ 60Hz - 16 bits per pixel
checking display mode 800x600 @ 85Hz - 32 bits per pixel
checking display mode 1024x768 @ 75Hz - 16 bits per pixel
checking display mode 720x400 @ 70Hz - 16 bits per pixel
checking display mode 640x480 @ 85Hz - 32 bits per pixel
checking display mode 1280x800 @ 75Hz - 32 bits per pixel
checking display mode 1360x768 @ 60Hz - 32 bits per pixel
checking display mode 800x600 @ 85Hz - 16 bits per pixel
checking display mode 800x600 @ 75Hz - 16 bits per pixel
checking display mode 640x400 @ 60Hz - 32 bits per pixel
checking display mode 1280x1024 @ 60Hz - 16 bits per pixel
checking display mode 1280x800 @ 85Hz - 32 bits per pixel
checking display mode 640x480 @ 75Hz - 32 bits per pixel
GLApp.initDisplay(): Setting display mode to 640 x 480 x 32 @75Hz with pixel depth = 32
creating Display/PixelFormat with values 0, 32, 0 ...
GLApp.initDisplay(): Failed to create OpenGL window: org.lwjgl.LWJGLException: Could not find a valid pixel format
trying again with depthBufferBits 24 ...
lookin' good ...


my graphics card is a geforce 6800 and i never had any problems with it.
another thing is that on my laptop the game runs with ~ 300 to 500 fps while on the workstation i only get around ~70 fps.
any ideas what the problem could be?

here's how the output looks like (the logo should have a smooth gradient):
22  Game Development / Game Play & Game Design / Re: peer to peer racing game - how to get smooth animation on: 2006-05-15 11:45:36
i finally found an article which was understandable for me: http://www.tinaja.com/glib/hack62.pdf
thanks a lot for helping!
23  Game Development / Game Play & Game Design / Re: peer to peer racing game - how to get smooth animation on: 2006-05-14 20:21:03
i read this article which thijs proposed: http://www.gamedev.net/reference/articles/article914.asp

the idea is great, i'd really love to implemtent cubic splines in the game.
the problem is that either the article has two mistakes or i'm just doo dumb to get it.

at point "using cubic splines", section D, point 4 the author explains how coords3 and coords4 is calculated. if you look at the equations coords3 is a position calculation and coords4 is a velocity calculation. and coords3 is part of the coords4 equation! this is wrong, isn't it? you cannot add meters and meters per second.

i also don't understand the image below the calculation (the one where the cubic spline is shown with x0, y0 etc.). why is the packet data point outside the spline? shouldn't it be one of the corner points (x0, y0 or x3, y3)?
24  Game Development / Game Play & Game Design / Re: peer to peer racing game - how to get smooth animation on: 2006-05-12 15:06:48
of yourse i'm interested. but before you spend too much time searching for the right emails i should read the proposed articles. if i still can't figure out how to improve the game then i will most likely give up and start some other project which is not realtime-network based.  Undecided
thx again for your help!
25  Game Development / Game Play & Game Design / Re: peer to peer racing game - how to get smooth animation on: 2006-05-11 19:48:39
first of all: thx a lot for your comments!

Note that in a true p2p game you wouldn't have the concept client/server like you mention.
well, the server creates a game session and the client connects to the server's ip/port. that's all. anyway, it seems like i'm using the wrong terminology ...

Quote
If you'd use raw network updates to render your opponents cars it probably would render very choppy (at least if the network conditions: latency or packet loss are high enough).
that's exactly the problem ...

Quote
About extrapolation: It was originally designed (for the millitary simulation environement DIS) to cut down on the bandwidth required to send updates. What happens is that for each extrapolated object all peers run the same extrapolation algorithm. When the peer that is the owner of the object notices that fx the extrapolated pos for the object exceeds some threshold, it sends an update again. That way you wouldn't need to keep sending updates blindly.
yes, but the directions of the cars might change all the time. i don't think this would be a good approach.

Quote
For a car game extrapolation would be very usefull indeed, when no update is available we could make a fairly adequate guess what the next pos will be (at least for small timeframes, <150ms or so).
my framerate is 30fps and i'm sending one packet every frame (33 ms).

Quote
No if we get a network update and we seem to have extrapolated the cars pos wrong, we should draw the car at that updated pos instead, which causes snapping. To make this some more pleasing to the eye you could apply interpolation between the extrapolated pos and the real network updated pos. Most times a simple linear interpolator (lerp) will do the trick although i've heard cubic splines might give even better results for racing games
how do cubic splines work? (tell me only if it's easy to explain, if not i'll google a bit ...)

Quote
Now about your game still stuttering with your extrapolation thread; could it be that your extrapolation thread guesses the next pos, but when a network update comes in, the car will snap back to that network updated pos?
yes, that could be true. especially when a car is steering left or right. the extrapolator is not smart enough to take care of the steering as well. it only does a linear extrapol.

Quote
You would need to send somekind of timestamp wth your network updates... if the currenttime > network update, save the difference, rollback to the network update timestamp and use your extrapolation thread to calculate the new pos according to the time difference. And maybe use a lerp to make the transition from the misguessed pos to the newly guessed pos...
i already use a timestamp mechanism. i know the time when the last packet was coming in and the extrapolator uses the difference (now - last update) for it's calculations. i'll have to think about your approach. 

but anyway, even if i can do perfect extrapolation there will still be stuttering if the network latency is too big. i wonder how professional games deal with that. i've seen games where many people play against each other over the (slow) internet and the movements are still very smooth. with my game i even have problems in a (relatively fast) intranet.
26  Game Development / Game Play & Game Design / peer to peer racing game - how to get smooth animation on: 2006-05-11 14:28:05
hi, i recently started working on a peer to peer racing game. server and client exchange the position and orientation information with UDP packets.  there is a communicator thread which constantly updates the remote car's position.
the problem is that the smoothness of the remote car movement depends on the current load on the network.  i tried implementing an extrapolating thread which moves the remote car to its anticipated position if the network is slow and the packets are not coming in fast enough. but still the stuttering is too disturbing.

i wanted to ask you guys if you know some clever technique how to cope with that.

any comment is appreciated ...
27  Games Center / Archived Projects / Re: TurtleCombat on: 2006-03-27 20:07:25
great! thx for testing. there is another issue where i have absolutely no clue. a mac user in my company cannot type anything in the text boxes after clicking into the text box. it's like key events are not fired anymore when a mouseclick has occured. has anyone seen a similar behaviour before?
28  Games Center / Archived Projects / Re: TurtleCombat on: 2006-03-26 17:47:40
It should be this to catch the '@' character (since I'm sure Windows, Mac, Linux, and Unix all use differant key codes for almost every key):
1  
2  
3  
if (e.getKeyChar() == '@') {
   setText(getText() + e.getKeyChar());
}

This code snippet will work for any character, simply change the '@' to any other character.

EDIT: Not sure if this has already been resolved or not. If it has then I'll really feel stupid here...

no i was never able to fix that, thanks for your comment. just had a look at the code again and found a copy/paste error in my do-it-yourself-keyInputListenerInterface. i'm so glad i could finally fix that.  Smiley it would be nice if one of you mac users could do a quick test for me.
29  Games Center / Archived Projects / Re: SpaceWorms on: 2006-03-26 17:25:59
Loved the game. I don't think the high scores database was working though when I played.

 Huh what makes you say that? did you notice a bug?
if the backend is not working you shouldn't be able to play the game at all...
30  Games Center / Archived Projects / Re: TurtleCombat on: 2006-02-15 13:59:56
this is because i measure the time between two bursts, not the frames. but there must be some bug, too because the steps a bullet makes should be larger on a slow pc which would mean that the time the bullet needs to fly should be the same on a fast and a slow pc.

update: just checked the code and found out that i had an upper limit for the delta time step of 30 milliseconds. this resulted in the behaviour you described. i raised the limit to 100 ms to compensate. this means that the movement speeds will be ok as long as your framerate is higher than 10fps.
Pages: [1] 2 3 ... 9
 

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 (36 views)
2014-12-15 09:26:44

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

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

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

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

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

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

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

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

toopeicgaming1999 (37 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!