Gamestudio Links
Zorro Links
Newest Posts
How to buy tomorrow at open?
by frutza. 06/01/23 19:58
Adding Position to Current Trade
by AndrewAMD. 05/30/23 10:34
Unable to change multiplier of contract
by vicknick. 05/30/23 06:56
Wrong Definition of Sharpe Ratio in Zorro?
by vicknick. 05/29/23 06:32
Backtest strategy on bitcoin/crypto
by JamesHH. 05/26/23 04:36
Return type of floor()
by AndrewAMD. 05/25/23 14:17
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (AndrewAMD), 1,065 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
BInnacle, androsa, XquicksnowX, danishinvest, Trail
18942 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Online Shooter tutorial #335422
07/28/10 12:57
07/28/10 12:57
Joined: May 2010
Posts: 63
J
JohnnyIsDutch Offline OP
Junior Member
JohnnyIsDutch  Offline OP
Junior Member
J

Joined: May 2010
Posts: 63
Hello all,

Is there a tutorial on this forum for an online shooter? not workshop25 of Litec, can someone here post the link to the
tutorial or can someone make one, because on google I can not
find one. I need him not only for myself but I think there are more interest.

about how to connect and
how to send data and receives data with a source please, Thanks

Last edited by JohnnyIsDutch; 07/28/10 13:01.
Re: Online Shooter tutorial [Re: JohnnyIsDutch] #335425
07/28/10 13:07
07/28/10 13:07
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
there is an aum series about online games (and a shooter i think)

Re: Online Shooter tutorial [Re: Rei_Ayanami] #335429
07/28/10 13:11
07/28/10 13:11
Joined: May 2010
Posts: 63
J
JohnnyIsDutch Offline OP
Junior Member
JohnnyIsDutch  Offline OP
Junior Member
J

Joined: May 2010
Posts: 63
aum75 but i cannot work with it, it is to advanced

Re: Online Shooter tutorial [Re: JohnnyIsDutch] #335435
07/28/10 13:51
07/28/10 13:51
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
then you probably should not make and online shooter


3333333333
Re: Online Shooter tutorial [Re: Quad] #335439
07/28/10 14:35
07/28/10 14:35
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
That's not helpful, Quadraxas. Johnny, you use the AUM's to learn how to make such games by trying the tutorials and workshops. search the AUM's and read all of the documentaion, plus study the workshops, that will help you.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: Online Shooter tutorial [Re: Blink] #335448
07/28/10 16:10
07/28/10 16:10
Joined: May 2010
Posts: 63
J
JohnnyIsDutch Offline OP
Junior Member
JohnnyIsDutch  Offline OP
Junior Member
J

Joined: May 2010
Posts: 63
oke, i go to do it, but i think that i know how it works but i have a problem with my code:
Code:
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// O.w.n..c //////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////


function main()
{
  if (!connection) 
    error("The Server is offlinea");
  else 
    while (dplay_status < 2) wait(1); // wait until the session is opened or joined

  dplay_localfunction = 2; // run actions both on server and client
  level_load ("O.w.n..wmb");
  vec_set(camera.x, vector (-600, 0, 100)); // set a proper camera position

  if (connection & CONNECT_SERVER)  // this instance of the game runs on the server
    ent_create ("cbabe.mdl", vector (100, 50, 40), Player); // then create the red guard!
  else // otherwise, it runs on a connected client
    ent_create ("cbabe.mdl", vector (-100,-50, 40),Player); // create the blue guard	
}


function camera_follow(ENTITY* ent) 
{ 
   while(1) 
   { 
   vec_set(camera.x,vector(-128,0,45)); 
   vec_rotate(camera.x,ent.pan);
   vec_add(camera.x,ent.x);
   vec_set(camera.pan,vector(ent.pan,-10,0)); 
   wait(1); 
   } 
}

