5411 Posts in 183 Topics- by 107 Members - Latest Member: Mik1

Pages: [1] 2 3 ... 10
 1 
 on: Today at 04:22:38 am 
Started by Slinger - Last post by Mac
-tries it.-

doesn't work ... the car just flips over, can't get the front wheels to stay down.

I lowered it from 160000 to 100000 and it stopped trying to flip over but it still doesn't go much faster than the default car. I got a huge run-up to the sandbox and it still didn't go that fast - the car should have been able to reach 250mph and I don't think it got much beyond 100-120 ...

maybe changing it back and having both as separate things to test with would be good. I can't work the current one out. it seems that 1 in the equation helped the car accelerate. Tongue

I still think the wheels need the rotation limit put back (separate ground and air rotation speeds) as it somewhat helps with car stability (since the front wheels have less contact with the ground, a lower air rotation limit made them spin less, improving grip to an extent. Tongue having a separate ground rotation limit would limit the maximum wheel rotation (so the game can't crash from very high wheel rotation ... Tongue)

 2 
 on: Today at 04:13:49 am 
Started by Slinger - Last post by Slinger
So any 3d model will automatically be loaded, and then be accessible as a global variable (or at least in the specific script)?
That sounds quite like a solution! Smiley

Ok, so what about this:
a (custom) file called load.lst accompanying the script.lua, containing something like:
Code:
#load this 3d model into the temporary trimesh
trimesh "box.obj"
#generate a rendering trimesh from the tmp one, and give it a name for the script
trimesh_3d boxmodel

#load another model
trimesh "box_broken.obj"
#generate a model from it, and give it a name
trimesh_3d brokenboxmodel
RCX would process the load.obj before the script (and then remove the tmp trimesh). the script can then access the models throughout the race using their specified names (boxmodel and brokenboxmodel).

?

 3 
 on: Today at 04:10:18 am 
Started by Demy - Last post by Mac
That was my idea ... using capsules/cylinders or other appropriately shaped objects for tunnels - not just boxes (technically can use the geoms a la geoms.lst for it)

Slinger, don't get too carried away with wanting to use heightmaps for rendering water Tongue not a lot of games actual render "moving" water (GTA4 is the only game I've played that has a dynamic water surface) ... all other games just use some sort of bumpmap to distort a reflection on the water surface to give the illusion of waves. (render-to-texture? not sure)

it depends how difficult it would be CPU-wise to simulate moving water surface. since GTA4 can do it I guess it might not be -that- hard.


Also ... "air geoms" could be used beneath a plane, right? it depends what turns out to be better performance-wise ... a concentrated area of water around the world (maybe extending just beyond the view distance + any possible distance the car can travel in the world) or a plane. A plane extends to infinity doesn't it? having something that big having a simulated surface may bog down the system ...
but it may not, I don't know, as we don't need to actually -render- the water surface moving about after a set distance (have it static) ... Tongue

Quote
There one more problem from the track designers point of view: how to specify the surface? (lets just assume I've got a way of generating a heighfields as long as the shape can be described) Since the surface probably won't be a perfect box or sphere, how to specify this? perhaps a black/white picture? that's the only solution I can come up with as of now... Undecided


back on the topic of shadows: I guess the most important shadows are those on the ground geom(s). But some simple shadows should still be generated on smaller geoms from weapons and objects adn cars (although I'll probably wait with geoms casting shadows on themselves for later Wink)

I only understand how heightfields work a little from that demo you sent me a while ago ... so would it not be something like you suggested? a small black+white image? black pixels in the image would represent where on the heightmap the surface moves? (like the point where surrounding faces of a trimesh will meet) or is it something else?


and so long as the car (and wheels) cast a shadow on the ground, I don't care. Tongue

 4 
 on: Today at 04:07:27 am 
Started by Slinger - Last post by Slinger
Quote
Yup. That shouldn't be happening (it didn't beforehand)
Ok, I'll search for the error. Should be something simple like a + instead of - or similar.

Quote
Really? because whenever I've tried to force the surface option in the geoms.lst file, it's crashed unless I changed spring from infinity to something a lot lower. :/
Odd... by infinity I mean actually writing "inf" or "infinity" (case doesn't matter) instead of a number. Could you give an example? (and how does it crash, segfault or ode error?)

Quote
Also if bounce is 0, then why is the funbox bouncing? the inner box on that has a very bouncy surface right? but either way the calculation would still be (0*box) which is 0? or is it addition not multiplication?

I just wanted to be certain what the 'default' values were so I know what I'm doing. I'll raid for that formula you've posted like five times already and use it to calculate the spring+damping values that match my previous cfm+erp settings (erp 0.7 cfm 0.1 ... simple ironically)
I've changed the bounce calculation to be bounce1+bounce2 so only one of the objects needs a bounce value (and of both have it, there'll ba a lot of bounce).


Quote
calculate the spring+damping values that match my previous cfm+erp settings (erp 0.7 cfm 0.1 ... simple ironically)
If you happen to have a stepsize (and multiplier if not 1), I can calculate them for you.



As for the gearing: I'm not sure about keeping the current solution (I might restore the original meaning of gear_tweak and just add another value for what it currently does).

But if you used to use 160 for power and 0.001 for tweak, I'd say (I hope I'm right):
power = 160000
tweak = 1000

 5 
 on: Today at 04:05:47 am 
Started by Slinger - Last post by Codie Morgan

 if i put this in a file named  Hgn_MyAssaultFrigate.ship (lua)  - it gains an object name in game as HGN_MYASSAULT_RIGATE

 - a 3D model relating to this would have the same name HGN_MAYASSAULTFRIGAT.shp / HGN_MAYASSAULTFRIGAT.obj

 6 
 on: Today at 03:57:41 am 
Started by Slinger - Last post by Slinger
interesting. Shocked oh, btw: where is the 3d model for the ship specified?

 7 
 on: Today at 03:56:10 am 
Started by Slinger - Last post by Mac
Quote
I guess you mean the wheels are spinning up a bit just when they're supposed to come to halt?
Yup. That shouldn't be happening (it didn't beforehand)

