This page is a wiki. Please login or create an account to begin editing.


26 posts / 0 new
Last post
OneEightHundred's picture
Offline
Joined: 2020 May 11
Glider PRO ported to Windows (and Android)

I've ported Glider PRO to Windows (edit: and now Android) based on the 2016 open source release.

GitHub: https://github.com/elasota/Aerofoil
Itch: https://galeforcegames.itch.io/aerofoil
Google Play Store: https://play.google.com/store/apps/details?id=org.thecodedeposit.aerofoil

It includes import tools that can digest various vintage Mac formats (Compact Pro, StuffIt 6 and below, MacBinary, BinHex) and support the vast majority of existing community houses.

While this is Windows/Android-only, I've tried to design the code to make future ports as easy as possible, the OS-specific parts are only about 2000 lines of code.

Comments

mossy_11's picture
Offline
Joined: 2009 Sep 5

Awesome.

I couldn't get it to run on my Win10 Thinkpad, however — the program crashes on launch (I see an empty Aerofoil application window for a couple of seconds, then it closes). Anything I can do to troubleshoot that or help you identify and fix the bug that's occurring?

OneEightHundred's picture
Offline
Joined: 2020 May 11

Seen one other report of that, I'm not sure what causes it... unfortunately I forgot to save the PDBs for the 1.0rc2 build, so now I have to post a new build to use minidumps.

I updated the ZIP file in the build with an exe that I can actually use dumps with... Re-download Aerofoil-1.0rc2.zip (not the MSI package), run it from that. If it crashes, press Windows Key+R and put in %LOCALAPPDATA%\CrashDumps, find the most recent Aerofoil.exe dump file, and either attach it to an issue on the GitHub project, or post a link to it.

A dxdiag report might be helpful too.

The only thing I've found that might be causing it is it looks like it crashes if you have no audio output devices, or they're all disabled. I'll fix that this weekend.

mossy_11's picture
Offline
Joined: 2009 Sep 5

Here's a zip file with both of those. Hope it helps.
https://ln2.sync.com/dl/ec22127b0/vggkxkdk-m2bysman-vgr4cwmy-vzgycxtq

OneEightHundred's picture
Offline
Joined: 2020 May 11

Looks like it failed to init D3D. I think the problem is it's trying to start it with debug features enabled when it's not supposed to. I've posted an updated release that should fix that.

If that still doesn't work, 1.0rc4 adds a log mode, start the game with "-diagnostics" in the command line and it will output a log file to Documents\Aerofoil\Logs.

mossy_11's picture
Offline
Joined: 2009 Sep 5

It works! Game runs really well. I noticed a recurring audio stuttering/distortion on the music — sounds like a buffer underflow (based on my experiences with using DAWs), as though it's trying to play the audio before it finishes loading into memory. But otherwise everything seemed great on first run.

OneEightHundred's picture
Offline
Joined: 2020 May 11

Do you have a sample of the audio by any chance?

The audio's preloaded, but the score is dynamic, so if it's stuttering, then it's probably an issue with it queueing up the next music segment. I might be able to fix that but I'll have to redo how the queuing works. Sad

If it's playing chirps/static/garbage, then it's playing something that wasn't submitted for playback, which would more likely be a driver/hardware problem.

mossy_11's picture
Offline
Joined: 2009 Sep 5

I just went to record one for you and it's not happening anymore. I know I had a lot of apps open when it happened yesterday, so maybe it was just an issue with too much CPU load or something.

24bit's picture
Offline
Joined: 2010 Nov 19

Thanks for your labor of love, Eric!
The game seems to run fine on my old Optiplex 755 with the infamous AD1984.
However Windows 10 has found a driver for it, no issues on my side.

One little thing, with your RC4 msi, I got a sound output error on W7-64, but the game proceeded with playing a self running demo. W10 runs RC4 without error, but there is no self running game show. Is that meant to be this way? The demo looked great.
Alas, W7 will not be your target these days. Wink
Best wishes for publishing your game in the Windows world!

Edit: Version 1.0 is running fine with Windows 7 64 bit!

OneEightHundred's picture
Offline
Joined: 2020 May 11

It's supposed to start a demo if you wait at the start screen long enough. (I'm actually not sure why it'd start immediately... it should only do that if you press Ctrl-D)

Audio doesn't work on Win7 because the XAudio 2.8 SDK broke compatibility with 2.7. It looks like there's a separate "redistributable" version of 2.9 that works with Win7, so I'll see if I can get support for that in the next RC.

OneEightHundred's picture
Offline
Joined: 2020 May 11

I think the issues I wanted to fix for RC are fully resolved, so I've tagged release 1.0.0.

Sound should hopefully be working in Win7 now.

Temporary Joe's picture
Offline
Joined: 2009 Nov 14

What? How!

