Questions on adding friction.

Freeform discussion about anything related to modding Transcendence.
Post Reply
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

* Is there a way to add friction to objects like ships and missiles, without adding space environment entities like nebula?

* If not, is there a way to make the environment invisible on the LRS (no gray haze on radar) and on the map (no purple nebulas on the [M]ap grid)?
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!

Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

For missiles, what about using accelerationFactor ? A number slightly less than 100 should give a nice mild friction effect.

For ships, I'm not sure how to do it without a spaceEnviroment. If I'm not wrong, Prophet was testing long ago some drives with negative thrust for weird effects, I wonder if you could use something like that.

[EDIT]
What about a device on the ship with an OnUpdate event that constantly apply some thrust to slow down the ship ? That might work well.
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

The resolution (once every 30 ticks) of OnUpdate would cause a non-smooth effect. (which is a shame).

~Pixelfck
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

digdug wrote:For missiles, what about using accelerationFactor ? A number slightly less than 100 should give a nice mild friction effect.
Missiles simply go progressively slower. Not useful when (smart) missile has its own propulsion to maintain speed despite friction.
pixelfck wrote:The resolution (once every 30 ticks) of OnUpdate would cause a non-smooth effect. (which is a shame).
dragFactor used in nebula works exactly like this. At dragFactor="73", ship speed gets reduced to 73% each second.

Also, dragFactor does not seem to apply to missiles, only ships.

What I need friction for is to emulate friction in classic arcade games that slow the playership if not thrusting. In Star Castle (which I try to remake in a Transcendence mod), this is very important because mines eventually fly as fast as the playership and the player must thrust constantly or die.

I found out that space environment can have map color defined, and "0x07 0x03 0x0f" blends in with the [M]ap background color, if the width is small enough.

EDIT: I want to avoid tampering with object velocity directly, in case of side effects; but I might try it, given what is available. In the Star Castle Arcade adventure, I already have a recurring event that runs every tick. I need it to check boundaries and wraparound as needed.

EDIT #2: I added (objSetVel gPlayerShip (sysVectorDivide (sysVectorMultiply (objGetVel gPlayerShip) 99) 100)) within my event for friction. Called thirty times per second, this is roughly equivalent to dragFactor="74". Works even better than dragFactor. (No need to add a space environment and suffer its artifacts.)
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!

Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

EDIT #2: I added (objSetVel gPlayerShip (sysVectorDivide (sysVectorMultiply (objGetVel gPlayerShip) 99) 100)) within my event for friction. Called thirty times per second, this is roughly equivalent to dragFactor="74". Works even better than dragFactor. (No need to add a space environment and suffer its artifacts.)
Nice !

Can we do that with every moving spaceObj in the system, :shock: basically simulating dragFactor at system scale ? Or would the game slow down to a crawl ? :P
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

If used on missiles, they will slow down and stop. It is only useful on ships.

I would not (want to) use friction per tick in normal Transcendence - probably too many objects.

The Star Castle Arcade adventure has very few objects, if the energy rings are excluded.
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!

Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
Post Reply