Quote
Bounce should be 0. spring should be infinity and damping 0 which makes the collision system use the erp+cfm values from internal instead (does this if spring=inf wihch means a completely hard surface).
As for the wheel hinges: they are joints just like all other joints, so they should be affected. But if the actual suspension force is affected (is it?), then there's some error somewhere...
Really? because whenever I've tried to force the surface option in the geoms.lst file, it's crashed unless I changed spring from infinity to something a lot lower. :/

Also if bounce is 0, then why is the funbox bouncing? the inner box on that has a very bouncy surface right? but either way the calculation would still be (0*box) which is 0? or is it addition not multiplication?

I just wanted to be certain what the 'default' values were so I know what I'm doing. I'll raid for that formula you've posted like five times already and use it to calculate the spring+damping values that match my previous cfm+erp settings (erp 0.7 cfm 0.1 ... simple ironically)

I need to do this for the suspension too.

Speaking of the suspension ... well, making the suspension joints soft is going to mess with the forces applicable through them ... but I don't think it's changing the actual amount of suspension forces. Softer things always absorb more energy than hard things, right? Tongue


Anyway ... as for the motor torque and gearing ... what would make the torque decrease less as speed increases? A lower value (as beforehand) or a higher value? I'm just confused now about how different it works from what you said.

Because I always used to set the gear tweak to 0. Tongue also the default motor and gearing for my car is 160 and 0 (make that 0.001 as I said) so ... I guess changing it to 640 would give it the same amount of power as it did beforehand? or maybe 480? :/

edit

I tried a bunch of different configurations and all that was different was the amount of wheelspin I got when the car was at a standstill ... I can't seem to get the car to go beyond a certain speed.

 8 
 on: Today at 03:55:52 am 
Started by Slinger - Last post by Codie Morgan
importantly:

 how a ship is created using LUA in HW2
