Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / CURVEVALUE() backwards - can it be done?

Author
Message
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 4th Nov 2003 10:42
hello

The command CURVEVALUE() is a very handy and easy shortcut for decelleration but is there an equally easy shortcut for accelleration?

Sleep ... those little slices of death. How I loathe them! - Edgar Allen Poe
adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 4th Nov 2003 14:49
I'm not sure what the problem is.

speed# = curvevalue(speed#, maxspeed#, 20.0) `-- accelerate
speed# = curvevalue(speed#, 0.0, 20.0) `-- decelerate

I could be wrong on the syntax for curvevalue ...

Can I ask you a Question?
What is it?
It's an interrogative form of sentence, used to test knowledge. But that's not important right now.
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 4th Nov 2003 15:04 Edited at: 7th Nov 2003 11:03
The problem is:

To go from say 100 - 0 or 0 - 100 CURVEVALUE() will start off with a large step and slowly reduce the step until the goal is reached.

What I want is the step to start off slowly and steadliy increase until the goal is reached.

My latest project has no name - feel free to suggest one. Think 'Lunar Lander' with multiplayer, guns and bombs!

Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 7th Nov 2003 11:04 Edited at: 7th Nov 2003 11:08
On a similar subject:

Does CURVEANGLE() perform the same function as combining CURVEVALUE() with WRAPVALUE() or does it perform something completely different?

My latest project has no name - feel free to suggest one. Think 'Lunar Lander' with multiplayer, guns and bombs!

Proteus 1935
22
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Brazil
Posted: 7th Nov 2003 18:36
2nd question :
You should check if curveangle will go the long way alround if prompted for "curving" 359 to 1 deg...(I'm away from my dbp )

Currently coding: 3d-2d latitude/longitude
Recent coding: elliptical orbits
Proteus

Login to post a reply

Server time is: 2026-07-26 15:29:32
Your offset time is: 2026-07-26 15:29:32