HEY YAN

HEY YAN

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

HEY YAN

Post by smoth »

turnRadius = 0,
maxRudder = 5,

figured this would get your attention.


This might give you what you have been wanting.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: HEY YAN

Post by Gota »

now tell your fighter to attack an llt and report back.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: HEY YAN

Post by smoth »

here is a video...

you can figure out the rest right?

http://www.smoth.net/home/spring/hurfIareaplane.SWF
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: HEY YAN

Post by smoth »

turnRadius = 100,
maxRudder = 0.5,
maxBank = 1,
maxElevator = 0.05,
maxAileron = 0.05,
myGravity = 0.2,

will give you a ridiculous aircraft

have fun.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: HEY YAN

Post by Gota »

I didn't just ask you to make it attack an llt.
I tried all of this ages ago..
This is not the problem.
The problem is the fact they will not do flybys now..
Tell it to attack a static ground target and watch what happens.
Coresair
Posts: 279
Joined: 30 Dec 2009, 01:17

Re: HEY YAN

Post by Coresair »

Why fly when you can spin atop your enemies!
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: HEY YAN

Post by smoth »

Code: Select all

-- UNITDEF -- TORIARES --
--------------------------------------------------------------------------------

local unitName = "toriares"

--------------------------------------------------------------------------------

local unitDef = {
  acceleration       = 20,
  altfromsealevel    = "1",
  bankscale          = "3",
  bmcode             = "1",
  brakeRate          = 1,
  buildCostEnergy    = 0,
  buildCostMetal     = 0,
  builder            = false,
  buildTime          = 30,
  canAttack          = true,
  canFly             = true,
  canGuard           = true,
  canMove            = true,
  canPatrol          = true,
  canstop            = "1",
  category           = "AIR PITIFUL",
  collide            = false,
  cruiseAlt          = 400,
  defaultmissiontype = "VTOL_standby",
  description        = "Very Light attack aircraft (builds 5)",
  explodeAs          = "SMALL_UNITEX",
  firestandorders    = "1",
  footprintX         = 1.5,
  footprintZ         = 2,
  iconType           = "fed",
  idleAutoHeal       = 0,
  maneuverleashlength = "1000",
  maxDamage          = 200,
  maxSlope           = 150.00,
  maxVelocity        = 9,
  maxWaterDepth      = 0,
  minCloakDistance   = 68,
  mobilestandorders  = "1",
  name               = "toriares",
  objectName         = "units/toriaresu.s3o",
  pitchscale         = "1",
  power              = 4,
  reclaimable        = false,
  selfDestructAs     = "SMALL_UNITEX",
  shootme            = "1",
  side               = "renpou",
  sightDistance      = 675.00,
  standingfireorder  = "2",
  standingmoveorder  = "1",
  steeringmode       = "1",
  TEDClass           = "VTOL",
  threed             = "1",
  transportByEnemy   = false,
  turnRate           = 500,
  
	turnRadius		= 200, 
	maxRudder		= 0.01,
	maxBank			= 0.95,
	maxPitch		= 90,
	maxElevator		= 0.09,
	maxAileron		= 0.08,
	myGravity		= 0.2,
	
	Drag			= 0,
	WingDrag		= 0,
	
  unitname           = "toriares",
  unitnumber         = "426",
  version            = "1",
  zbuffer            = "1",
  customparams = {
  	factionname		   = "federation",
    loosesquad = "1",
    squadMember1       = "toriares",
    squadMember2       = "toriares",
    squadMember3       = "toriares",
    squadMember4       = "toriares",
    costrefined      = "50",
  },
  sfxtypes = {
    explosiongenerators = {
      "custom:jetflash",
    },
  },
  sounds = {
    canceldestruct     = "cancel2",
    underattack        = "warning1",
    arrived = {
      "hoverstop",
    },
    cant = {
      "cantdo4",
    },
    count = {
      "count5",
      "count4",
      "count3",
      "count2",
      "count1",
      "count0",
    },
    ok = {
      "hover",
    },
    select = {
      "hoverstart",
    },
  },
  weapons = {
    [1]  = {
      name               = "DOPPER",
    },
  },
}


--------------------------------------------------------------------------------

return lowerkeys({ [unitName] = unitDef })

--------------------------------------------------------------------------------

