ko4life-net / ko

Open source development of the game Knight Online. This is a reversed engineered old version of the game aiming to replicate the nostalgic experience we all once had <3
MIT License
52 stars 21 forks source link

Finalize nation select procedure and fix animated images #125

Closed stevewgr closed 1 year ago

stevewgr commented 1 year ago

Description

nation-select

Ignore the mouse cursor there is a bit off track because of OBS recording software.

This PR finalizes the nation select procedure with some additional fixes:

ko4life-psko commented 1 year ago

It's working well! just the transition between nation swap seems a bit slow (don't know if it was always like that back that)

@GiRx8, I personally haven't checked, but if I remember correctly, officially it was even slower. Hard to remember for sure. @stevewgr, is that true?

I guess if you throw here the v1264 client exe and I might have time to have a quick peek.

stevewgr commented 1 year ago

Hey guys, thanks for the great feedback!

It's working well! just the transition between nation swap seems a bit slow (don't know if it was always like that back that)

@GiRx8, I personally haven't checked, but if I remember correctly, officially it was even slower. Hard to remember for sure. @stevewgr, is that true?

Yes, officially it was much slower by design I suppose. The actual transition speed is implemented in the v1264 client at address 0x005BCE90, which is CUINationSelectDlg::Render:

...
    m_fTextureFactor -= s_fSecPerFrm * 0.3333333f;
    if (m_fTextureFactor < 0.30f) {
        m_fTextureFactor = 1.0f;
        m_bTransitionActive = false;
....

Officially the value 0.30f is 0.0f. I set it to 0.30f to make it a bit faster. Making it faster than this I think is border line custom behavior that ideally we avoid in order to stick to the official behavior.

I guess if you throw here the v1264 client exe and I might have time to have a quick peek.

Just in case anyone needs unpacked v1264 client: KnightOnLine_1264.7z

GitHub doesn't allow to upload *.7z extension file, so I renamed it to *.txt just for uploading and password is: stevewgr.