Quote
NewShipType = StartShipConfig()
NewShipType.displayedName = "Resolution M.4 FA"
NewShipType.sobDescription = "Close Assault Frigate"
NewShipType.maxhealth=750000
NewShipType.regentime=450
NewShipType.minRegenTime=450
NewShipType.frontArmourDamage=0.65
NewShipType.sideArmourDamage=1
NewShipType.rearArmourDamage=2
NewShipType.isTransferable = 1
NewShipType.useEngagementRanges = 1
NewShipType.unitCapsNumber = 2
NewShipType.SquadronSize = 1
NewShipType.passiveFormation = "Spear"
NewShipType.defensiveFormation = "x"
NewShipType.aggressiveFormation = "Claw"
NewShipType.mass = 140
NewShipType.collisionMultiplier = 1
NewShipType.thrusterMaxSpeed=150
NewShipType.mainEngineMaxSpeed=300
NewShipType.rotationMaxSpeed=33
NewShipType.thrusterAccelTime=6
NewShipType.thrusterBrakeTime=6
NewShipType.mainEngineAccelTime=8
NewShipType.mainEngineBrakeTime=8
NewShipType.rotationAccelTime=4
NewShipType.rotationBrakeTime=2
NewShipType.thrusterUsage=1
NewShipType.accelerationAngle=40
NewShipType.mirrorAngle=30
NewShipType.secondaryTurnAngle=0
NewShipType.maxBankingAmount=80
NewShipType.descendPitch=90
NewShipType.goalReachEpsilon=3000
NewShipType.slideMoveRange=100
NewShipType.controllerType = "Ship"
NewShipType.tumbleStaticX = 10
NewShipType.tumbleStaticY = 20
NewShipType.tumbleStaticZ = 5
NewShipType.tumbleDynamicX = 2
NewShipType.tumbleDynamicY = 10
NewShipType.tumbleDynamicZ = 5
NewShipType.tumbleSpecialDynamicX = 2
NewShipType.tumbleSpecialDynamicY = 10
NewShipType.tumbleSpecialDynamicZ = 5
NewShipType.relativeMoveFactor = 3
NewShipType.swayUpdateTime = 4
NewShipType.swayOffsetRandomX = 10
NewShipType.swayOffsetRandomY = 10
NewShipType.swayOffsetRandomZ = 10
NewShipType.swayBobbingFactor = 0.1
NewShipType.swayRotateFactor = 0
NewShipType.useTargetRandom = 1
NewShipType.targetRandomPointXMin = -0.5
NewShipType.targetRandomPointXMax = 0.5
NewShipType.targetRandomPointYMin = -0.65
NewShipType.targetRandomPointYMax = 0.45
NewShipType.targetRandomPointZMin = -0.9
NewShipType.targetRandomPointZMax = 0.6
NewShipType.dustCloudDamageTime = 0
NewShipType.nebulaDamageTime = 0
NewShipType.MinimalFamilyToFindPathAround = "MotherShip"
NewShipType.mirrorAboveManeuver = "ImmelMann"
NewShipType.mirrorBelowManeuver = "Split_S"
NewShipType.BuildFamily = "Frigate_Hgn"
NewShipType.AttackFamily = "Capturer"
NewShipType.DockFamily = "Frigate"
NewShipType.AvoidanceFamily = "Frigate"
NewShipType.DisplayFamily = "Frigate"
NewShipType.AutoFormationFamily = "Frigate"
NewShipType.CollisionFamily = "Big"
NewShipType.ArmourFamily = "Composite"
NewShipType.UnitCapsFamily = "Frigate"
NewShipType.UnitCapsShipType = "CaptureFrigate"
NewShipType.fighterValue = 0
NewShipType.corvetteValue = 0
NewShipType.frigateValue = 10
NewShipType.neutralValue = 0
NewShipType.antiFighterValue = 0
NewShipType.antiCorvetteValue = 0
NewShipType.antiFrigateValue = 5
NewShipType.totalValue = 10
NewShipType.buildCost = 1200
NewShipType.buildTime = 65
NewShipType.buildPriorityOrder = 30
NewShipType.retaliationRange=20000
NewShipType.retaliationDistanceFromGoal=160
NewShipType.visualRange=1000
NewShipType.prmSensorRange=15000
NewShipType.secSensorRange=15000
NewShipType.detectionStrength = 1
NewShipType.TOIcon = "Diamond"
NewShipType.TOScale = 1
NewShipType.TODistanceFade0 = 9000
NewShipType.TODistanceDisappear0 = 7000
NewShipType.TODistanceFade1 = 4500
NewShipType.TODistanceDisappear1 = 3500
NewShipType.TODistanceFade2 = 12000
NewShipType.TODistanceDisappear2 = 35000
NewShipType.TOGroupScale = 1
NewShipType.TOGroupMergeSize = 0
NewShipType.mouseOverMinFadeSize = 0.045
NewShipType.mouseOverMaxFadeSize = 0.1
NewShipType.healthBarStyle = 1
NewShipType.nlips = 0.0001
NewShipType.nlipsRange = 6000
NewShipType.nlipsFar = 0.0001
NewShipType.nlipsFarRange = 10000
NewShipType.SMRepresentation = "HardDot"
NewShipType.meshRenderLimit = 13000
NewShipType.dotRenderLimit = 10
NewShipType.visibleInSecondary = 1
NewShipType.minLOD = 0.25
NewShipType.goblinsStartFade = 1500
NewShipType.goblinsOff = 1500
NewShipType.upLOD = 2000
NewShipType.upLOD = 2500
NewShipType.downLOD = 2015
NewShipType.downLOD = 2515
NewShipType.minimumZoomFactor = 0.5
NewShipType.selectionLimit = 150000
NewShipType.preciseATILimit = 0
NewShipType.selectionPriority = 75
NewShipType.militaryUnit = 1
addAbility(NewShipType,"MoveCommand",1,0)
addAbility(NewShipType,"CanDock",1,0)
NewShipType.dockTimeBetweenTwoFormations = 1
NewShipType.dockTimeBeforeStart = 2
NewShipType.dockNrOfShipsInDockFormation = 1
NewShipType.dockFormation = "delta"
NewShipType.queueFormation = "dockline"
NewShipType.dontDockWithOtherRaceShips = 1
NewShipType.ignoreRaceWhenDocking = 0
addAbility(NewShipType,"CanLaunch")
NewShipType.launchTimeBetweenTwoFormations = 1
NewShipType.launchTimeBeforeStart = 2
NewShipType.launchNrOfShipsInDockFormation = 1
NewShipType.launchFormation = "delta"
addAbility(NewShipType,"ParadeCommand",1)
addAbility(NewShipType,"WaypointMove")
addAbility(NewShipType,"CaptureCommand",1,-50)
addAbility(NewShipType,"HyperSpaceCommand",1,1,200,500,0,3)
addAbility(NewShipType,"CanAttack",1,1,0,1,0.35,1.5,"Mothership, BigCapitalShip, SmallCapitalShip, Capturer, Frigate, Utility","Frontal",{
SubSystem = "FrontalVsSubSystem",
},{
Frigate = "fthcirclestrafe",
},{
Corvette = "fthcirclestrafe",
},{
Fighter = "fthcirclestrafe",
})
addAbility(NewShipType,"GuardCommand",1,1,600)
addAbility(NewShipType,"HyperspaceViaGateCommand",1,3,1,0.3)
addAbility(NewShipType,"CanBeCaptured",45,1)
addAbility(NewShipType,"CanBeRepaired")
addAbility(NewShipType,"RetireAbility",1,1)
LoadModel(NewShipType,1)
addAbility(NewShipType,"MinelayerAbility",1,3.5)
addAbility(NewShipType,"DefenseFieldAbility",0,0,1000,4000,4000,-1,0.1,0.6,"none")
StartShipWeaponConfig(NewShipType,"hgn_MRAC100-360","Weapon_TurretTop","")
StartShipWeaponConfig(NewShipType,"sm2er-2","Weapon_AMHDFront","")
StartShipWeaponConfig(NewShipType,"hgn_nucleardrone-srx1","HVML","")
StartShipWeaponConfig(NewShipType,"hgn_nucleardrone-srx1","HVMR","")

