Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Test Builds => Topic started by: Wanderer on July 25, 2008, 08:52:21 am

Title: Wanderer 080727 or r4722 build
Post by: Wanderer on July 25, 2008, 08:52:21 am
So here is new build from my branch. It has been merged with the trunk and should contain all the fixes and features from the trunk (like normal mapping) as well as a fix for the temporarily broken radar images for the 3D radar (2D has worked all the time). Both release and debug builds are included.

fs2_open_3_6_9_W4722.zip (http://koti.mbnet.fi/vekkup/FS2/Arkisto/fs2_open_3_6_9_W4722.zip)


For list of features as well as information on how to use them, see http://www.hard-light.net/forums/index.php/topic,54465.0.html

Also read this post as why something like this should be tested... http://www.hard-light.net/forums/index.php/topic,54465.msg1112895.html#msg1112895


EDIT: Fixed a bug (caused by code which was duplicated during merging of branches)... Now salvo turrets should work again.
Title: Re: Wanderer 080725 or r4719 build
Post by: DaBrain on July 26, 2008, 09:46:59 am
Nice, I'll test some stuff. :)

Looks like this is the build with the most features included atm.
Title: Re: Wanderer 080727 or r4722 build
Post by: Shade on July 27, 2008, 01:49:15 pm
3D radar images seem to be working fine now.
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 19, 2008, 08:59:34 am
ok, I will try this one out.
I have been making custom radar images for each ship. will post soon.
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 19, 2008, 12:06:48 pm
umm, I can't get the radar bitmaps to work on this one.
do they need to be .dds? does the game scale them or do they display at the resolution of the bitmap?
if they do then there might be a problem. all dds's need to be power of 2, so how can you get the scaling right?
anyway, like I said, I can't get them to work on this build.
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 19, 2008, 01:06:02 pm
ok, now I can get 3d radar to work but not 2d. debug build crashes on 2d saying something about variable "tmp".
here are the tbm and tga I have been using.

[attachment deleted by admin]
Title: Re: Wanderer 080727 or r4722 build
Post by: Vertigo 7 on August 19, 2008, 01:07:44 pm
where do these flags get put in? like... in which table or on the turret data on the model itself?
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 19, 2008, 01:09:43 pm
the ship table or object_types depending on which flag. goto the other thread and it should tell you.
Title: Re: Wanderer 080727 or r4722 build
Post by: Vertigo 7 on August 19, 2008, 01:14:59 pm
it doesn't specify =/ good descriptions on what they do but not where to put them really... i'm mostly interested in the turret stuffs more than the other features.
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 19, 2008, 01:18:21 pm
what kinda turret features? the ai bomber thing? that goes in object_types.tbl. the other stuff are subsystem flags in ships.tbl.
Title: Re: Wanderer 080727 or r4722 build
Post by: Vertigo 7 on August 19, 2008, 01:21:41 pm
the "fire on target" and "reset when idle"... the rest are pretty self explanatory
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 19, 2008, 01:25:08 pm
those go in ships.tbl. goto the ship you want to change and then the turret and put the flag in the"()".
Title: Re: Wanderer 080727 or r4722 build
Post by: Wanderer on August 19, 2008, 01:26:41 pm
Did it provide anything else about the tmp variable? Something? Anything?


Turret stuff goes to the individual turret entries.

That is something like so
Code: [Select]
#Ship Classes

$Name:                  GTFR Triton
   +nocreate
$Subsystem:             turret01,1,1.0
   $Default PBanks:        ( "" )
   $Default SBanks:        ( "Tornado" )
   $Maximum Barrel Elevation:       45
   $Turret Base FOV:                300
   $Flags:                 ( "salvo mode" "fire on target" "reset when idle" )
$Subsystem:                     turret02,1,1.0
   $Default PBanks:        ( "AAAf" )
   $Default SBanks:        ( "Harpoon" )
   $Flags:                 ( "fixed firingpoints" "use multiple guns" "fire on target" "reset when idle" )

$Name:                  GTC Leviathan
   +nocreate
$Subsystem:             turret09a-01-main, 3, 9.0
   $Default SBanks:        (  "Cyclops" )
   $Flags:                 (  "reset when idle" )
   $animation:    triggered
   $type:         initial
   +relative_angle:        90,180,0

#End

Was for what fire on target does. It allows turret to fire only if the targetpoint it has is reasonably close to the point where the barrels are pointing at. Reset when idle returns turret to their initial position should the turret find itself without targets. So if you defined turrets to start at pointing towards front of the ship barrels levelled then if the turret shoots all the targets or they move beyond its FOV it will reset to that very same position after few seconds delay.
Title: Re: Wanderer 080727 or r4722 build
Post by: Vertigo 7 on August 19, 2008, 01:28:31 pm
no wonder i was getting thrown... my turret entries dont have any flags =p
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 19, 2008, 01:37:58 pm
"Run-time check failure #2 - stack around the variable "tmp" was corrupted".
and I also got a strange bug that made the intro go at a extremely low frame rate. can't reproduce it tho, it might have been my fault. I might have pressed "run" too many times.
Title: Re: Wanderer 080727 or r4722 build
Post by: Wanderer on August 19, 2008, 01:44:41 pm
hmm.. might be the tga files... you could try converting the tga files to dds or to 8 bit PCX format (make it greyscaled but save it as a normal)

Just a wild guess after reading this from the code
Quote
    // should never try to make an aabitmap out of a targa
    Assert(!(flags & BMP_AABITMAP));
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 19, 2008, 01:45:47 pm
pcx doesn't seem to work. will keep testing.
Title: Re: Wanderer 080727 or r4722 build
Post by: Wanderer on August 19, 2008, 01:50:25 pm
Well.. worked for me.. though the images appeared awfully dim.
Title: Re: Wanderer 080727 or r4722 build
Post by: Vertigo 7 on August 19, 2008, 02:01:55 pm
i r confused about something... the base FOV thing... I'm assuming that the FOV is relative.... so if thats the case, 0 degrees is dead ahead, with 180 being directly aft... so if i want to keep the turret from spinning around to shoots backwards, do i specify a max fov of like say 160? if i do would that also keep the turret from spinning past *200? or do i need to do that the other way around?

Edit:

the reason im confused about this is I used to be a weapon tech in the Navy... we call this a firing cut out. and we usually set 2 stop points out of a 360 degree circle to keep a gun from pointing at the ship =p
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 19, 2008, 02:04:07 pm
ok, dds works but pcx looks funky. I thought maybe it was because of the "black->alpha" thing so I tested it with a white image, got the same result both times.

[attachment deleted by admin]
Title: Re: Wanderer 080727 or r4722 build
Post by: Wanderer on August 19, 2008, 02:06:37 pm
Well it defines the turret fov as in degrees in total on both sides. So setting it to 300 allows turret to rotate 150 degs to left and 150 degs to right.

EDIT: I was in coastal artillery.. we had guns with real turrets (fov 360 degs :P)
Title: Re: Wanderer 080727 or r4722 build
Post by: Vertigo 7 on August 19, 2008, 02:12:31 pm
MK 86 5" ftw!

I started as a CIWS tech to begin with... R2-D2 with a hard on... 20mm rotating Gatling gun 5400 rounds/minute... love that system...

then i upgraded to a Tomahawk tech... i set Baghdad on fire =p
Title: Re: Wanderer 080727 or r4722 build
Post by: Vertigo 7 on August 19, 2008, 03:16:24 pm
yay i found a bug!

i mean... doh i found i bug  :nervous:

Code: [Select]
$Subsystem: Turret04a, 5.0, 3.0
$Default PBanks: ( "Heavy Ion Cannon" "Heavy Ion Cannon" )
$Maximum Barrel Elevation: 80
$Turret Base FOV: 320
$Flags: ( "use multiple guns" "fire on target" "reset when idle" )
$animation: triggered
$type: initial
+relative_angle: 270,180,0

this is an aft facing top side turret that should onry shoots at stuff behind the ship. Firstly, base FOV breaks it and lets it shoots at stuff thats infront of the ship. Secondly, when it resets, the turret barrels go to 0 instead of 180 (the base turns to 180 but the barrels move to 0... looks like a transformer  :lol: ). The fire on target works wonderfully well. I likes that a lot. I think the reset thing should be tweaked a bit tho... I'm not to particularly fond of it reseting between shots. IMO it should only reset when theres not a target in range or in FOV. I do like the reseting tho.


Edit: i'm also guessing that 1.6.9 doesnt support wide screen either, eh?

Edit agains:

i changed the turret angles to 90,180,0 and that fixed the transformer thing... but they are still shooting things infront of the ship
Title: Re: Wanderer 080727 or r4722 build
Post by: Wanderer on August 19, 2008, 03:37:40 pm
Sorta expected this one... First of all animation code has precious little to do with turret uvec and fvec. So if you have top deck turret its front points forward and guns by default straight up. To get the turret to shoot target exclusively behind the ship you would need to to set the actual fvec to point straight behind (and uvec straight up as well as these have to be defined together). The animation code thing is something i need to test to figure out what is going wrong with it. First thing that comes to mind is that the first value is way too high (usually from 0 to 90) http://www.hard-light.net/wiki/index.php/Animation_Code

Also the code allows for the animation code to force the barrels beyond the actual 'targeting limits'

As for the delay before reseting.. i could make that something that can be set via tables as well as the speed (as a multiplier) of the reset action.
Title: Re: Wanderer 080727 or r4722 build
Post by: Vertigo 7 on August 19, 2008, 03:44:46 pm
yeah i started looking at the anim code. it never gave me any issues before cuz 90 and 270 are the same deviation, just different directions to get to it. When i first made the table i was looking at it as a circle, not a total if that makes any sense. but anyways, thats fix0red... so the fvec and uvec, i know they go in the pof, is there a particular syntax i needa use?

edit:
almost forgot... i like the delay on the reset idea... tabled entries sounds good to me =D
Title: Re: Wanderer 080727 or r4722 build
Post by: Wanderer on August 19, 2008, 03:53:21 pm
hmm... There seems to be the list of the optional entries that can be placed to the properties field... i could pull the list from the code but not today (too tired)..
http://www.hard-light.net/forums/index.php/topic,54757.msg1119019.html#msg1119019
Title: Re: Wanderer 080727 or r4722 build
Post by: Vertigo 7 on August 19, 2008, 04:29:02 pm
ok i just wanna make sure im doing this right...

if i set a fvec of 0,0,1 for a top side turret, then by default the turret faces forward. if i set a fvec of 0,0,-1 then by default it faces aft, correct?

It looks like i need to table tweek to make this work right... if i use 0,0,1 for a top side aft turret, it still shoots at stuff in front of the ship but 0,0,-1 makes the turret barrels face at 0 with my base at 180, ergo transformers! so actually if im using 0,0,-1 then my relative angle should be 90,0,0 for my aft turrets and should allow the fov to work like its sposed ta?

Edit:

I don't think this is gonna work =/ setting fvec of 0,0,-1 for a top side aft facing turret does turn the turret base to face aft but the barrels stay in place so it looks all weird. they do turn like they are sposed to with the base FOV and fire in the proper direction but the barrels are folded over from the back side of the turret base instead of the front  :( :( :(
Title: Re: Wanderer 080727 or r4722 build
Post by: Wanderer on August 20, 2008, 12:16:55 am
Hmm..  :ick: yeah.. forgot to mention that.  :doubt: That if i understood your problem correctly. Basically the fvec and uvec are not resetting the turrets facing. They are redefining what game considers to be turrets front and up side. So you need to make the turret model (in some modeling proggie, i think pcs2 can't do that - yet anyhow) face the direction you want to get the fvec to point to.
Title: Re: Wanderer 080727 or r4722 build
Post by: Vertigo 7 on August 20, 2008, 12:28:41 am
yeah, i decided id try to flip the turrets around in TS. worked like a charm =D
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 21, 2008, 12:57:27 pm
I noticed that the radar tends to stretch the images. why? to what?
I can't tell if it stretches them to a square or to a power of two. is this what is supposed to happen?
Title: Re: Wanderer 080727 or r4722 build
Post by: Wanderer on August 21, 2008, 01:17:05 pm
Well.. i tested in using square dds textures (as compressed dds files generally are). Didn't even thought there would be any other still in use :P

I'll take a look at it though, 2D or 3D or both?
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 21, 2008, 01:22:51 pm
well, most of my tests are with 3d. so I would need to check if it has the same problem in 2d.
if you want I can go test now and come back in 15 min?
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 21, 2008, 01:35:13 pm
3d only. I have attached two .dds's, one stretches, the other, does not.

[attachment deleted by admin]
Title: Re: Wanderer 080727 or r4722 build
Post by: Cobra on August 21, 2008, 06:59:17 pm
Where can I get the radar icons? Can't seem to find them in your last build's thread.
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 21, 2008, 07:18:23 pm
I am working on those. they still aren't done. If you want to can help me with testing :nod:.
Title: Re: Wanderer 080727 or r4722 build
Post by: Cobra on August 21, 2008, 07:23:56 pm
Sure why not? :P
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 21, 2008, 07:49:36 pm
ok, well, we need to wait until the stretching bug is fixed first to start testing.
if you want to help with making the radar blips, then you could start by extracting the last frames (the brighter ones) of the briefing anis of the vasudan ships (don't extract the ones from the "fade icons"). I already have the Terran ones done.
EDIT: tis goes for anyone who wants to help. oh, and don't do the fighters or the bombers.
Title: Re: Wanderer 080727 or r4722 build
Post by: Cobra on August 21, 2008, 08:05:14 pm
Erh, I don't even know how they're supposed to be done, besides save them in DXT5.
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 21, 2008, 08:21:07 pm
just extract the last frame from briefing anis that are in sparky.vp.
Title: Re: Wanderer 080727 or r4722 build
Post by: chief1983 on August 22, 2008, 10:12:18 am
Didn't someone already make a pack that did the same thing?
Title: Re: Wanderer 080727 or r4722 build
Post by: Galemp on August 22, 2008, 10:33:33 am
Uh... yeah. I did. (http://pjfoliver.googlepages.com/radaricons2.zip)

(http://pjfoliver.googlepages.com/radaricons.gif)
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 22, 2008, 11:09:22 am
mine are much better. there is one for EVERY ship.
no offense or anything galemp.
Title: Re: Wanderer 080727 or r4722 build
Post by: Cobra on August 22, 2008, 11:19:27 am
I was looking for Galemp's pack but I couldn't find it. Thanks Galemp!
Title: Re: Wanderer 080727 or r4722 build
Post by: Galemp on August 22, 2008, 04:22:05 pm
mine are much better. there is one for EVERY ship.
no offense or anything galemp.

IMO that sort of defeats the purpose of having them as icons. They're supposed to be representational, not literal. Visual clarity (especially on a very small radar) is measured more by how much you can communicate with how little, and what you leave out is as important as what you include.

But that's my opinion, and that's why I have my icons and you have yours. :) I'm looking forward to seeing them even if I don't use them myself.
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 22, 2008, 04:43:40 pm
I planned mine to be representational as well but I figured that if the targeting system can identify the class of ship even if it is not in the fov, then so should the radar system.
that way you know it's a seraphim on your tail and not a dragon.
Title: Re: Wanderer 080727 or r4722 build
Post by: Galemp on August 22, 2008, 10:17:32 pm
bomber icon != fighter icon

But anyway, today on a whim I just tried out my icons with the 3D radar and... it looks godawful. But that's OK, since I only ever use the 2D radar.

If yours are optimized for 3D then we'll have a complete set. :)
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 23, 2008, 03:57:00 pm
yeah, they look good on 3d. I don't know if they are considered "optimized" thohg.
Title: Re: Wanderer 080727 or r4722 build
Post by: Topgun on August 25, 2008, 11:25:11 am
*ahem* (http://www.hard-light.net/forums/index.php/topic,56035.0.html)
Title: Re: Wanderer 080727 or r4722 build
Post by: Galemp on October 10, 2008, 01:46:44 pm
Bumping this thread because WMC has to look at something!

Can I make a request? Non-stealthy sensor-masked ships (the fuzzy radar blips,) particularly fighters, are sometimes used as event triggers or music cues in some missions, specifically in Awakenings and ST:R. This wasn't a problem before as the fuzzy blip was usually placed so as to be obscured, but with radar icons they're a LOT more noticeable.

I'd like to request that sensor-masked ships have an override that they display no radar icons. If you have the time maybe you could arrange it so that large ships (corvette, capital, installation) do still have radar icons when fuzzy as they're large enough to see their shape from a distance.

If I have to, I'll just remove the radar icon from the Amazon and use that for our trigger in ST:R. But it would be nice to have this outstanding feature tweaked to make it just a bit more useful.
Title: Re: Wanderer 080727 or r4722 build
Post by: chief1983 on October 10, 2008, 03:13:21 pm
What does WMC have to do with this?  And I think he's on vacation anyway.
Title: Re: Wanderer 080727 or r4722 build
Post by: Mobius on October 10, 2008, 03:17:27 pm
Is it possible to use small ship models instead of the icons?

Possibly in the briefing, too? :)
Title: Re: Wanderer 080727 or r4722 build
Post by: Wanderer on October 10, 2008, 03:49:50 pm
Current code in the wanderer trunk already draws the fuzzy contacts as standard issue dots instead of images. I doubt there are any builds out though.. i have really no place to upload them to. As for leaving the image should the ship be of certain type... hmm.. that should be doable. Got to think how to implement it though first.

Is it possible to use small ship models instead of the icons?

Possibly in the briefing, too? :)
Ummhh... what does briefing have to do with radar images?
Title: Re: Wanderer 080727 or r4722 build
Post by: Galemp on October 10, 2008, 04:10:01 pm
What does WMC have to do with this?  And I think he's on vacation anyway.

Sorry, I meant Wanderer. Forgot whose thread this was.

Current code in the wanderer trunk already draws the fuzzy contacts as standard issue dots instead of images. I doubt there are any builds out though.. i have really no place to upload them to. As for leaving the image should the ship be of certain type... hmm.. that should be doable. Got to think how to implement it though first.

Super! Thanks! I'm currently using a build from early summer, it would be nice to have an update. If you compile a build you can email it to me, and I'll host it for you.

Is it possible to use small ship models instead of the icons?

Possibly in the briefing, too? :)

Ummhh... what does briefing have to do with radar images?

He means dynamically rendering small models in the radar, and in the briefing, instead of the current 2D icons.

We had discussed using wireframe LOD2s in the 3D radar before but opted for icons instead, which I think is fine. As for briefings we definitely need to stick with the existing system, as it's been exploited many, many times for different briefing effects.
Title: Re: Wanderer 080727 or r4722 build
Post by: chief1983 on October 10, 2008, 09:06:27 pm
Here's a recent Wanderer branch build.

Wanderer rev 4840, updated Sept 29 (http://swc.fs2downloads.com/files/fso-Wanderer_20081010_r4840.7z)
Title: Re: Wanderer 080727 or r4722 build
Post by: karajorma on October 11, 2008, 02:57:19 am
We had discussed using wireframe LOD2s in the 3D radar before but opted for icons instead, which I think is fine. As for briefings we definitely need to stick with the existing system, as it's been exploited many, many times for different briefing effects.

I'd love to see the option to choose personally. A choice between the current icon system, 3D models or a pre-rendered cutscene would be great. Would be up to someone else to code it though....after 3.6.10 is out. :p
Title: Re: Wanderer 080727 or r4722 build
Post by: Mobius on October 19, 2008, 01:21:24 pm
IMO it's not a bad idea... :)