Quote:


what i will do is move to the first received point, then keeping this direction but getting slower constantly until the next position comes in. then ill turn slowly to this new position and increase speed to normal.




This wouldn't work. If you speed up and slow down your entities the player will notice it. I spent a few days myself trying to get this working purely via angles, but that does not work either since your simulation will diverge. That past example I showed you is what you should keep using. Though, keep it 2 updates behind. This will keep it very smooth and accuracte, however, it will always be behind. To counter this, try extrapolating the position based on angle, so it is always a certain distance ahead the interpolated position. While I havn't done the extrapolating with the code yet, I will in a couple days, and see if it works like I think...

Your right about the waste of bandwidth, I havn't thought of this previously, but now that you've mentioned it I posted in your future thread. It would be a good feature to selectively send updates.

Quote:

maybe iam totally wrong here and the newer players dont even need the playernumber skill from the ones already in the game. in my case they do because if for example you want to attack another player you have to let the server know wich one you want to attack therefore every client needs to know every other players unique playernumber skill.




Yes, new players will need the unique id of the past players. I don't remember how locoweeds was doing it, but the way i'm doing it works quite well. Here's how:

New client connected function:


Code:
 
function server_called()
{
//if new player connected
if((event_type == event_join) && (people_connected < 8))
{
ifdef server;
// old_pconnected = people_connected;
people_connected += 1; //another person connected
sleep(2);
send_var(people_connected); //send number of people connected
endif; //ifdef server
}

//if player disconnected
if(event_type == event_leave)
{
ifdef server;
people_connected -= 1; // one less person connected to server
sleep(2);
send_var(people_connected); // send number of people connected
endif;
}
}

on_server = server_called; // server called



Now, on the top of the function for your entity which contains the unique id:

Code:
   if(people_connected == 1){mkart1 = me; my.kart_point = 1;}
if(people_connected == 2){mkart2 = me; my.kart_point = 2;}
if(people_connected == 3){mkart3 = me; my.kart_point = 3;}
if(people_connected == 4){mkart4 = me; my.kart_point = 4;}
if(people_connected == 5){mkart5 = me; my.kart_point = 5;}
if(people_connected == 6){mkart6 = me; my.kart_point = 6;}
if(people_connected == 7){mkart7 = me; my.kart_point = 7;}
if(people_connected == 8){mkart8 = me; my.kart_point = 8;}



In the while loop of your entities on the server.

Code:
   if(new_sends != people_connected){client_new += 1*time;}
if(new_sends != people_connected)&&(client_new > 160){client_new = 0; new_sends += 1; send_skill(my.kart_point, send_all); send_skill(my.tracekart, send_all);send_skill(my.wheelkart, send_all);}



To sum it up, when an entity first connects, the people_connected variable goes up by one. You then send this variable to all existing clients. Now, on the new client that just connected you set it's unique id by the existing value of people_connected. In other words, if people_connected is 2, then the new client entity will be id#2.

Now that you've set this skill, you must have some commands for it to send the skill when a new player joins, otherwise only existing players will contain this skill. So that's why you put that code in the while loop on the server, that detects when a new client joins, then it resends all the important skill information(pointers, id, ect.) to the newly joint entity.

Theres probably many ways to do this... but no matter what your doing, you have to make sure you have a little bit of code in each entity function that will automatically update all the new clients of important skills ect. when they join.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/