[Wolfenstein: Blade of Agony] v3.1 released (p204)

For Total Conversions and projects that don't otherwise fall under the other categories.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: [Blade of Agony] Drivable Tanks! | p160

Post by Marisa the Magician »

AFADoomer wrote:
Marisa Kirisame wrote:ZScript is also prone to breaking if you aren't careful. I see you got a save error there.

I guess it'll go away after I export F3DFloor.
I think it's because the FLineTraceData struct contains the F3DFloor entry (here), despite it not being exported... Interestingly enough, the TraceResults struct has the F3DFloor piece commented out.
That error specifically is because you're using it as a class variable, rather than a function variable. In cases like that I'd recommend marking the FLineTraceData variable as "transient" just so it doesn't get serialized (same workaround as with CVar structs). I'm pretty sure ZZYZX decided on commenting it out because it's not exported, but from the way my trace function is designed, that variable does need to be there, since the ffloor variable is useful to check for in some cases (e.g.: if it is non-null then the line/plane hit is part of a 3d floor, and such).
User avatar
Tormentor667
Posts: 13530
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: [Blade of Agony] Drivable Tanks! | p160

Post by Tormentor667 »

Marisa Kirisame wrote:That error specifically is because you're using it as a class variable, rather than a function variable. In cases like that I'd recommend marking the FLineTraceData variable as "transient" just so it doesn't get serialized (same workaround as with CVar structs).
I feel like reading an ancient language...
User avatar
HAL9000
Posts: 266
Joined: Fri Mar 16, 2018 7:44 am
Contact:

Re: [Blade of Agony] Drivable Tanks! | p160

Post by HAL9000 »

@ Tormentor667
Interesting, thanks for the explanation.
One more question, are tank md3 parts animated or static model?
I wanted to do something similar for my AT-ST, but his body/legs must be frame animated while moving, can your Zscript tank logic handle frames?
For example..AT-ST walking (md3 frames from X to Y) while rotating upper body/turret and shooting.

Cheers
User avatar
AFADoomer
Posts: 1322
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: [Blade of Agony] Drivable Tanks! | p160

Post by AFADoomer »

Nash wrote:AFADoomer - can you tell us more about the tank physics and aligning the tank to sloped terrain? Are you sampling from 4 points of the tank and calculating the pitch and roll from there? Is that what the line traces are doing?
Yes, I'm sampling at the four corners of the tank model using GetZAt, calculating the relative offset from floors, then using those values to calculate pitch and roll.

Code: Select all

    // Handling for terrain-based pitch/roll calculations...
    void SetPitchRoll(Actor mo)
    {
        if (!mo) { mo = self; }

        double points[5], minz = 0x7FFFFFFF, maxz = -0x7FFFFFFF;

        points[0] = mo.floorz;

        // Get the relative z-height at the four corners of the tank
        points[1] = mo.GetZAt(Radius, Radius) - points[0];
        points[2] = mo.GetZAt(Radius, -Radius) - points[0];
        points[3] = mo.GetZAt(-Radius, Radius) - points[0];
        points[4] = mo.GetZAt(-Radius, -Radius) - points[0];

        for (int i = 1; i <= 4; i++)
        {
            if (points[i] > MaxStepHeight) { points[i] = 0; } // Ignore the point if you can't climb that high
        }

        // Use those values to calculate the pitch.roll amounts
        double pitchinput = (points[2] + points[1]) - (points[4] + points[3]);
        double rollinput = (points[2] + points[4]) - (points[1] + points[3]);

        pitchinput = atan(pitchinput / (Radius * 2));
        rollinput = atan(rollinput / (Radius * 2));

        mo.pitch = clamp(mo.pitch, -30, 30);
        mo.roll = clamp(mo.roll, -30, 30);

        // Interpolate to the new values
        if (mo.pitch > -pitchinput) { mo.pitch = max(mo.pitch - 1, -pitchinput); }
        if (mo.pitch < -pitchinput) { mo.pitch = min(mo.pitch + 1, -pitchinput); }

        if (mo.roll > rollinput) { mo.roll = max(mo.roll - 1, rollinput); }
        if (mo.roll < rollinput) { mo.roll = min(mo.roll + 1, rollinput); }
    } 
