Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (714)
Games in Android Showcase (214)
games submitted by our members
Games in WIP (788)
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  Java Game APIs & Engines / Java 2D / Re: fps problem on: 2005-03-06 15:03:03
C:\Documents and Settings\knot>java -version
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
2  Java Game APIs & Engines / Java 2D / fps problem on: 2005-03-06 11:32:49

when I use this transparent gif:
as the background for my game, I get an fps of 75, which is ok because I lock my fps on 75.

However, when I use this transparent gif: as background, I get only 30-35 fps. Why could this be? This image us even smaller than the previous (5kb vs 53kb)


Offcourse you could say: use the first image, the other one sucks anyway. And this is true, but I used some copyrighted images in the first layout, and asked the creator for permission. And I didn't get permission to use the images. :-/
3  Java Game APIs & Engines / Java 2D / Switching from fullscreen to windowed mode on: 2005-02-19 12:05:22

when my game app has to swap from fullscreen to windowed mode, the performance is decreasing dramatically, and it becomes unplayable.

switching from windowed to fullscreen mode works ok. (at least when the game started in windowed mode)

The code is available here:

This is the switching code:
    private void setFullscreen()
        if(dm==null || !gd.isFullScreenSupported())
            fullscreen = false;
            System.out.println("# Fullscreen mode is not supported by your graphics device");
            System.out.println("# Switching fullscreen mode off");
            fullscreen = true;
            gd.setFullScreenWindow( frame );
            gd.setDisplayMode( dm );

    private void setWindowed()
4  Game Development / Networking & Multiplayer / Re: online snake game: packet overhead? on: 2005-02-10 10:23:25
Thx for reply.

Well it's not exactly like the regular snake game. It can move to any direction. Maybe this screenshot might clarify:

So a snake can have 3 states: turning to the left, turning to the right, of moving straight forward. I could send to client when the state of a snake changes, you are right.

But I can't figure out how to make the client know how many xx ms the action had taken place in the past. I could send a timestamp from the server. But it is not guaranteed that the time on the client and server is synchronized? And then there is the problem of displaying the action as if it were xx ms in the past.  :-/

This to say I allready thought of sending snake changes, but had no idea how to implement, so I took the easy way and sent the startpositions and offsets every xx ms.
5  Game Development / Networking & Multiplayer / online snake game: packet overhead? on: 2005-02-07 20:33:37

Im am currently writing some test code for a multiplayer snake game. (achtung die kurve - clone).
I am using TCP Sockets atm.

Current situation:

new game round:
I send a short[] array from the server to the clients with their initial random x and y positions. > 2 short per player

running game:
I send left/right pressed/released byte from clients to server. Every 30ms, the server updates the player positions, and sends the x and y offset of each player to its previous position. in a byte[] array. > 1 byte per player

I am using socket.setTcpNoDelay(true); so +/- 33 tcp packets are sent each second, holding a byte[] array of maximum length 6. (max 6 players).

But I read in TCP vs UDP that the TCP overhead is 40bytes?

(40+6)*33 = 1.5 kb/sec sent to each player makes 9kb/sec upload bandwith on the server?
Those 9kb only hold around 1.2kb of data.

How should I reduce the overhead?
Will UDP help? Or do a need to change the way I communicate between client and server.

If I send the player movement keys to all the clients, and let them calculate the new positions every 30 ms, it will be much better ofcourse. But then the server and each individual client won't be synchronized.

The code is available for download here:
6  Game Development / Game Mechanics / Simple 2d collision response on: 2004-10-03 10:25:00

I am having some problems in calculating the collision response of the following situation:

I have a rectangle moving at a certain dx and dy velocity inside an octagon (It's a dice game). When it collides with an edge of the octagon I need to calculate the new dx and dy values.

The top and bottom edge is offcourse: dy=-dy
And left and right edge: dx=-dx

But what about the other edges  Huh  Embarrassed
7  Game Development / Newbie & Debugging Questions / TCP Sockets, UDP, RMI?? on: 2004-08-20 17:02:26

I have been working on a dutch version of the popular Wheel of Fortune tv show.
It's more or likely finished now and it allows 1 to 4 players to play on one pc.
jws link: (it will be difficult to play it if you're not dutch Smiley )

Now: my problem :p I want to make it a 2-4 player online multiplayer game; I have no experience at all with Java networking Sad I guess I will need client and server and make them communicate. I have read a little about tcp sockets and udp and rmi.. and I wonder what is the best method? (So I can study the details of that method and look for some tutorials and then implement it)

Or if anyone knows any good tutorials to get me started that would be nice.. Smiley

Thanks in advance.. knot
8  Game Development / Networking & Multiplayer / 2player snake-like game on: 2004-06-21 11:56:33
Hi Cheesy ,

I made a java clone of this old game 'achtung die kurve'.
You can find it  here , the original game is included in the zip file.

Now I would like to be able to let 2 players play against each other over the internet.

But I really don't have a clue on how to implement this, and which logic should be at client/server etc  Huh

I guess I need the Client to send to the server which keys are pressed, and the Server should send to the Client the positions of each player?  :-/

Any help/tutorial would be greatly appreciated  Wink

Greetz. knot
Pages: [1]
CopyableCougar4 (103 views)
2017-03-24 15:39:42

theagentd (85 views)
2017-03-24 15:32:08

Rule (146 views)
2017-03-19 12:43:22

Rule (132 views)
2017-03-19 12:42:17

Rule (139 views)
2017-03-19 12:36:21

theagentd (151 views)
2017-03-16 05:07:07

theagentd (147 views)
2017-03-15 22:37:06

theagentd (127 views)
2017-03-15 22:32:18

theagentd (121 views)
2017-03-15 22:31:11

ral0r2 (155 views)
2017-03-03 11:52:41
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51 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!