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  Game Development / Networking & Multiplayer / Re: Peer to Peer game networks on: 2006-03-05 22:59:23
Wow, thanks for posting your thesis.  I think you have a typo on your front page though "Peer to Perr".

-Sam
2  Game Development / Networking & Multiplayer / Re: Have I adaquatly described BULLET? on: 2006-02-14 02:40:33
What's project Darkstar?

-Sam
3  Game Development / Networking & Multiplayer / Re: networking libraries on: 2006-02-07 22:35:07
Does Headquarters support UDP or just TCP?

-Sam
4  Java Game APIs & Engines / OpenGL Development / Re: 32-bit Graphics, getting dithered down to 16-bit? on: 2005-11-22 01:25:11
I think the command ilutEnable(ILUT_OPENGL_CONV); may force nVidia cards to use correct texture format.

See the entry on ILUT_OPENGL_CONV in http://openil.sourceforge.net/tuts/tut_10/

-Sam
5  Game Development / Networking & Multiplayer / Re: Physics Collisions + Network Latency on: 2005-09-20 23:20:27
If UDP is the only solution... is there a freely available implementation of reliable transfer over UDP in java? (I'd really not like to reinvent the wheel here... )

If you feel like fixing up the cracks in the wheel check out https://jenet.dev.java.net/.

-Sam
6  Games Center / Archived Projects / Re: Ultratron beta on: 2005-05-01 23:33:24
Quote
It starts up, but as soon as I press a key it closes and brings up a purchase page on your site.  

I tried space, ctrl and enter...then gave up Sad


I was confused too for a little while trying to click with the mouse.

Try the arrow keys.

Ultratron ran fine smoothly on a 2.8 P4 Windows w/ Java 5.0

-Sam
7  Discussions / Miscellaneous Topics / Better Apple than Sun :-P on: 2005-05-01 23:29:46
Quote
Apple Computer has been hit with a trademark infringement lawsuit, alleging that its newly released Mac operating system, nicknamed Tiger, encroaches on the name of online computer reseller Tiger Direct.


http://news.zdnet.com/2100-1040_22-5689986.html

My take is that with Apple's generally good reputation and TD's poor reputation is that any possible confusion could only benefit TD.
8  Game Development / Networking & Multiplayer / Re: two-way UDP from behind a NAT firewall on: 2005-04-20 23:22:38
Quote

Why go through all the trouble of re-inventing TCP if thats what you need.  There are all kinds of good reasons not to and i have never seen a defensible reason why one should.


I had very little bandwidth on the server I was using and needed to exchange information directly between the clients.  Many internet users are behind routers and the only way for NAT'd computers to directly communicate (as far as I know) is by NAT traversal w/ UDP

It was not for an increase in speed or decrease in overhead, as my own method is slower and less efficient than TCP.

-Sam
9  Game Development / Networking & Multiplayer / Re: two-way UDP from behind a NAT firewall on: 2005-04-20 22:22:57
I use the method you describe in my game and it seems to work with all the routers I have tested it with.  Some firewalls will block UDP, but there is not much you can do about that.

One thing you have to remember is that when the server in the middle sends the WAN address when the clients have different WAN addresses (ie. they are behind different routers) and the LAN address when they share the same WAN address.  Otherwise you run into problems.

I'd send a packet about once a minute (or 30 seconds to be on the safe side) to keep the entries in the router's table alive.

The biggest pain I have had with this method is creating a TCP like protocol over UDP so that the clients can exchange data reliably without sending it through the central server.

-Sam
10  Games Center / Archived Projects / Re: FoodBomber on: 2005-02-26 15:42:45
Quote

I really love the new Java2 5.0 language features.


So do I.  Since nobody has mentioned it yet on this thread, check out retroweaver (http://retroweaver.sourceforge.net/) - it is amazing!

-Sam
11  Game Development / Networking & Multiplayer / Re: Multiple DatagramChannels on: 2005-02-26 15:17:37
Extra overhead with sends! I remember reading that in the javadoc but I did not really beleive it... So, it sounds like creating connected DatagramChannels for each client can't hurt (too much).

If I have an unconnected DatagramChannel (used to receive new "connections") and a DatagramChannel connected to a client, when the client sends a packet which channel will be marked as ready to read?

The main reason I want to use gathering writes is so that I don't have to create a new ByteBuffer when I want to append a header onto a packet.

-Sam
12  Game Development / Networking & Multiplayer / Multiple DatagramChannels on: 2005-02-26 00:15:35
Hi,

I was thinking of using one DatagramChannel per client instead of using only one DatagramChannel for all the clients.  The main reason I want to do this is so that I can connect the DatagramChannel and then use the write(ByteBuffer[]) so that I can use seperate packets for the header and body of my messages.  (Stupidly, Sun did not provide a send(ByteBuffer[], address) method for gathering sends)

Is there any problem with this method?

Thanks,
Sam
13  Game Development / Networking & Multiplayer / Re: NIO, IO, Threads, and the Meaning of Life on: 2005-02-17 00:39:48
Thanks for your responses.
So, it looks like I am going to be using direct ByteBuffers and recylcling them because indirect ByteBuffers are broken and allocation of direct ByteBuffers causes a severe performance hit.

I read through all of the TCP v. UDP thread (whoa that was long!) which had some useful networking/protocol tips.  I also read blahblahblahhs guide to nio (http://grexengine.com/sections/people/adam/adamsguidetonio.html) .  I'm beginning to doubt I should use NIO... How much of the information in it is up to date?

Should I be using a seperate thread for processing the messages?  What about for the calculations for each timestep?

Thanks for your help,
Sam
14  Game Development / Networking & Multiplayer / NIO, IO, Threads, and the Meaning of Life on: 2005-02-14 22:46:45
I am currently working on a network bomberman game.  It  is currently very playable over LAN, but I am not sure how well it would do over the internet.  The game supports 4 players, but I am thinking of expanding it to 16 or maybe even 32 players.

I am in the process of converting the code from blocking IO to nonblock NIO, which is getting rid of a few ugly threading issues (but of course it creates a few ugly NIO issues).   I am using UDP for everything because:
1. Bomberman is a pretty 'twitchy' game -- it needs low latencies to be playable.
2. NAT traversal by UDP so that NATed players can host games.

Threads & Networking
With the new NIO code the server is single threaded - including both game logic and networking.  Should I split the gamelogic and networking into two threads?  This would create more threading hassles and synchronization issues.  Also, would it be more efficient to have more than one networking thread (but one Selector)?

ByteBuffer
I am creating a new ByteBuffer every time I want to send or receive data.  This seems pretty inefficient, so I was thinking of creating a class to hold a fixed number of direct ByteBuffers to be used and reused.  Should I use/reuse direct ByteBuffers for both receives and sends?

Reliability
I am running the same simulations on both the client and the server (50 itr/s).  Updates happen every time a player presses or releases a key because that when the simulations would become out of sync.  Although I do not need in-order delivery for game messages, I still need the updates to come eventually - it would be irritating for a player to be killed by a bomb that they never saw.  I could:
1.  Have the client ACK every game update they receive and then retransmit updates that have not been ACKed within a time constraint.
2. If the client receives update 5 but has not yet received update 4 it starts a countdown which then requests that the server retransmit packet 4.
Any ideas on which method (or any other one) would be best?

Threads & The Client
Like the server, the client is single threaded, except that it will has a few AWT threads (I'd love to use LWJGL, but too many broken OpenGL drivers...)  Again, should I use seperate threads - perhaps one for gamelogic, one for graphics, and one for networking?  The gamelogic on the client will likely have to do calculations a few times, such as when it receives an update for timestep 4 but it is on timestep 10.  It then has to go back to 4, update, then calculate from 4-10.

File IO
When reading a file on the server, such as a map, to send to the client, should I spawn a thread to read in the file to a buffer or byte[] and then notify the main thread that its ready to be sent to the client?

Non Blocking IO
Since non blocking DatagramChannels have a possibility of not sending a packet if the buffer is filled, whenever I want to send a packet I add it to a LinkedList and register the channel for writing.  Later, deregister, I remove packets from the linkedlist until its empty or one does not send, in which case I add it back to the list and reregister.  Is this an accepted way of doing NBIO?

Thanks for your help,
-Sam Smiley
15  Discussions / General Discussions / Re: Java Application Installation is a NIGHTMARE on: 2004-08-20 12:38:04
Quote
As we all know by now, more than 50% of all new PC's come with this already, including an auto-updater.

I noticed that the autoupdater doesn't seem to work. Is (or was) the autoupdater broken?
Anyone know much about JSR 200 (http://www.jcp.org/en/jsr/detail?id=200)? Looks like it will allow for smaller downloads of the JRE.

Quote
b) Try 5MB for the JRE., not 15. 15MB is about the total size of Xj3D's minimum installer, of which 8MB is InstallShield's own internal junk, 5MB is the JRE and the rest is Xj3D and all it's libraries.  

Is there a way I can distribute a 5MB JRE?  

Quote
5 years ago I would agree with the argument. These days I don't agree. Users seem to have no problems downloading 100MB album rips or 50MB patches

There is still a lot of people with dialup (~49%).  Also, I remember Cas saying that downloads decrease drastically when the file is >10MB

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

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

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

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

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

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

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

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

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

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