|
ANet - Dead Reckoning template
#253384
02/24/09 13:58
02/24/09 13:58
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
OP
Serious User
|
OP
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
Hi! This is the first version of the official dead reckoning template of ANet. The goal of this template is to offer an easy methode for creating an online game without thinking about the difficult part of effective position updating. The template consists of 3 important functions: - dr_use() - dr_c_move() - dr_ghost() Here is an example of an entity function that uses the DR template:
function player_func()
{
VECTOR dist_move;
while(enet_ent_globpointer(my) == -1) {wait(1);}
if(enet_ent_creator(enet_ent_globpointer(my)) == enet_get_clientid())
{
use_dr();
while(1)
{
my.pan -= 25*mouse_force.x*time_step;
dist_move.x = 15*(key_w-key_s)*time_step;
dist_move.y = 15*(key_a-key_d)*time_step;
dist_move.z = 0;
dr_c_move(me,dist_move,nullvector,IGNORE_PASSABLE+GLIDE);
//controls the camera
camera.x = my.x-100*cos(my.pan);
camera.y = my.y-100*sin(my.pan);
camera.z = my.z+50;
camera.tilt += mouse_force.y;
camera.pan = my.pan;
wait(1);
}
}
else
{
dr_ghost();
}
} Now I want you to test the template and tell me what you think: + Is it already useable? + Is it easy to use? + What would you improve? + How is it working for you? + How is it working over internet (had no chance to test this yet)? The template is free and can also be used with the free version of ANet! It's currently Lite-C only!You can get the template here. Just include dr_template.c into your main script file. Enjoy!
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: ANet - Dead Reckoning template
[Re: MaxF]
#253758
02/26/09 16:07
02/26/09 16:07
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
OP
Serious User
|
OP
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
You have to include the ANet header:
#include <acknex.h>
#include <default.c>
#include "anet.h"
#include "dr_template.c"
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: ANet - Dead Reckoning template
[Re: Gumby22don]
#275843
07/02/09 13:43
07/02/09 13:43
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
OP
Serious User
|
OP
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
Yes, the link was only for a little public beta test.
If you want the final template, you need to buy ANet Standard or ANet Professional.
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: ANet - Dead Reckoning template
[Re: Dark_samurai]
#276020
07/03/09 08:35
07/03/09 08:35
|
Joined: Oct 2006
Posts: 175
Gumby22don
Member
|
Member
Joined: Oct 2006
Posts: 175
|
I have a licence purchase in the works, thanks. But your first post here states: The template is free and can also be used with the free version of ANet! It's currently Lite-C only! You might need to change that. Don have a great day
|
|
|
Re: ANet - Dead Reckoning template
[Re: Gumby22don]
#276092
07/03/09 11:35
07/03/09 11:35
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
OP
Serious User
|
OP
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
I can't change the post anymore.
To make it official:
The template is only available for those who buy an ANet Version!
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
|