Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Edgar_Herrera, VoroneTZ, Akow), 973 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
ANet - Dead Reckoning template #253384
02/24/09 13:58
02/24/09 13:58
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline OP
Serious User
Dark_samurai  Offline 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:

Code:
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: Dark_samurai] #253411
02/24/09 15:56
02/24/09 15:56
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Thanks! smile

Re: ANet - Dead Reckoning template [Re: Dark_samurai] #253661
02/25/09 22:33
02/25/09 22:33
Joined: Jul 2002
Posts: 1,364
Minbar
M
MaxF Offline
Serious User
MaxF  Offline
Serious User
M

Joined: Jul 2002
Posts: 1,364
Minbar
Hi

I just get errors:

Error in 'dr_template.c' line 50: 'enet_ent_globpointer' undeclared identifier

< while(enet_ent_globpointer(my) == -1) {wait(1);} //wait until the glob_pointer is available
>
.. 0.239 sec


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 Offline OP
Serious User
Dark_samurai  Offline OP
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
You have to include the ANet header:

Code:
#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: Dark_samurai] #274676
06/28/09 00:10
06/28/09 00:10
Joined: Oct 2006
Posts: 175
G
Gumby22don Offline
Member
Gumby22don  Offline
Member
G

Joined: Oct 2006
Posts: 175
seems the DR template download is not available at present? Has the link changed?

Don
have a great day

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 Offline OP
Serious User
Dark_samurai  Offline 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
G
Gumby22don Offline
Member
Gumby22don  Offline
Member
G

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. wink

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 Offline OP
Serious User
Dark_samurai  Offline 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
Re: ANet - Dead Reckoning template [Re: Dark_samurai] #353175
01/08/11 06:34
01/08/11 06:34
Joined: Nov 2009
Posts: 37
X
XuserTM Offline
Newbie
XuserTM  Offline
Newbie
X

Joined: Nov 2009
Posts: 37
Soon, it'll take to buy anet pro edition for my mmorpg project laugh


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1