FreeSpace Releases > Scripting Releases
hud pong
Nuke:
if you insist
i wonder why lvlshots dont work anymore :D
WMCoolmon:
Here's a fun challenge - can anyone figure out how (in theory) you could do internet multiplayer pong, by expanding on this method?
Nuke:
you would first need to share the variables of the game between client and server. there arent many of them. could pretty much all be crammed into one packet. the server would be responsible for all the colision detection, scoring, ect. the only variable the client would be allowed to modify is the paddle location (poneh or ptwoh, depending on which side the client is on). the client code would be responsible for getting the mouse coords and calculating the paddle location for that player. the client paddle location would be sent to the server so colisions could be detected the client would have the draw functions available, however the function calls would be relayed from the server to the client. the background as its static would be drawn by the client, same as their paddle, but the ball and server's paddle would be called from the server. i could probibly set it up fairly easy if i had network-global variables, and some sort of function call forwarding.
karajorma:
If you can get the variables from the script into SEXP variables and visa versa the game now handles the updating of those automatically for you.
Might not be the most efficient way of doing things though :)
Flipside:
LOL We have it! The final outcome of years of SCP research.
Network Pong!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version