Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha Centauri - Animation performance issue #277

Open
vv221 opened this issue Nov 24, 2022 · 5 comments
Open

Alpha Centauri - Animation performance issue #277

vv221 opened this issue Nov 24, 2022 · 5 comments
Assignees

Comments

@vv221
Copy link

vv221 commented Nov 24, 2022

Alpha Centauri used to be provided with a native engine developed by Loki, that can still be used with ./play.it (using the game build sold on GOG as a basis): https://www.dotslashplay.it/en/games/alpha-centauri

One of the differences I noticed when using the sdl12-compat wrapper instead of real SDL 1.2 is that the initial animation of the pod landing is very sluggish, while it is smooth with the old SDL 1.2 library.

Since this would require access to a commercial game for investigating the issue, I would be OK to buy a gift code to someone willing to work on this issue but does not own a copy of the game yet.

I am of course willing to provide more information, but since I’m quite new to anything related to SDL I would need step-by-step instructions on how to debug the issue.

@icculus
Copy link
Collaborator

icculus commented Nov 25, 2022

I have a copy of Loki's Alpha Centauri somewhere, so I can look into this.

@icculus icculus self-assigned this Nov 25, 2022
@vv221
Copy link
Author

vv221 commented Nov 25, 2022

The build I tested has a slight difference with the out-of-the-box Loki version: to avoid the requirement on old compatibility libraries, a small shim is preloaded that allows it to run on top of current libraries.

The game is run from the dynamic binaries (smac.dynamic), not the static ones,

Here is a copy of the shim:

#define _GNU_SOURCE

#include <stdio.h>
#include <stdlib.h>

void *__builtin_new(size_t size)
{
    return malloc(size);
}

void __builtin_delete(void *ptr)
{
    free(ptr);
}

void *__builtin_vec_new(size_t size)
{
    return malloc(size);
}

void __builtin_vec_delete(void *ptr)
{
    free(ptr);
}

And its source: https://github.com/ZeroPointEnergy/smacshim

@vv221
Copy link
Author

vv221 commented Nov 25, 2022

Extra detail that might be useful: I am running the game on an up-to-date Debian Sid, providing sdl12-compat 1.2.60 and SDL 2 2.26.0.

@icculus
Copy link
Collaborator

icculus commented Jan 13, 2023

Did this get fixed by #278 or #279?

@vv221
Copy link
Author

vv221 commented Jan 14, 2023

Did this get fixed by #278 or #279?

No, I still get sluggish animation for the initial pod landing when building from the current HEAD of main (commit b2f7b77).

I suspect it might be an issue with all animations, but is noticeable only with this one because other animations in this game are very short.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants