Games in a real time.

Hello people!!. I'd like to development games based in sockets, with the feature of to be games really on-line.I don齮 speak of a conventional applet as chess,tetris...etc. For example, I have deveploment a simple game with 2 planes. There is code for the player (client code) and there is code for the servant. I use sockets. If a plane is moving, its movement is reflected (in real time) in the other player's game. Each player games in a different site with different computer with SDK installed. My question is if possible to make more elements for to do the game really interesting. I tried that the plains can to shoot, but I had problems. The shoots were refleted but not of the all. Java is prepared for this?. Java can solve it?. Java is the adequate tool for this game and others with the same features?.

Thanks very mach!!!

Ruly. "JavaRed".

[872 byte] By [JavaReda] at [2007-9-28 5:55:49]
# 1
I'm still a little unclear of what your question is... but if it's "Can Java make online games?" then yes, Java can! Look at the online games at http://games.yahoo.com/Pool is especially impressive
Woogleya at 2007-7-9 17:06:49 > top of Java-index,Other Topics,Java Game Development...
# 2

Hello,

If I understand what you're saying, you're telling us that the game "lags" over the network, right? In other words, a bullet might be seen traveling on one computer, but the other computer may show it in sync or it may be several seconds behind.

First and foremost: THIS IS NOT A PROBLEM WITH JAVA. This is a problem with networking in general. If you dive into how Ethernet works, it's almost amazing that your message even makes it to the other side, much less fast. The minimum amount of lag you're going to see is on the order of 10 milliseconds for any network connection. Modems go as high as 300-900 ms. And if you are using UDP/IP instead of TCP/IP, the message may never even arrive!

So what does all this mean? It means that your network code is going to have to take this into account and work around it. It means that each client will have to plot paths for characters and bullets and change their course for each network packet. This can cause characters to "jump" on slow connections, but that's the price of networked games.

Look at the ZeroPing mod for Unreal (http://zeroping.home.att.net/) to get a good idea of what you can do about network lag.

jbanesa at 2007-7-9 17:06:49 > top of Java-index,Other Topics,Java Game Development...
# 3
> 300-900thats a little pesimistic. For any realtime game to be playable, your looking at a range of 50-300.
Abusea at 2007-7-9 17:06:49 > top of Java-index,Other Topics,Java Game Development...
# 4

300 ms is the best I ever got out of a modem. Unfortunately, modulation and demodulation takes time, plus standard phone lines are incredibly slow. WinModems make the problem even worse because mod/demod is done whenever the processor feels like it has time. I'm afraid that modems have pretty much always been at the edge of what is acceptable for a realtime online game. Even a little bit of line degradation and you can forget playing even Zero Ping.

(All you hardcore gamers, feel free to add in your two cents.)

jbanesa at 2007-7-9 17:06:49 > top of Java-index,Other Topics,Java Game Development...
# 5
The secret is prediction, not wait for packets to arrive and move enemy unit/s car/plane, whereever you think he probably move...if you are right nothing happends, if you are wrong unit jumps :-), but it would jump either you guess or not...I am a newbie, just guessing X_D.
RollWhisTlera at 2007-7-9 17:06:49 > top of Java-index,Other Topics,Java Game Development...
# 6

> 300 ms is the best I ever got out of a modem.

> Unfortunately, modulation and demodulation takes time,

> plus standard phone lines are incredibly slow.

> WinModems make the problem even worse because

> mod/demod is done whenever the processor feels like it

> has time. I'm afraid that modems have pretty much

> always been at the edge of what is acceptable for a

> realtime online game. Even a little bit of line

> degradation and you can forget playing even Zero Ping.

>

>

> (All you hardcore gamers, feel free to add in your two

> cents.)

well, I used to manage 130-200 to BarrysWorld/Wireplay/Jolt Q3/CS/MoH servers. (on my external rockwell 56k modem)

I then got ADSL, and wallowed in the bliss of 30-50ms :))

Now im back to 56k, and its so painful I don't bother anymore.

The key to low(thats <200) pings on 56k, is to turn error correction OFF, increase the receive buffer to max., unbind IPX, M$ file and print sharing, and any other rubbish that is bound to the dial-up adapter.

Playing on a server close to you helps as well :)

oh, and the magic Q3 commands 'rate 4000', and 'snaps 20' :p

Abusea at 2007-7-9 17:06:49 > top of Java-index,Other Topics,Java Game Development...
# 7
oh, and 'cl_timenudge -<your ping>' can help 2 - though it takes abit of getting used to.
Abusea at 2007-7-9 17:06:49 > top of Java-index,Other Topics,Java Game Development...
# 8

Search for "dead reckoning" as a phrase (perhaps include 'algorithm') on google.

http://www.google.com/search?as_q=%22dead+reckoning%22+algorithm&num=50&hl=en&ie=UTF-8&oe=UTF-8&btnG=Google+Search&as_epq=&as_oq=&as_eq=&lr=&as_ft=i&as_filetype=&as_qdr=all&as_occt=any&as_dt=i&as_sitesearch=&safe=off

The military has some good documents regarding this kind of thing.

Bill.

bdavisxa at 2007-7-9 17:06:49 > top of Java-index,Other Topics,Java Game Development...
# 9
Thanks very mach, people!!!. Theirs ideas are very interesting. I think now that the possibility of Java for games in REAL time will be better than a desire o a dream.I intuit that Java in a near time... little by little. Bye friends!!!!!!
JavaReda at 2007-7-9 17:06:50 > top of Java-index,Other Topics,Java Game Development...