This is the closest I can get with the current tags. We need some kind of tag to determine the time an aircraft will spend going away after passing over a target. beyond playing around with yan's want for ota fighter dancing such a tag would be useful. As certain aircraft weapons would require a certain distance from a target before firing. For example, this same aircraft with a fuel bomb would fly back into it's own explosion.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: HEY YAN

Post by Gota »

Such a tag exists...its called turnradius..
unfortunately it prevents you from conveniently controlling the movement of your plane since the plane will not respond to move commands issues at a distance less than the turnradius value.

the solution might be splitting this tag into how it operates when the unit is given an attack command and a move command.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: HEY YAN

Post by smoth »

no
turn radius determines the size of the turn when the aircraft is correcting it's path.

We need something like attack distance or something else...

as in the distance before the aircraft CAN try to turn when the ai controls it..
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: HEY YAN

Post by Saktoth »

When i test those variables the planes get caught in the most ridiculous, uncontrollable tailspins.

This always happens when i mess with these variables
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: HEY YAN

Post by Neddie »

Well, really, applying those tags requires first a solid grasp of flight mechanics, and second, the willingness to throw all that out the window and embrace the extremely cool but completely insane advanced flight variables here. Oh, and a lot of testing. I've been there, Sak, you are not alone. As I mentioned to #peet, Fang once had aircraft that would zoom off the map at ever increasing speed, never to return again - I think he referred to the phenomenon as "inverse friction". Those tags were responsible.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: HEY YAN

Post by Gota »

There are certain acceptable ratios and certain ratios that cause crazy uncontrollable behavior...
Small incremental changes and patience..

@smoth.
turnradius="hint to the ai about how large turn radius this plane needs "

As you can see it does not set the turn radius..It cheats the ai into thinking the airplane needs more space to turn even when it doesn't.
This means the plane will keep flying longer before it turns which is what you want.
The only issue is the plane becomes hard to control because if you give the plane a move order behind it,which is inside the turnradius,it will keep flying until the specified target is outside the turnradius value and not turn at the exact moment you tell it to.
controlling the plane like this is frustrating(you can cheat this system by giving a move order that is outside the turnradius thereby cheating it into actually turning immidietly and arriving at the spot you want).
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: HEY YAN

Post by smoth »

yan, the turn radius var is for TURNING.

What I am saying is we need two vars.

one for turn radius

one for when the ai knows it is a safe distance to start a turn
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: HEY YAN

Post by Gota »

Wau...it has no influence on the turning of the plane..just test Smoth...just test.
Turnradius controls the distance after which the plane will turn back to its target.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: HEY YAN

Post by smoth »

I did. Turn radius is just that. the size of the the radius of the TURNING circle.

Image

As in the aircraft has to travel this distance to make it's turn work.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: HEY YAN

Post by CarRepairer »

Gunship (but not fighter):
* Hovers in one spot when stopped while it has idlemode = fly.
* When given a move order, flies in a straight line from where it is to that spot.

Attacking Fighter (but not gunship)
* Flies toward and past its target as it shoots, then turns around and repeats.


Desired:

A flying unit that behaves like a fighter when given attack orders, but behaves like a gunship when not attacking.


I hope this is as clear and concise as can be. lurker is adding a SetTurnRadius() function that will allow a gadget to achieve this behavior.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: HEY YAN

Post by Gota »

smoth wrote:I did. Turn radius is just that. the size of the the radius of the TURNING circle.

Image

As in the aircraft has to travel this distance to make it's turn work.
Yes thats what the ai thinks but it has no real influence on the plane's actual ability to turn...if the plane's parameters make it agile and able to turn real fast but its turn radius is big it will just act as the distance after which the plane will turn back.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: HEY YAN

Post by smoth »

so if it had a tag to tell it the distance before turning, having a small turning radius would work.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: HEY YAN

Post by Warlord Zsinj »

air flight tags are voodoo and are best handled by a shaman
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: HEY YAN

Post by Gota »

CarRepairer wrote:Gunship (but not fighter):
* Hovers in one spot when stopped while it has idlemode = fly.
* When given a move order, flies in a straight line from where it is to that spot.

Attacking Fighter (but not gunship)
* Flies toward and past its target as it shoots, then turns around and repeats.


Desired:

A flying unit that behaves like a fighter when given attack orders, but behaves like a gunship when not attacking.


I hope this is as clear and concise as can be. lurker is adding a SetTurnRadius() function that will allow a gadget to achieve this behavior.
As i understand it,it has already been added and I guess were just waiting for the Spring release....
Post Reply

Return to “Game Development”