The server doesn''t even send out the move message to all connected clients until it''s tested the move itself. If it passes the collision detection it sets the character to the new spot server side then sends the old position along with the move to all clients to complete.
This avoids who got there first arguments later. The person who got there first is the one who moved first according to the server. There''s no halfway collisions. If I were to process multiple messages at once, I would have to deal with halfway collisions. Yet another reason I don''t use them.
This is also why even if a client was hacked to move a character where it shouldn''t be, it will be placed in the correct position when it tries to move.
Ben
IcarusIndie.com
[The Rabbit Hole | The Labyrinth | Programming | Gang Wars | The Wall]
!!! Time it Takes to Do a MMORPG !!!
Back to the main point of the thread... at least Ultima Online was never finished.
One of the reasons is that players will *always* find a way to take an unfair advantage, mostly exploiting bugs. The other is to add features to the game.
After all, before the first patches, your character couldn''t even sit down
One of the reasons is that players will *always* find a way to take an unfair advantage, mostly exploiting bugs. The other is to add features to the game.
After all, before the first patches, your character couldn''t even sit down
![](smile.gif)
Gaiomard Dragon-===(UDIC)===-
Yes, I understand what you''re saying, but what''s stopping people from just sending move packets really fast. Do you think you could just post that part of your code? I really need to get this down.
------------------------------There are 10 types of people in this world, those who know binary, and those who don't.
Just add
int LastMove; //to the player class/struct whatever
when you get a move message do a
if (GetTickCount()-LastMove>1000)
{
//do move
LastMove=GetTickCount();
}
Simple stuff. Just lower 1000 to whatever minimum interval you want to process move requests.
Ben
IcarusIndie.com
[The Rabbit Hole | The Labyrinth | Programming | Gang Wars | The Wall]
[edited by - KalvinB on April 4, 2002 9:58:51 PM]
int LastMove; //to the player class/struct whatever
when you get a move message do a
if (GetTickCount()-LastMove>1000)
{
//do move
LastMove=GetTickCount();
}
Simple stuff. Just lower 1000 to whatever minimum interval you want to process move requests.
Ben
IcarusIndie.com
[The Rabbit Hole | The Labyrinth | Programming | Gang Wars | The Wall]
[edited by - KalvinB on April 4, 2002 9:58:51 PM]
LOL, for the last time, I understand that! What I really want to know is how your GetTickCount() works.
------------------------------There are 10 types of people in this world, those who know binary, and those who don't.
GetTickCount() is a standard function included with Windows.h
It just returns the number of milliseconds that have passed since the dawn of time or 1970 or something. You''ve never used GetTickCount() before?
Ben
IcarusIndie.com
[The Rabbit Hole | The Labyrinth | Programming | Gang Wars | The Wall]
It just returns the number of milliseconds that have passed since the dawn of time or 1970 or something. You''ve never used GetTickCount() before?
Ben
IcarusIndie.com
[The Rabbit Hole | The Labyrinth | Programming | Gang Wars | The Wall]
GetTickCount determines how much time has elapsed since Windows was last started. The time is measured in milliseconds, although the actual resolution of the function''s output depends on that of the system timer itself. Therefore, it may not be perfectly accurate to the millisecond. Because of the limitations of the 32-bit integer data type, the reported elapsed time wraps back to zero after about 49.7 days of continuous operation.
KalvinB: I guess the last 10 posts or so could''ve been avoided if you had just said that you do use a timer after all.
Maybe the word ''timer'' is confusing, and ''timing'' should be used instead, but the result is the same.
cu,
Prefect
Maybe the word ''timer'' is confusing, and ''timing'' should be used instead, but the result is the same.
cu,
Prefect
Widelands - laid back, free software strategy
"It just returns the number of milliseconds that have passed since the dawn of time or 1970 or something."
...dawn of time... ROFL!
Hehe, its 1970. num of milliseconds since the Epoch or something like that.
-=[ Megahertz ]=-
...dawn of time... ROFL!
Hehe, its 1970. num of milliseconds since the Epoch or something like that.
-=[ Megahertz ]=-
-=[Megahertz]=-
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement