News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu

Storm Engine 2 update

Started by motorsep, September 14, 2018, 09:20:25 AM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

motorsep

@bitterman

The issue with vehicles that loading a savegame with vehicle crashes the engine. That's really the main issue with SE2 at this time.

Speaking of vehicles, played RAGE last night. Noticed that sometimes vehicles are spawned above the ground and dropped after loading a savegame. As if they not really saving vehicles, but only save its stats and location/rotation of the entity and re-initialize / re-spawn it after loading of the savegame is done.

SE2 currently saves all the physics and constraints of the vehicle/suspension as far as I recall.

bitterman

#46
Do you see Q4 code (about vehicle stuff)?
It may be useful.

P.S. just as example:

/*
================
rvVehicleAnimated::Save
================
*/
void rvVehicleAnimated::Save ( idSaveGame *savefile ) const {
savefile->WriteVec3( storedPosition );

savefile->WriteStaticObject ( physicsObj );

savefile->WriteAngles ( viewAngles );
savefile->WriteFloat ( turnRate );

// why are we writing out the viewAxis here???
savefile->WriteMat3 ( viewAxis );

// TEMP
animator.Save( savefile );
}

/*
================
rvVehicleAnimated::Restore
================
*/
void rvVehicleAnimated::Restore ( idRestoreGame *savefile ) {
savefile->ReadVec3( storedPosition );

physicsObj.SetSelf( this );
physicsObj.SetClipModel( new idClipModel( GetPhysics()->GetClipModel() ), 1.0f );
savefile->ReadStaticObject ( physicsObj );
RestorePhysics ( &physicsObj );
physicsObj.EnableClip();

savefile->ReadAngles ( viewAngles );
savefile->ReadFloat ( turnRate );

savefile->ReadMat3 ( viewAxis );

// TEMP - restore animator, because it was cleared when loading the AF
animator.Restore( savefile );
animator.GetJoints( &renderEntity.numJoints, &renderEntity.joints );
animator.GetBounds( gameLocal.time, renderEntity.bounds );
// TEMP

additionalDelta.Zero();
}



You remind me about D3 SDK.

motorsep

Well, feel free to fix it and submit pull request to the github repo. :)

The Happy Friar

The vehicle code in the Q4 SDK was (is?) near identical to the stuff in the D3 SDK, and it's not GPL so it can't be combined with the D3 codebase either way.  ETQW was the same.  Everything seems to have changed in the engines for those games (and ETQW didn't have saves too, so that was a non-issue for them).

bitterman

#49
mt how to use 'glow' stage in buggy.mtr?
Is it implenented from RB? Is it really glow (even in the dark)?

THF, it can be used as analogue, I belive. And even reworked.

motorsep

I sent you the material, so it's all there. It is indeed a glow (Image-based Bloom) with halo.

And no, it's not from RB. In fact, RB was used as base, before tr3b added bunch of fancy things.

bitterman

#51
Quote from: motorsep on October 23, 2018, 09:31:55 AM
I sent you the material, so it's all there.

Nope, you forgot :)
It was recreated by me from .md5mesh.
Sorry :)

I see this fragment in to Code, but not sure about syntax.

Somethings like
{

glow
map textures/glow.tga
}

?

motorsep

Material:

https://pastebin.com/HGKasY1q

_glow.tga is the same as _lights.tga, but half the resolution (512^2 is for lights and 256^2 is for glow)

bitterman


motorsep

Doesn't look like it's working. Or maybe screenshot is too small. I don't see any halo/bloom around headlights.

You might want to check r_* cvars to see if HDR is on and glow is on.

bitterman


motorsep


bitterman

#57
Btw funny fact about vehicles:

In D3 main part of vehicle's code located in AFEntity.cpp and it can get control via impulse_40 from Player.cpp.

Looks like AFEntity.cpp from D3BFG (and perhaps from RB too) has same stuff but impulse_40 was excluded from Player.cpp so vehicle's code can not get control either way.

In SE2 impulse_40 was reverted back, replaced with BUTTON_USE and stuff from AFEntity.cpp significantly extended (added new 4wd spawnclass, exhaust particle system etc).

P.S. Now I try to understand what is autodriving, waypoints and related stuff. In SE2 test map I see only vanilla 'path_corner'.


motorsep

Vehicle auto-drives between path_corners.

bitterman

Yes, the vehicle auto-drives along path_corner at start if path_corner set as "target" for vehicle's entity.

Is there a way to bring back normal view in editor's window?

Not sure what is cause for this distortion.