Gamestudio Links
Zorro Links
Newest Posts
How to Change Multiplier
by vicknick. 06/02/23 03:27
How to buy tomorrow at open?
by vicknick. 06/02/23 03:19
Adding Position to Current Trade
by vicknick. 06/02/23 03:09
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
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (vicknick, 7th_zorro, Quad), 1,020 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
BInnacle, androsa, XquicksnowX, danishinvest, Trail
18942 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
spaceship movement #240802
12/12/08 17:52
12/12/08 17:52
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
Hi,
I have search the forum and had not found any spaceship
code for moving in space. If you know where I may get some help let me konw.
The code, I came up with in NF303 was like this:
you press w,you had a timer with a delay of .75 of a sec and after .75 sec. you moved to a forward speed of .1.Each .75 sec that you had "W" pressed the speed went up by .1. If you let up on w then you stayed at that speed(the speed you was going at that time). To stop you have to press s untill your forward speed came to 0. The longer you held down the key the faster you went or the slower you went.

I would like to find a better way of moving my ship in space.
Thank You
renny

Re: spaceship movement [Re: sadsack] #240832
12/12/08 20:33
12/12/08 20:33
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Code:
action spaceship()
{
  VECTOR speed,distance;
  vec_set(speed,nullvector);
  while(1)
  {
    vec_accelerate(distance,speed,(key_w-key_s),0);
    c_move(me,distance,NULL,0);
    wait(1);
  }
}


Of course you need a little more for a real spaceship...

Re: spaceship movement [Re: Tobias] #240842
12/12/08 21:13
12/12/08 21:13
Joined: Jul 2007
Posts: 424
EUROPE
maslone1 Offline
Senior Member
maslone1  Offline
Senior Member

Joined: Jul 2007
Posts: 424
EUROPE
take a look at this:

2.5 Space-Game

you have to modify the code if u want to use 3-axis.
this version is for 2-axis space-game.

cheers
Marcel


A8c, Blender, FlStudio, Unity3d

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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