jorio / OttoMatic

Pangea Software’s Otto Matic 🤖
https://pangeasoft.net/otto
Other
141 stars 13 forks source link

Support for software rendering? #26

Open foote-darrell opened 1 year ago

foote-darrell commented 1 year ago

Running your build of Otto Matic on an old computer from 2003 with Windows XP reports that it isn't a 32-bit application. untitled2 I had then tried the old Ideas From the Deep edition of Otto Matic, but it reports that it needs an OpenGL Driver to play. untitled untitled1 I do know that the original version of Bugdom can run in Sheepshaver entirely with the virtual machine CPU, as does Weekend Warrior and Nanosaur. How can a setting be made to allow software rendering? Can an app also be simply compiled in 32-bit?

foote-darrell commented 1 year ago

Come on dinosaur guy, don't take a year and a half to answer like this issue.

jorio commented 1 year ago

Open source projects are maintained by people in their free time. Getting help from the maintainers on top of getting the software for free is just gravy - I'm not obligated to give speedy answers ;)

The original versions of the games you mentioned use QuickDraw 3D for rendering. I suppose Mac OS used to ship with a software renderer for QuickDraw 3D in case your Mac's graphics card wasn't up to par. So that's why those games work within SheepShaver on your machine.

I yanked all the QuickDraw 3D code from Bugdom and Nanosaur and replaced it with a bespoke OpenGL renderer. So, you need a library that's able to do OpenGL software rendering.

If you're open to tinkering, I'd suggest to try Linux on this machine. It'll be much easier to compile the game, and you'll get software rendering via Mesa. There are still distros that provide 32-bit support, such as Debian.

foote-darrell commented 1 year ago

But how can a 32-bit machine run the modern application? Wouldn't every application have to be at most 32-bit? Can it just be compiled to a different bit depth?

foote-darrell commented 1 year ago

Seemingly there are no 32-bit builds of the game on here.

jorio commented 1 year ago

Yes, just build the game from source.

Typically, compilers target the architecture of the computer they're running on (unless it's a so-called cross-compiler). So if you install, say, Debian on that 32-bit machine, and you build the game there, you'll get a 32-bit build.

foote-darrell commented 1 year ago

Screenshot from 2023-05-06 20-46-17 Well I installed the 32 bit Debian on this old computer. The build instructions referred to install libsdl2-dev for Ubuntu, so I'd assume it would be the same for Debian, because Ubuntu is spun-off of Debian. I found this copy, but it perpetually says to insert a DVD. How can it actually be installed?

It just keeps perpetually saying

Media change: please insert the disc labeled
 'Debian GNU/Linux 11.6.0 _Bullseye_ - Official i386 DVD Binary-1 20221217-10:40'
in the drive '/media/cdrom/' and press [Enter]
foote-darrell commented 1 year ago

Reportedly there's no 32-bit Linux verion of CMake. How would this be made for this old computer?

jorio commented 1 year ago

Debian Bullseye does have a 32-bit package of CMake: https://packages.debian.org/bullseye/i386/cmake

Did you try this? sudo apt install build-essential libsdl2-dev cmake

As a rule of thumb, on Debian, you should try installing packages via apt first before resorting to downloading packages manually.

I suppose it's asking you to insert a DVD because you downloaded a .deb file manually instead of installing the package via apt, and it's looking for dependencies on the install media for some reason.

If you're still getting this error, or other system issues that aren't closely related to Pangea games, try asking on a Linux help forum such as r/linuxquestions on Reddit.

foote-darrell commented 1 year ago

I did first try from the terminal:

darrell@morals:~$ sudo apt install cmake
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  cmake-data libjsoncpp24 librhash0
Suggested packages:
  cmake-doc ninja-build
The following NEW packages will be installed:
  cmake cmake-data libjsoncpp24 librhash0
0 upgraded, 4 newly installed, 0 to remove and 122 not upgraded.
Need to get 0 B/8,984 kB of archives.
After this operation, 35.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Media change: please insert the disc labeled
 'Debian GNU/Linux 11.6.0 _Bullseye_ - Official i386 DVD Binary-1 20221217-10:40'
in the drive '/media/cdrom/' and press [Enter]

It looks like that link worked.

foote-darrell commented 1 year ago

Screenshot from 2023-05-07 11-28-00 Now it says that there is an undeclared identifier in the traps.c file. Otto32-bitDebian.zip

jorio commented 1 year ago

Comment out that line

Le 7 mai 2023 à 20:31, foote-darrell @.***> a écrit :



Now it says that there is an undeclared identifier in the traps.c file.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

foote-darrell commented 1 year ago

Screenshot from 2023-05-07 11-54-45 Yay, that finally actually worked! Although extremely laggy; it is a 20 year old laptop after all. Screenshot from 2023-05-07 11-57-43 Is this using any GPU at all, or is this entirely software rendering? Screenshot from 2023-05-07 11-59-41 Is there any other mechanism of changing the graphics quality, like resolution or anything?

jorio commented 1 year ago

Congratulations! Hope you enjoyed that little experiment ;)

Is this using any GPU at all,

No—according to your screenshots, OpenGL is being handled by llvmpipe, which is a software renderer.

Is there any other mechanism of changing the graphics quality

The game boots into the same resolution as the desktop. Try lowering your display resolution before starting the game.

Also, set this to false and recompile to turn off a bunch of effects and spawn fewer objects: https://github.com/jorio/OttoMatic/blob/197b5d45869124c29a8161d863f186f27cf4db0f/src/System/GameMain.c#L55

foote-darrell commented 1 year ago

Well I set the screen to 800x600 and edited that line to false. Screenshot from 2023-05-07 14-29-42 The slime is rigid and now purple. Screenshot from 2023-05-07 14-31-42 It is slightly faster but still quite laggy. Would there be a simple edit to make the game to render in a specific resolution? I know that the old Ideas From the Deep edition had this feature. Even really low resolutions like 320x240 or even 176x144?

foote-darrell commented 9 months ago

Support for arbitary resolutions is a staple of this remaster isnt it?