Still needs to be cleaned up and optimize, but that's the code as it stands now.
HAL9000 wrote:@ Tormentor667
Interesting, thanks for the explanation.
One more question, are tank md3 parts animated or static model?
I wanted to do something similar for my AT-ST, but his body/legs must be frame animated while moving, can your Zscript tank logic handle frames?
For example..AT-ST walking (md3 frames from X to Y) while rotating upper body/turret and shooting.

Cheers
It handles basic animation right now... The treads move when the base of the tank moves. For a proper walking animation, there would probably need to be some added handling for smoothly moving from standing to walking and back, but the core code would still work.
User avatar
nazakomu
Posts: 131
Joined: Wed Nov 30, 2016 12:51 am
Graphics Processor: nVidia with Vulkan support

Re: [Blade of Agony] Drivable Tanks! | p160

Post by nazakomu »

I've gotta say, the ZScript work that AFADoomer has done is impressive.
We're seriously starting to see some of the much greater possibilities due to ZScript.
User avatar
Tormentor667
Posts: 13530
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: [Blade of Agony] Drivable Tanks! | p160

Post by Tormentor667 »

Last edited by Blue Shadow on Fri Mar 30, 2018 6:30 pm, edited 1 time in total.
Reason: Used [imgur] tag on screenshots.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: [Blade of Agony] Tank Battlefield Screens! | p161

Post by Blue Shadow »

Reminder for next time: viewtopic.php?f=48&t=57325
User avatar
Captain J
 
 
Posts: 16890
Joined: Tue Oct 02, 2012 2:20 am
Location: An ancient Escape Shuttle(No longer active here anymore)
Contact:

Re: [Blade of Agony] Tank Battlefield Screens! | p161

Post by Captain J »

...Large Image Derp aside, that tank scene looks Tankin' Amazing!! Hope the control isn't so bad, tho! :D
User avatar
GeneralDelphox
Posts: 45
Joined: Sat Sep 30, 2017 1:17 am
Graphics Processor: nVidia with Vulkan support

Re: [Blade of Agony] Tank Battlefield Screens! | p161

Post by GeneralDelphox »

Is there going to be some sort of First Person/Gunner views for the tanks?
User avatar
TDG
Posts: 101
Joined: Sun Jun 19, 2016 6:08 pm
Location: The Netherlands

Re: [Blade of Agony] Tank Battlefield Screens! | p161

Post by TDG »

Oh cool, new screenshots of BOA. How is far is the progress on map building?
User avatar
Ozymandias81
Posts: 2062
Joined: Thu Jul 04, 2013 8:01 am
Graphics Processor: nVidia with Vulkan support
Location: Mount Olympus, Mars
Contact:

Re: [Blade of Agony] Tank Battlefield Screens! | p161

Post by Ozymandias81 »

@GeneralDelphox - It is not planned, but never say never

@TDG - You can spoil yourself checking github development :wink:

HAPPY EASTER EVERYBODY, and in case you wonder I am the dude who ripped models for that Sherman tank, from CoD2 with slightly edits and adjustments on a total of 6 model parts for main actor and 4 model parts for destroyed one.
CeeJay
Posts: 1467
Joined: Sun Mar 14, 2010 2:52 am

Re: [Blade of Agony] Tank Battlefield Screens! | p161

Post by CeeJay »

Will the next chapter be more run-n-gun action and less stealth and rescue-mission oriantated than the previous one?
User avatar
Wiw
Posts: 766
Joined: Thu Jun 11, 2015 1:58 am
Graphics Processor: nVidia with Vulkan support
Location: Everywhere and nowhere.

Re: [Blade of Agony] Tank Battlefield Screens! | p161

Post by Wiw »

How much of Chapter 3 would you say is done at this point?
User avatar
Tormentor667
Posts: 13530
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: [Blade of Agony] Tank Battlefield Screens! | p161

Post by Tormentor667 »

About 25%, it’s still a lot of work left
Post Reply

Return to “TCs, Full Games, and Other Projects”