Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
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  Game Development / Networking & Multiplayer / Re: Suggests for a 2d networked game on: 2013-04-22 21:34:39
And another question, i have positions to update, how can i pack my datas for sending??
2  Game Development / Networking & Multiplayer / Re: Suggests for a 2d networked game on: 2013-04-22 21:31:54
yes always at least one, otherwise the neworking would not work right?
you need 1 listener thread to bind client requests.
And then give each client its own communication thread.
Thank you, i will try
3  Game Development / Networking & Multiplayer / Re: Suggests for a 2d networked game on: 2013-04-22 21:13:39
It all depends, i think bomberman wont use that many data, so i guess you could send everything over tcp.
just try both and see what works out.

Ok, so i need a thread for each client, right??
4  Game Development / Networking & Multiplayer / Re: Suggests for a 2d networked game on: 2013-04-22 20:35:42
So i should create a multicast socket for non important data and a thread with a tcp socket for every client?
5  Game Development / Networking & Multiplayer / Suggests for a 2d networked game on: 2013-04-22 20:25:17
Hi,
i'm doing a bomberman game.
I have already did a peer to peer version for 2 players.
Now i want to do an up-to 2 players version using a client server architecture.
What do you suggest me to use?
TCP or UDP?

Thank you
6  Game Development / Game Mechanics / Re: Entity update and render optimization in 2D map on: 2013-01-09 16:44:30
I already tried that.
The slow part of the game is cycle 80 entities two times for each frame.
7  Game Development / Game Mechanics / Entity update and render optimization in 2D map on: 2013-01-09 14:17:00
Hi,
i have a problem with my android game.
It is almost finished but now i have to optimize it to works well on most of devices.
The problem is that i have to update about 80 entities (monsters) each frame and render them. So one for cycle to update them and one to render them.
On devices like galaxy s3, galaxy nexus and others recent devices it works well but in the others, entities update and render process is slows down the game.

I'm using a 48x48 2D tile map and a fixed 60fps time step.
What do you suggest me? How can i efficiently update entities?
Thanks!
8  Game Development / Game Mechanics / Problem with multiplayer and different resolutions on: 2012-11-10 17:22:44
Hi!
I'm working on a multiplayer 2D tiled game. (for android, but also for pc)
I used 3 different tile sizes to support many devices: 32x32 for small resolution, 48x48 for medium and 64x64 for large.

The map is 48x48 tiles.

I setted the player velocity in this way:
32x32: 1.33px     (32px/48px)*2px
48x48: 2px
64x64: 2.66px     (64px/48px)*2px

This is quite perfect but not enough...
What method do you suggest me??
Thank you!!

(i'm using Libgdx)
(if i try playing between two devices with the same resolution, it works PERFECT!)
9  Game Development / Networking & Multiplayer / Re: 2D Game commands delay on: 2012-11-09 08:32:25
Hard to tell from just that.  Try enabling -verbose:gc and seeing if the pauses coincide with a gc cycle.


But is the reasoning right?
10  Game Development / Networking & Multiplayer / Re: 2D Game commands delay on: 2012-11-08 23:37:16
I have a class "Networking" with two threads:
- the first one sends packets in outgoing list;
- the second receive packets and i have a "handle" method to manage each package.

Handle method:
1  
2  
3  
4  
5  
6  
7  
8  
if(packet instanceof PlayerMovePacket) {
   if(isServer) players[1].incomingCommands.add(new PlayerMoveCommand(((PlayerMovePacket) packet).getDir()));
   else players[0].incomingCommands.add(new PlayerMoveCommand(((PlayerMovePacket) packet).getDir()));
}
else if(packet instanceof PlayerFirePacket) {
   if(isServer) players[1].incomingCommands.add(new PlayerFireCommand(((PlayerFirePacket) packet).getFire()));
   else players[0].incomingCommands.add(new PlayerFireCommand(((PlayerFirePacket) packet).getFire()));
}


Then, in the Player class i process all commands in "incomingCommands" list and for each command i move the player in that direction.
Do you need anything else?

Thank you!
11  Game Development / Networking & Multiplayer / Re: 2D Game commands delay on: 2012-11-08 23:06:19
1  
Socket.setTCPNoDelay(true);


Thank you but i already use that!!
12  Game Development / Networking & Multiplayer / 2D Game commands delay on: 2012-11-08 22:52:16
Hi!

I'm working on a 2D game.
There are two players (in multiplayer) and about 350 entities (mobs and other).
To synchronize mobs i used a random with the same seed on both devices.
But to move the player and to fire, i send the commands to the other player through TCP.
It works fine but sometimes there are delays.

Is there a better way to manage players movement?

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

E.R. Fleming (13 views)
2014-07-29 03:07:13

E.R. Fleming (4 views)
2014-07-29 03:06:25

pw (39 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21

Zero Volt (50 views)
2014-07-17 23:47:54

danieldean (42 views)
2014-07-17 23:41:23

MustardPeter (44 views)
2014-07-16 23:30:00
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!