About Store Forum Documentation Contact



Post Reply 
MMO combat.
Author Message
DaveTs Offline
Member

Post: #1
MMO combat.
Hi.

I'm fighting against Esenthel and is hard - the documentation is limited -. I'm trying to build a combat sistem first person based. Initially i would to let the client handle the combat data but that is really a bad move, also a bad idea. Now I try want to handle combat in the Client.cpp.
My problem is that i don't know how to get the object I hit, and then send it to the server..

I will try to explain it better. The process is that one.

I'm still using direct peer connection so, the system should work like that.

I hit a client - direct peer -, here i don't know how to identify which client is.
Then I need to send the data to the server My client and his client, the server do the maths and return the result to both clients.
Here i don't know hot to send data to a fixed client.

The main problem is Identifying the clients and then sending data to fixed clients. <<-- This is what i don't know how to do.

Dunno if my explanation is understandable. Thank you in advance.
I'm doing a lil of brainstorming and perhaps a good way to do that is to assign an ID to everyclient when it connects to the server and giving the client that info. This could be a good way to have all clients well identified...

What do you think about?
(This post was last modified: 06-14-2011 09:23 AM by DaveTs.)
06-14-2011 08:54 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: MMO combat.
peers (neighbors) on the client are stored using Map<SockAddr>
so they're identified by internet address, IP+PORT
basic combat is in ERPG2, so you can look it up
06-16-2011 05:07 PM
Find all posts by this user Quote this message in a reply
DaveTs Offline
Member

Post: #3
RE: MMO combat.
Thank you Esenthel.. But the combat i have in mind is way complex, i plan to use weapon arcs and is because of that i need to know who I am hitting.
I mean, with a single swing you can hit several people or npc's, then i need to know who is/are the target/s.

But thank you, i think i can do it using neightbor...

Greetings.
06-16-2011 05:13 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: MMO combat.
just iterate the neighbors container, find closest, and get its SockAddr
some collision detection formulas are in tutorials and in ERPG2
06-16-2011 05:29 PM
Find all posts by this user Quote this message in a reply
DaveTs Offline
Member

Post: #5
RE: MMO combat.
Ok! Thank you again.
06-16-2011 05:38 PM
Find all posts by this user Quote this message in a reply
Post Reply