1 registered members (henrybane),
1,182
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Project Isle of Polm
[Re: lostclimate]
#293386
10/11/09 08:42
10/11/09 08:42
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
@lostclimate: You don't have to "merge" all data into one packet. This is done by ENet automatically. ontopic: As you mentioned in the video, 30 frames can pass faster or slower depending on the current framerate. You shouldn't make anything in a game framerate dependent. Use a time period that is the same on every machine, no matter how fast it is. You can use wait(-...) or time_step for that:
//....
var time = 0;
while(1)
{
time += time_step;
if(time >= deadreck_time)
{
time = 0;
//Send position updates
}
wait(1);
}
Your project looks really prommising. I'm really looking forward to a beta
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: Project Isle of Polm
[Re: Dark_samurai]
#293515
10/12/09 04:55
10/12/09 04:55
|
Joined: Jan 2006
Posts: 245 PA
Garrettwademan
OP
Member
|
OP
Member
Joined: Jan 2006
Posts: 245
PA
|
@lostclimate: You don't have to "merge" all data into one packet. This is done by ENet automatically. ontopic: As you mentioned in the video, 30 frames can pass faster or slower depending on the current framerate. You shouldn't make anything in a game framerate dependent. Use a time period that is the same on every machine, no matter how fast it is. You can use wait(-...) or time_step for that:
//....
var time = 0;
while(1)
{
time += time_step;
if(time >= deadreck_time)
{
time = 0;
//Send position updates
}
wait(1);
}
Your project looks really prommising. I'm really looking forward to a beta I may of said it wrong. In my script I have exactly what you have in the function... while(){ if(counter >= 30){ send data; counter = 0; } counter +=1; } I always thought framerate determined how fast functions run...I may be way off though haha. This kind makes sense...I am the new guy...ahem. Yea ANet rocks. I have not run into any limitations yet with it and by far it is the most reliable. I rely on ANet to get the info out there to my clients with world data and item data and so far I have not seen any information lost. Thanks for all the feedback guys.
|
|
|
Re: Project Isle of Polm
[Re: Garrettwademan]
#293546
10/12/09 10:38
10/12/09 10:38
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
Expert
|
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
watched it yesterday, but didn't find the time to respond... two things I noticed: 1) you send the position every 30 frames. That doesn't sound good to me. as you yourself state in the video (if I remember correctly), not every client will run at the same fps. That means you get more updates on some pcs and less on others. That's not good, i think. Instead, you should update every 8 ticks or so: var timePassed = 0; while(1) { timePassed += time_frame; if(timePassed >= 8) { timePassed -= 8; update(); } wait(1); } Second thing I noticed: The animations look weird. What I would recommend is to not send the animations over the net at all (it's an mmo game, after all), instead see the distance that the entity has covered in the past frame, and animate accordingly, depending also on the direction whether you show a strafing animation, or walking forward or standing still etc. The overall surrounding/setup of the game seems nice and solid, I like it! Especially the way the tools get put into the characters hands is very nice Sometimes the other player seemed to hover... you should prevent that, it doesn't look very nice.
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
Re: Project Isle of Polm
[Re: Germanunkol]
#293582
10/12/09 15:17
10/12/09 15:17
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
@Garrettwademan: The difference between my script/the one of Germanunkol and yours is, that you add 1 instead of time_step. Adding 1 all the time only counts the frames passed. With adding time_step you can see how much ticks (1 tick = 1/16 second) passed. Got it?
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: Project Isle of Polm
[Re: Germanunkol]
#293586
10/12/09 15:31
10/12/09 15:31
|
Joined: Jan 2006
Posts: 245 PA
Garrettwademan
OP
Member
|
OP
Member
Joined: Jan 2006
Posts: 245
PA
|
Thanks Germanunkol. I will take a look at that and see if I can use time_frame and time_step. I only put the one night into coding the structure so it is very preliminary. Earlier when I coded player movement I made sure all clients go the same speed by using the time_step, time_smooth and time_frame in a calculation that had fps for the clients...so even the slowest fps clients move the same speed as the fastest.
I was working with the animations to have them auto animation rather than having the clients send the actions. When a client walks it sends a 1, running sends a 2, jumping 3, etc. When I was coding the animation to be only on the local machines I ran into an issue with jumping, crawling, squat walking, attacking because the local machines have no idea what the client is doing (ex: walking forward while squating or jumping forward). No matter what I need to send the data to all clients to update animations for situations like this. The only issue I have now is the sliding effect because all clients see other clients as approx 30 frames or approx 1 second behind.
I will work on this though trying to perfect it the best I can and find the best way of doing this.
Your right, I do have a hovering problem. I will need to fix that soon. If your a client running 4-10 fps you seem to float to the ground and if your running 25fps+ it looks natural. One of the issues I had with updating clients was the local clients were getting stuck in the terrain when moving, so I had to make the terrain passable for them. This isn't a big deal because the client controlling his own character determines collision...but this is good and bad in many ways.
I will post updates on this system as it advances. Thanks for the comments, it helps because sometimes I either don't think of it or try to hide it and hope that no one catches it.
|
|
|
Re: Project Isle of Polm
[Re: Dark_samurai]
#293587
10/12/09 15:34
10/12/09 15:34
|
Joined: Jan 2006
Posts: 245 PA
Garrettwademan
OP
Member
|
OP
Member
Joined: Jan 2006
Posts: 245
PA
|
@Garrettwademan: The difference between my script/the one of Germanunkol and yours is, that you add 1 instead of time_step. Adding 1 all the time only counts the frames passed. With adding time_step you can see how much ticks (1 tick = 1/16 second) passed. Got it? Yea, thanks again. I will add this later and see how it works out.
Last edited by Garrettwademan; 10/12/09 15:35.
|
|
|
|