Two questions:
1) What's the best way to handle bullets & shots?
2) ...what about in (online multiplayer) network game? :)
I'm back to using Blitz3D... and was searching for code on how to handle gun shots. Conclusion seems to be that linepicks should be avoided, and instead use bullets that collide... and do stuff depending on collision.
Here's some threads I've checked out:
http://www.blitzbasic.com/Community/posts.php?topic=76232#852521
damage effect:
http://www.blitzbasic.com/Community/posts.php?topic=76139#851176
line pick & slowdown:
http://www.blitzbasic.com/Community/posts.php?topic=75533#844735
I presume I should 'create bullet objects' and let them fly? Is this the most efficient way to handle them? (I expect to have single shooting guns, but also shotguns that could send 5-10 "bullets" per shot)
---
2) What about online play? (server-client)
Server is naturally in "right time", but all the clients lag behind (a bit), and their positions/rotations aren't exactly in sync.
Even though my game is not FPS, it still has enough shooting to make things bit more complex:
http://www.deadwakegame.com/forums/showthread.php?t=478 (link to a video showing shooting :))
I've dug some resources earlier, like this one:
http://www.gameproducer.net/2006/10/23/online-multiplayer-games-programming-resources-are-hard-to-find/
...but I think for example Valve's system (Source multiplayer) has too heavy calculation for figuring out "where client was aiming 200 milliseconds ago", and I'd try to look something bit more simple.
I *could* simply let client shoot (and lag behind), and then let server simply send "bullets info", but this still won't solve the problem if client was aiming to something that wasn't there.
(I suppose one idea could be to simply let client also 'decide' whether he 'clicked target', and then server would know too...)
Ideas?
1) What's the best way to handle bullets & shots?
2) ...what about in (online multiplayer) network game? :)
I'm back to using Blitz3D... and was searching for code on how to handle gun shots. Conclusion seems to be that linepicks should be avoided, and instead use bullets that collide... and do stuff depending on collision.
Here's some threads I've checked out:
http://www.blitzbasic.com/Community/posts.php?topic=76232#852521
damage effect:
http://www.blitzbasic.com/Community/posts.php?topic=76139#851176
line pick & slowdown:
http://www.blitzbasic.com/Community/posts.php?topic=75533#844735
I presume I should 'create bullet objects' and let them fly? Is this the most efficient way to handle them? (I expect to have single shooting guns, but also shotguns that could send 5-10 "bullets" per shot)
---
2) What about online play? (server-client)
Server is naturally in "right time", but all the clients lag behind (a bit), and their positions/rotations aren't exactly in sync.
Even though my game is not FPS, it still has enough shooting to make things bit more complex:
http://www.deadwakegame.com/forums/showthread.php?t=478 (link to a video showing shooting :))
I've dug some resources earlier, like this one:
http://www.gameproducer.net/2006/10/23/online-multiplayer-games-programming-resources-are-hard-to-find/
...but I think for example Valve's system (Source multiplayer) has too heavy calculation for figuring out "where client was aiming 200 milliseconds ago", and I'd try to look something bit more simple.
I *could* simply let client shoot (and lag behind), and then let server simply send "bullets info", but this still won't solve the problem if client was aiming to something that wasn't there.
(I suppose one idea could be to simply let client also 'decide' whether he 'clicked target', and then server would know too...)
Ideas?