Skip to content
This repository has been archived by the owner on Sep 10, 2023. It is now read-only.

Look into platform port options #3

Open
Eblo opened this issue Mar 31, 2021 · 7 comments
Open

Look into platform port options #3

Eblo opened this issue Mar 31, 2021 · 7 comments
Assignees

Comments

@Eblo
Copy link
Owner

Eblo commented Mar 31, 2021

With this custom executable, our options for porting have expanded. Mac and Linux are already supported. Other possibilities:

@Eblo Eblo self-assigned this Mar 31, 2021
@Eblo Eblo changed the title Look into porting options Look into platform port options Jul 7, 2021
@Eblo
Copy link
Owner Author

Eblo commented Nov 25, 2022

With the adoption of custom shaders, we cannot presume that Mac is supported. It will have to be investigated as a separate option.

Linux has been compiled and booted in Linux, but that brings its own share of headaches. To name a few:

  • This may more be a GL version issue, but existing shaders mostly require tweaks to be compatible. See this ticket in the game's repo.
  • The game seems to require sudo to run for unknown reasons. Otherwise it throws an AL_SOFT error.
  • On a VirtualBox Ubuntu 18 VM, the game could build seamlessly. It would, however, fail at boot due to Error creating context: Could not create GL context: BadValue (integer parameter out of range for operation)
  • On a VMWare Ubuntu 22 VM, the game fails to build at the OpenAL stage due to aligned_alloc not appearing to be a member of std. This seems like a C++ version incompatibility, as aligned_alloc was not always part of std in C++. The binary built on the above VM can be used in this VM, but it requires libruby.so to be in the same directory. That was not the case in the other VM. Running make ruby in the project and copying that file to the game directory does allow the game to boot to the title screen. Numerous issues prevent things from progressing past the save file load; the RTP path and shaders are known issues. Text seems to be arbitrarily missing on some windows in this build.

So far, Linux efforts have been attempted on VMs. We will want to try it on real hardware as well. Gotta claim that Steam Deck verification. Ubuntu and SteamOS are prime targets for running the game. Alpine could be useful purely for building.

@Eblo
Copy link
Owner Author

Eblo commented Nov 25, 2022

Movie playback seems fine when run natively on Windows. Some combination of Linux and the nature of a virtual machine causes it to choke badly. The video playback reaches the final frame long before the audio finishes. I'm not sure if the audio is slowed or what. Hardware acceleration could be helpful here. But really, the two streams SHOULD be synced.

@Eblo
Copy link
Owner Author

Eblo commented Nov 26, 2022

Upon closer inspection, the video file is 8 FPS, but the game appears to be displaying at 10 FPS. This happens on Windows as well. fa2ec07 seems to be the culprit; playing video before that will result in proper syncing (albeit without the letter boxing, and the video will freeze on the last frame and loop the audio).

@Eblo
Copy link
Owner Author

Eblo commented Nov 26, 2022

The movie playback bug was fixed in 993e9ea, but it was not related to Linux or VMs. Furthermore, I don't think the 8 FPS sample video we have comes close to bottlenecking. If I force the frame rate to 60, it zips through without incident.

For the time being, I am able to build on Ubuntu 22 by changing a reference to std::aligned_alloc in OpenAL to just aligned_alloc. I'm not exactly sure what's wrong with the compiler there when Ubuntu 18 does not have that issue. When built and run on Ubuntu 22, neither sudo nor libruby.so seems to be required.

@Eblo
Copy link
Owner Author

Eblo commented Nov 26, 2022

Shader conversions are underway. First person works. Regular maps and battles work. SEs do seem to lag or sometimes not play at all. It is unclear if this is an issue with Linux, the virtual machine, or the fact that I changed a library's code to make the game compile. If it's not the latter, perhaps converting to WAV or archiving everything together would mitigate the issue.

@Eblo
Copy link
Owner Author

Eblo commented Nov 28, 2022

image
Building fails on MacOS. This seems to be the fact that custom stuff has not been XCode'd properly.

@Eblo
Copy link
Owner Author

Eblo commented Nov 29, 2022

The above was resolved with 5e712bf. I'm not sure how robust the Xcode fix in rb_shader.cpp is, but it works for now. Shaders and FPS work. Performance is crap, but that is likely due to the VM. Real hardware will be needed for proper testing. The SE latency in Linux does not appear on MacOS.

Eblo pushed a commit that referenced this issue Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant