Track entities id's from client to server
Track entities id's from client to server
Track entities id's from client to server
Track entities id's from client to server
Track entities id's from client to server
Track entities id's from client to server Track entities id's from client to server Track entities id's from client to server Track entities id's from client to server Track entities id's from client to server Track entities id's from client to server Track entities id's from client to server Track entities id's from client to server
Track entities id's from client to server Track entities id's from client to server
Track entities id's from client to server
Go Back  Xtreme Visual Basic Talk > > > Track entities id's from client to server


Reply
 
Thread Tools Display Modes
  #1  
Old 04-17-2012, 06:04 AM
Risky's Avatar
Risky Risky is offline
Newcomer
 
Join Date: Oct 2006
Posts: 7
Question Track entities id's from client to server


Well first off let me say I am not sure if this should be in network or game programing but I think network programing is more relevant.

Anyway

I am creating my first game that runs over a network and so far everything is working. I have a server program, the clients can connect and see each other flying around. (weeeee)

However I have hit a wall when trying to make them shoot. The most easy way I can think to do this, is to have the client tell the server “hay i need a bullet pointing at x angle moving at y speed” the server then spawns a bullet entity then sends a spawn entity packet to all the clients. The main problem I see with this, is that the clients gun will have a delay based on latency.(funValue -= 1000)

The only other way I can think to do this, is to have some fake bullets spawn on the client but when the client gets the spawn bullet packet from the server, I am not sure how to keep track of what fake bullets to delete.
Reply With Quote
  #2  
Old 06-19-2012, 11:05 PM
lamy's Avatar
lamy lamy is offline
Junior Contributor
 
Join Date: Jan 2003
Location: under your bed
Posts: 347
Default

the lag part is inevitable, the servers job is to broadcast whatever goes around its client,

imho, animating a bullet is pretty detailed for a game, what they usually do is display the animation of a gun shooting and the collision of the bullet to an object, unless you are talking about a 2D game on top view where you need to see the bullet as it moves around (that would mean it's awfully slow) then all you need to do is animate it

the client application is only meant to display whatever the server is broadcasting, otherwise the game can be manipulated easily at client side
__________________
slow down when you need to hurry, stop when you need to move on,
look back when you need to forget, or you might slip and leave sanity
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Track entities id's from client to server
Track entities id's from client to server
Track entities id's from client to server Track entities id's from client to server
Track entities id's from client to server
Track entities id's from client to server
Track entities id's from client to server Track entities id's from client to server Track entities id's from client to server Track entities id's from client to server Track entities id's from client to server Track entities id's from client to server Track entities id's from client to server
Track entities id's from client to server
Track entities id's from client to server
 
Track entities id's from client to server
Track entities id's from client to server
 
-->