Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
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]
nelsongames (12 views)
2018-04-24 18:15:36

nelsongames (10 views)
2018-04-24 18:14:32

ivj94 (586 views)
2018-03-24 14:47:39

ivj94 (49 views)
2018-03-24 14:46:31

ivj94 (383 views)
2018-03-24 14:43:53

Solater (63 views)
2018-03-17 05:04:08

nelsongames (110 views)
2018-03-05 17:56:34

Gornova (159 views)
2018-03-02 22:15:33

buddyBro (705 views)
2018-02-28 16:59:18

buddyBro (93 views)
2018-02-28 16:45:17
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

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