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]
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
Hi,

when I use this transparent gif: http://kurve.knot.be/gui2.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: http://kurve.knot.be/gui1.gif as background, I get only 30-35 fps. Why could this be? This image us even smaller than the previous (5kb vs 53kb)

Huh

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
Hi,

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: http://kurve.knot.be/kurve-online.rar

This is the switching 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  
    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");
            setWindowed();
        }
        else
        {
            fullscreen = true;
            gd.setFullScreenWindow( frame );
            gd.setDisplayMode( dm );
        }
    }

    private void setWindowed()
    {
        if(fullscreen)
        {
            gd.setFullScreenWindow(null);
        }
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
        frame.toFront();
    }
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:
http://kurve.knot.be/kurve.jpg

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
Hi.

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:
http://kurve.knot.be/kurvetest.zip
6  Game Development / Game Mechanics / Simple 2d collision response on: 2004-10-03 10:25:00
Hi,

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
Aloha,

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: http://www.knot.be/rvf/start.jnlp (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]
 

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

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

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

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

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

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

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

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

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

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