I started doing the same thing about a year ago and it threw up all sorts of errors that were related to outdated system calls.

OneEightHundred's picture
Offline
Joined: 2020 May 11

Yes, it depends on OS features a lot, especially resource management, UI, and drawing. The "PortabilityLayer" library contains all of the re-implemented OS functionality (it's about half the size of the entire original game).

The movies in the open source release were missing res fork data that has all of the timing and information about the image encoding, so they're not usable, I had to find the originals to recover the metadata and merge it in so ffmpeg could decode them.

The CD Demo House movie I couldn't find the original of though. I figured out what encoding and size it was and wrote a quick tool to decode it, and guessed the frame rate. Fortunately, it uses the system palette, so didn't need to remap it.

Temporary Joe's picture
Offline
Joined: 2009 Nov 14

I did give it a spin. It's great! It really is (and I don't think I would have been able to do it).

- The original Glider PRO wasn't windowed nor limited to 640x480 (except for the title screen, which was centered), and could display almost completely all of 9 rooms if resolution was big enough. Alt-Enter works properly but magnifies the resolution.
- At least with newer versions of Glider PRO, getting the bonus points when you go over the cat's face in the billboard would trigger a "meow" noise, with sound effects being able to be triggered. This appears to be absent in the port.
- The demo does trigger properly!
- One of the features of the OS X version was the balloons were translucent. I wonder if that's possible here.
- I think the original font used was Geneva (calendars, names of rooms). As Geneva is still owned by Apple, is it possible to swap out the font?

OneEightHundred's picture
Offline
Joined: 2020 May 11

Re: Resolution, my plan is to add better video options (and with that, address some things like the fullscreen status not being saved), but I opted to punt that to a 1.1 release and try to get something generally-good for 1.0.

I chose its auto-scaling behavior as what I thought was the best compromise of several options that all had their own drawbacks. The game was made for smaller monitors, the open source release is dated 2000, when 75% of monitors were 800x600 or lower, so the active room took up much more of the screen than it would with a 1x scale on, say, my 1920x1080 monitor. I felt that keeping the proportion of screen space around the original proportions was the most representative of the original experience.