StartShipWeaponConfig(NewShipType,"PLSR-1GW-360","AC35L","")
StartShipWeaponConfig(NewShipType,"PLSR-1GW-360","AC35R","")
StartShipWeaponConfig(NewShipType,"PLSR-1GW-360","AC35F","")
StartShipWeaponConfig(NewShipType,"PLSR-1GW-AMS360","AC35L","")
StartShipWeaponConfig(NewShipType,"PLSR-1GW-AMS360","AC35R","")
StartShipWeaponConfig(NewShipType,"PLSR-1GW-AMS360","AC35F","")

StartShipWeaponConfig(NewShipType,"PLSR-2GW-fixed","AsWL","")
StartShipWeaponConfig(NewShipType,"PLSR-2GW-fixed","AsWR","")

addShield(NewShipType,"EMP",400,5)

StartShipHardPointConfig(NewShipType,"Weapon Front","HardpointWeaponFront","Weapon","Generic","Damageable","hgnws_3xAC275fixed")

StartShipHardPointConfig(NewShipType,"aswl3","HVRL","Weapon","Generic","Destroyable","hgnws_2xAC100-M2")
StartShipHardPointConfig(NewShipType,"aswl4","HVRR","Weapon","Generic","Destroyable","hgnws_2xAC100-M2")
NewShipType.battleScarMaxTriBase = 75
NewShipType.battleScarMaxTriInc = 100
NewShipType.sobDieTime = 1
NewShipType.sobSpecialDieTime = 1
NewShipType.specialDeathSpeed = 40
NewShipType.chanceOfSpecialDeath = 0
NewShipType.deadSobFadeTime = 0
NewShipType.trailLinger = 4
setEngineBurn(NewShipType,6,1,1.5,60,1.01,0.1,0.25,120)
setEngineGlow(NewShipType,1,1,1.02,20,300,50,1.5,{
0.27,
0.47,
0.69,
0.25,
})
loadShipPatchList(NewShipType,"data:sound/sfx/ship/Hiigaran/Frigate/",0,"Engines/HFrigateEng","",1,"Ambience/HFrigateAmb","")

 9 
 on: Today at 03:55:19 am 