action Player()
{ 
	{    
   var walk_percentage = 0;
   while (1) 
   {
   if (my.client_id == dplay_id) { // the following code runs on the player's client only
   my.skill1 = key_w - key_s; // forward/backward
   send_skill(my.skill1,SEND_UNRELIABLE|SEND_RATE); // send movement request to the server
   my.skill2 = key_a - key_d; // left/right rotation
   send_skill(my.skill2,SEND_UNRELIABLE|SEND_RATE); // send rotation request to the server
   }  
  
   if (connection & CONNECT_SERVER) 
   {
   my.pan += my.skill2*5*time_step;   // rotate the entity using its skill2
   var distance = my.skill1*5*time_step;
   c_move(me, vector(distance,0,0), NULL, GLIDE); // move it using its skill1
   walk_percentage += distance;
   ent_animate(me,"walk",walk_percentage,ANM_CYCLE); // animate the entity	
	wait(1);
	}
	wait (1);
	}
}

here my acklog with the error
Quote:
Log of A8 Engine 8.02.0 run at Wed Jul 28 18:08:23 2010
Johnny Reinders on Windows NT/2000/XP version 6.1 Build 7600
Options O.w.n..c -cl -sv -diag -t.
App: E:\Program Files\GStudio8\acknex.exe in E:\Program Files\GStudio7\work\O.w.n\

MM mixer opened
DSOUND device opened
DI interface opened
Start Window opened(c) Conitec - www.3dgamestudio.com
A8 Engine - Trial Edition V8.02.0 - Jul 27 2010
Development version
30 days left

Mouse found
Speakers (2- BCD3000) opened
ATI Mobility Radeon X1400 pure T&L device 1ff9 detected
D3D device ATI Mobility Radeon X1400 1ff9 selected.
ackphysx.dll opened
ackwii.dll opened
Compiling O.W.N..C - [Esc] to abort....
Error in line 19:
'Player' undeclared identifier
< ent_create ("cbabe.mdl", vector (100, 50, 40), Player); // then create the red guard!
>
.. 0.102 sec
Error compiling O.W.N..C
Error E355: Startup failure - any key to abort
Program aborted

Close level,DLL,objects
Free input,funcs,panels,defs,syns,views,strings,vars..ok
Free sounds,bmaps,fonts,hash,defs1,script..ok
Close dx,multimedia,D3D
Disconnect,connection,engine,nexus..ok
A8 Engine - Trial Edition V8.02.0 - Jul 27 2010
(c) Conitec - www.3dgamestudio.com
30 days left
Unfreed: 939, INC, 2136 bytes
Close window at 4.192


Re: Online Shooter tutorial [Re: JohnnyIsDutch] #335449
07/28/10 16:12
07/28/10 16:12
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
your script name and wmb aren't very good choosen wink

and the main, should be at the botton of the code wink

and Player is also no good name (player_act or something)

Re: Online Shooter tutorial [Re: Rei_Ayanami] #335462
07/28/10 17:45
07/28/10 17:45
Joined: May 2010
Posts: 63
J
JohnnyIsDutch Offline OP
Junior Member
JohnnyIsDutch  Offline OP
Junior Member
J

Joined: May 2010
Posts: 63
but if i replace Player to player walk then is it also that problem

Re: Online Shooter tutorial [Re: JohnnyIsDutch] #335466
07/28/10 18:03
07/28/10 18:03
Joined: Jul 2009
Posts: 80
Area 51
F
fangedscorpion Offline
Junior Member
fangedscorpion  Offline
Junior Member
F

Joined: Jul 2009
Posts: 80
Area 51
Did you make sure that the player_walk has a _ between the player and the walk?

try this updated code:
Code:
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// O.w.n..c //////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////





function camera_follow(ENTITY* ent) 
{ 
   while(1) 
   { 
   vec_set(camera.x,vector(-128,0,45)); 
   vec_rotate(camera.x,ent.pan);
   vec_add(camera.x,ent.x);
   vec_set(camera.pan,vector(ent.pan,-10,0)); 
   wait(1); 
   } 
}

action player_walk()
{ 
while(my!=NULL)
	{    
   var walk_percentage = 0;
   while (1) 
   {
   if (my.client_id == dplay_id) { // the following code runs on the player's client only
   my.skill1 = key_w - key_s; // forward/backward
   send_skill(my.skill1,SEND_UNRELIABLE|SEND_RATE); // send movement request to the server
   my.skill2 = key_a - key_d; // left/right rotation
   send_skill(my.skill2,SEND_UNRELIABLE|SEND_RATE); // send rotation request to the server
   }  
  
   if (connection & CONNECT_SERVER) 
   {
   my.pan += my.skill2*5*time_step;   // rotate the entity using its skill2
   var distance = my.skill1*5*time_step;
   c_move(me, vector(distance,0,0), NULL, GLIDE); // move it using its skill1
   walk_percentage += distance;
   ent_animate(me,"walk",walk_percentage,ANM_CYCLE); // animate the entity	
	wait(1);
	}
	wait (1);
	}
}
}


function main()
{
  if (!connection) 
    error("The Server is offline");
  else 
    while (dplay_status < 2) wait(1); // wait until the session is opened or joined
	
  dplay_localfunction = 2; // run actions both on server and client
  level_load ("O.w.n..wmb");
  vec_set(camera.x, vector (-600, 0, 100)); // set a proper camera position

  if (connection & CONNECT_SERVER)  // this instance of the game runs on the server
    ent_create ("cbabe.mdl", vector (100, 50, 40), player_walk); // then create the red guard!
  else // otherwise, it runs on a connected client
    ent_create ("cbabe.mdl", vector (-100,-50, 40),player_walk); // create the blue guard	
    wait(1);
    
}



The problem was that you had multiple brackets in your player action without having a while loop or anything and that was cutting off half of the action.


"Pow! You are dead! Not big suprise!" -Heavy
Re: Online Shooter tutorial [Re: fangedscorpion] #335585
07/29/10 14:27
07/29/10 14:27
Joined: Feb 2006
Posts: 52
C
carlpa Offline
Junior Member
carlpa  Offline
Junior Member
C

Joined: Feb 2006
Posts: 52
Perhaps a bit peripheral but:

Is there a reference to a basic discussion of how multi-user on-line programs work in GS and what are the limitations in timing, hardware, etc. This would be a summary or review. I know the information is scattered in the manual, wilki and this forum. A review article would be nice. Thank you, Danke, xie xie.


Researcher & clinician. A6, A7, & A8
First computer a Commodore Pet
Page 1 of 2 1 2

Moderated by  HeelX, Tobias_Runde 

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