(Incidentally, part of the windowed mode working at all is being able to change the resolution while playing, something that the original game didn't support at all, and was a tricky thing to add because objects in adjacent rooms can spawn or despawn depending on the resolution.)

It looks like the problem with the cat billboard is that the sound resource for it is using an extended header, which the import tool doesn't understand... and the channel count is stored where the length would be in the standard header, so it thinks it's only 1 sample long. I'll fix that in 1.0.1.

The OS X version has some other things too, like different lighting, but the open source release was of the classic version, so it doesn't have any of that. The only graphical upgrade that's on the table right now is 32-bit color support (which probably sounds kinda low-tech, but the compositing is all done in software).

Yes, the original application font was Geneva, but Apple owns that. I looked at a decent number of alternatives. Was originally was using Roboto because it most resembled Geneva's design, but switched to Open Sans because Open Sans had much more similar metrics. In particular, Open Sans at the same font sizes as Geneva tends to have very similar width, whereas Roboto was often too wide, causing UI elements and calendar names in some months to spill out out of their intended boundaries. Unfortunately, Roboto and Open Sans both have horrible monochrome hinting, so it wasn't viable to use them without anti-aliasing.

I contacted the author of the Virtue font (a Charcoal lookalike which has good monochrome hinting) for use as the menu/button font, but ultimately opted not to use it to keep the licensing/legal stuff simpler. Truth FB is the same font as Charcoal too, but it's $160 for a 1 year license and $800 for perpetual, which was just not something I was willing to pay for what I'd get out of it.

Temporary Joe's picture
Offline
Joined: 2009 Nov 14

Re: Resolution, my plan is to add better video options (and with that, address some things like the fullscreen status not being saved), but I opted to punt that to a 1.1 release and try to get something generally-good for 1.0.
Oh most definitely! 1.0 is supposed to be generally good, a complete release without too many obvious bugs. That's how game development used to be. It's like SimCity 2000's v1.0, which still had bugs and some other things (most notably not going back to bulldozer going back to default behavior, so it will get stuck on Raise Terrain when you just wanted to demolish a single tile) but otherwise a full release that offers a complete experience. Too many games these days rush out "1.0" as a buggy, rushed project. It's too bad OpenSans is not a perfect alternative either, the "J" in June still goes where it shouldn't.

I also noticed that the color is noticeably muddier than the Mac version, probably because of the default Windows 256 color palette being different than the Mac one, and from the sounds of it, that should be fixed with 32 bit color.

Title screen comparison
Calendar UI

OneEightHundred's picture
Offline
Joined: 2020 May 11

It's not using the Windows palette. SheepShaver is applying a 0.7 gamma curve to the video output. Whether that's something from SheepShaver or the emulated OS, I don't know.

I think what's happening is Apple RGB monitors had 1.8 gamma, but sRGB (i.e. what your Windows machine is almost certainly using) is roughly 2.2, so SheepShaver is outputting at roughly 1.54 gamma, which might actually be a bit too bright?

Not sure. I'll try adding some gamma correction to retarget it to 1.8 gamma and see if that helps, that should be in the 1.0.1 release.

OneEightHundred's picture
Offline
Joined: 2020 May 11

Quick update: I've made some portability improvements.

- Added a secondary project, AerofoilSDL, which uses SDL2 and GLES2 for video/audio. (Volume control and 32-bit color aren't supported yet, but will be soon.)
- Replaced the open/save file dialogs with a new one that uses the internal UI, so it's no longer necessary to roll one or add one on platforms where that may not be straightforward, or where it conflicts with fullscreen.
- Added a fiber implementation that uses threads and wake-up events.

I think that should significantly lower the porting work required for macOS and Linux in particular... at least until Apple pulls OpenGL support and breaks it again, and then you get to wait for Google to finish the ANGLE Metal backend or something.

I'm still seeking a volunteer to help with the remainder, since I don't have a Mac or Linux machine, or the proper expertise for managing them. At this point, there isn't much left to port... just some very basic OS primitives like thread synchronization, the file system, and sorting out all of the build projects and stuff.

OneEightHundred's picture
Offline
Joined: 2020 May 11

Some more news: Android port is done, so you can paper airplane on the go now.

You can download it off GitHub, itch.io, or the Google Play Store:

https://galeforcegames.itch.io/aerofoil
https://play.google.com/store/apps/details?id=org.thecodedeposit.aerofoil

(I don't currently have plans for an iOS version, sorry...)

edit: It's been approved by Play Store, so you can get it there now instead of sideloading, yay!

fogWraith's picture
Online
Joined: 2009 Oct 23

Went ahead and fetched it from the Google Play Store.

The first-time launch information screen instructs you to tap to continue, it does not not seem to respond (OnePlus 8 Pro) to tapping at all.

Force close and start again, this time it loads the background, plays music and brings up the menu buttons which I assume should be tappable, which they unfortunately aren't.

Though, I'm looking forward to trying it on my phone at some point, so I'm keeping it installed and will await further updates Smile

OneEightHundred's picture
Offline
Joined: 2020 May 11

I'm not sure what would cause that off-hand unless there was a stuck multi-touch preventing it from recognizing the primary touch, but then you wouldn't be able to launch it. I looked at the responsible code and didn't find anything unusual, and haven't found any discussions of similar issues, so I'm kind of at a loss.

You don't have it connected to a Bluetooth mouse or any other pointing device somehow, do you?

fogWraith's picture
Online
Joined: 2009 Oct 23

Nothing connected to the phone, here's a clip on YT.
If there's anything I could try / debug / provide information that will help, let me know Smile

OneEightHundred's picture
Offline
Joined: 2020 May 11

Depends if you're willing to fire it up in Android Studio. It uses SDL, and unfortunately there isn't much of my code responsible for handling anything that could be responsible for this, the intro screen in particular just waits for a mouse down event (which SDL auto-translates from touch events by default).

You need to do a few things to get it to compile: Run ConvertResources.bat, then copy_packaged_resources.bat in the AerofoilAndroid dir, and at some point, make_symlinks.bat (which you have to run as admin). Then you should be able to build the project and deploy it.

Touches should trigger Android_OnTouch in SDL_androidtouch.c, which should call SDL_SendTouch -> SDL_SendMouseButton -> SDL_PrivateSendMouseButton -> SDL_PushEvent. The SDL_MOUSEBUTTONDOWN event should be digested in GpDisplayDriver_SDL_GL2::TranslateSDLMessage and posted to the game's event queue.

Something failing to happen there seems like the most likely culprit. I'm guessing that it's either failing to translate the touch events because it thinks there's another touch device active for some reason, or it's not even getting the touch events, in which case it's either a problem in the Java code or something even weirder.

fogWraith's picture
Online
Joined: 2009 Oct 23

I can do that sometime this coming week, a bit swamped with work at the moment, but I'll have a look at it and see if I can't get something to work after I the studio env. up and going

Jotting the info down, might be that this is something to do with the OnePlus 8 Pro, or it might not... we'll see Tongue

Temporary Joe's picture
Offline
Joined: 2009 Nov 14

I do like the updates. For the most part, everything works (including sound and video). The full screen issue still scales up (proportionally) to the resolution instead of showing more of the house. Still, it's more or less what I wanted. Smile

OneEightHundred's picture
Offline
Joined: 2020 May 11

You can disable the scaling in the display options now. Uncheck the "Scale to fit window" option.