Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (488)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  DataInput vs. ByteArrayInput, and more...  (Read 1983 times)
0 Members and 1 Guest are viewing this topic.
Offline MickeyB

Senior Member




my game will work, my game will work!


« Posted 2002-12-27 16:49:39 »

I am converting a mud server to send data for a very simple, real-time 3rd person shooter.  The max game board will support 16 players(8 to a side)  I need to send location data, and projectile data to the clients.  

Which is prefered...?

(acutally 2 questions here)
1. server loops thru all players every 30 millisecs(or so) and on each player loop thru all players sending location data or what?

2.  use a DataInput(Output)Stream or ByteArrrayInput(Output)Stream or what?

apologiies for the vagueness.

M

MickeyB

Current Project: http://www22.brinkster.com/mbowles/
Offline MickeyB

Senior Member




my game will work, my game will work!


« Reply #1 - Posted 2003-01-02 15:32:45 »

should the client only send data to server when it makes a move ore on a continual basis thru a thread loop.?

I am trying to smooth out my motion on data returned from the server.

MickeyB

Current Project: http://www22.brinkster.com/mbowles/
Offline MickeyB

Senior Member




my game will work, my game will work!


« Reply #2 - Posted 2003-01-03 13:28:10 »

ok, should I use behaviors to make moves after data comes from server or just run the transform after each piece of data from server is collected?  

Also, how can I capture the radians as a double from an existing TransformGroup?

I can get the x, y and z, but since I am using DataOutPutStream(for now) I need to send the angle as a double.

M

MickeyB

Current Project: http://www22.brinkster.com/mbowles/
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Pyros

Senior Newbie




Let's make Java games rock !


« Reply #3 - Posted 2003-01-03 14:15:58 »

Quote
should the client only send data to server when it makes a move ore on a continual basis thru a thread loop.?


It really depends on the kind of game. If fast action is required, a loop may be better, because sometimes the network isn't working optimally, then if a package sent to one client is lost on the way, the client might not know something is happening, but the loop will send update info soon so the client will catch up even after a network clitch.

If you use a protocol that assures everyone gets every package of information before the action continues, you can do it without the loop.

Maybe you should implement both and try them out, which one actually works faster when YOU have done them? Such different modules mean a bit more work, but not much compared to all the other work you're going to do on the game, so it might be a worthwile learning experience for you to try them both.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (18 views)
2014-08-28 18:26:30

CopyableCougar4 (26 views)
2014-08-22 19:31:30

atombrot (39 views)
2014-08-19 09:29:53

Tekkerue (36 views)
2014-08-16 06:45:27

Tekkerue (33 views)
2014-08-16 06:22:17

Tekkerue (22 views)
2014-08-16 06:20:21

Tekkerue (33 views)
2014-08-16 06:12:11

Rayexar (69 views)
2014-08-11 02:49:23

BurntPizza (46 views)
2014-08-09 21:09:32

BurntPizza (37 views)
2014-08-08 02:01:56
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!