Started by Slinger - Last post by Slinger
It seems we will have multiple ways of creating objects ingame:

 -- track editor ( internal one )

 -- track editor ( the .net concept ( outputtig object.lsts along with track data )

 -- objects.lst

 -- lua
Actually, no. Lets look at what each one does:

track editor: will just generate static geoms added to the single track object
geoms.lst: specified obj files to use for more static geoms for the track object

object.lst: specifies all object to be added to the track (before start of race)
lua: each object in object.lst will be the path to a directory containing a lua script specifying how to build the object
loadthis.lst: a file in the object file containing a list of files to load (in case it's not possible to do this in lua).

 10 
 on: Today at 03:50:20 am 
Started by Slinger - Last post by Slinger
(noticed you have posted while I was writing, will read it through)

I have no experience with lua, that's why I'm asking so many questions about it (and assumes you'll answer them Grin)...

My idea of how the scripts should work was developed before I even started coding 0.04, but I've discovered it's quite similar to classes (at least in c++). The idea is that the "class" (which I'll use instead of "script" below) should have:

list of things to load at start: not used during the race
   perhaps a separate text file?

static variables: available to all functions of all instantiations of the class
   will contain the loaded data (like 3d models)

dynamic variables: exists independently for each instantiated object
   will make each instantiation unique from the other

constructor (spawn): static function called by rcx every time an instance of the object should be created (together with a new namespace for this instance)
   uses rcx function library to create bodies, geoms, joints and spaces. and the static variables to quickly specify 3d models and textures to use for rendering, and trimeshes for collision detection and similar

custom dynamic functions: can read the static variables, and read/write to the namespace reserved for this instance
   registered by the constructor to be executed on different events


Just to clarify: the current objects are complete rubbish - they have no complex construction, barely any event responses. My idea for what the scripting should do is make it possible to finally use the features of rcx.

I'm planing to add stuff like wormholes and moving-ragdolls using this, not just static geoms following paths... So imagine we got a pedestrian object: it takes 10s to load all textures and models, and it can break down gradually. So everything should be loaded at start to prevent rcx from freezing, and it's not that easy to just clone a pedestrian (because the newly created one should have full health buffers and no broken parts).

Pages: [1] 2 3 ... 10