The Mossmouth Forums

Games => Spelunky Classic => Topic started by: L on July 10, 2011, 08:03:40 AM



Title: Mac port of Spelunky 1.0
Post by: L on July 10, 2011, 08:03:40 AM
I used Game Maker for Mac to make a Mac port of Spelunky 1.0.

http://l.j-factor.com/gamemaker/SpelunkyMac.zip

I've been working on this for a little while but it wasn't until the release of the Caster extension (http://moacube.com/resources/caster-multi-platform-ogg-extension-for-gamemaker/) this June that I was able to fully replicate the Windows version's behaviour without the use of DLLs.

I had to use the 1.0 source because 1.1 is in Game Maker 8 format, which is not compatable with Game Maker for Mac at the moment. Yes, I tried using LateralGM to down-grade the 1.1 source file, but I ran into a number of problems (for one, the transparent pixels of GM8 sprites are converted to solid black, which would be very tedious to manually fix) and I decided it would be faster to just use 1.0's source.

One small thing: due to a bug in GM for Mac, fullscreen mode doesn't work the same as the Windows version. You only get one size (fill your entire screen) and you can't use F4 to toggle in and out of it without the surface-drawing routines no longer functioning correctly (which is why I had to remove that functionality).

Anyway, I hope it works on your system.


Title: Re: Mac port of Spelunky 1.0
Post by: Sparkle on July 10, 2011, 11:51:27 AM
Yay! I'm glad someone was working on this. Now when I go to college I'll be able to play Spelunky! ;D Even though I won't be going for about another year, I wasn't sure if anyone was working on this, so I was worried :O


Title: Re: Mac port of Spelunky 1.0
Post by: Wonkyth on July 10, 2011, 07:18:18 PM
They only have Macs at your future college?

Also: Good work, L!
Great to see Spelunky available to more players!


Title: Re: Mac port of Spelunky 1.0
Post by: TeeGee on July 14, 2011, 03:40:47 PM
Hi, Tom from MoaCube here.

Just registered to say I'm happy to see Caster being useful for somebody. And in porting Spelunky, no less :)! Let me know if you find any bugs or other problems. It's still a fresh extension, after all.


Title: Re: Mac port of Spelunky 1.0
Post by: chris the mac user on July 15, 2011, 03:01:28 AM
I registered just to thank Leon for all the work on porting indie games for mac users. It's a great work and I really appreciate it.

The fullscreen doesn't work for me (it's just a window with maximum height), but it's no problem with those nice 2x and 3x upscaling options.

Now back to the treasure hunting! :D


Title: Re: Mac port of Spelunky 1.0
Post by: Kegluneq on July 15, 2011, 10:25:42 AM
Hey great job L. Way to go expanding the potential fanbase of such an amazing game.


Title: Re: Mac port of Spelunky 1.0
Post by: TeeGee on August 30, 2011, 06:12:40 AM
There's a new update for GM4Mac with some very significant performance improvements. It may be worth it to recompile the game under the new version.


Title: Re: Mac port of Spelunky 1.0
Post by: Wonkyth on August 30, 2011, 06:17:25 AM
I guess it's up to you, TeeGee!  :P


Title: Re: Mac port of Spelunky 1.0
Post by: L on January 06, 2012, 01:36:32 AM
Okay, I just compiled a new version using GM for Mac 7.5.86. Why didn't I do this five months ago? I have no idea.

Same link as above: http://l.j-factor.com/gamemaker/SpelunkyMac.zip


Title: Re: Mac port of Spelunky 1.0
Post by: Wonkyth on January 06, 2012, 06:06:20 AM
Good job, L!
 ;)


Title: Re: Mac port of Spelunky 1.0
Post by: buffaloseven on August 06, 2012, 08:12:44 AM
Has anyone had any luck porting v1.1 to a native Mac OS X binary?  If anyone is making an effort, I'd be more than willing to help.


Title: Re: Mac port of Spelunky 1.0
Post by: TyrOvC on August 06, 2012, 02:18:26 PM
idyll (http://mossmouth.com/forums/index.php?action=profile;u=14703)is working on porting v1.2 to a native Mac OS X binary. I don't know if he's using GameMaker Studio to make it, or GameMaker Mac though.


Title: Re: Mac port of Spelunky 1.0
Post by: L on August 14, 2012, 10:37:21 PM
Someone emailed me several months ago about the modified 1.0 source I used, and I finally got around to replying:
Quote
OK, here's the modified Mac source. I was genuinely planning to clean it a little bit but it's become abundantly obvious that this isn't going to happen.

Here are a few things I can remember about it:

* You need the Caster extension, of course.
* The "ChevyRay rendering loop" is no longer used here, since (apart from some GM for Mac bugs preventing it from working) the Mac version of GM can nearest-neighbour scale the screen natively. Normally it goes "draw the 'screen' surface in the Begin Step, then set the 'screen' surface as drawing target in the End Step. This is now closer to standard Game Maker drawing - everything draws itself directly to the screen, and oScreen now has a Draw event that's only responsible for the HUD and critical visual effects (darkness etc.)
* Due to a GM for Mac bug, the surface used by oScreen gets trashed if you switch from fullscreen to windowed during play. So you can't do that anymore. Hence the changes to the Config app.
* The SS_ scripts have been altered to become wrappers for Caster (or just empty where Caster has no equivalent feature)
* A few script calls to SS_SetSoundFreq have been changed to caster_set_pitch.
* In Game Settings, the Constant "levelpath" determines where the custom level files are loaded. Currently it's set to the directory containing the app bundle.
* oMusic has been modified to read the sounds from a specific path. Currently it's set to the Resources folder inside the app bundle. (This will have to be changed if you try to run the game within the GM editor instead of compiling it).
* In scrInit, the settings file is loaded from the directory containing the app bundle (since it's used by both Config and Spelunky).
* Due to a GM for Mac bug, the custom icon often won't be applied to the compiled app correctly. To fix this, open Game Settings and re-set the custom icns file immediately before compiling.
* The Config app uses a path to within the Spelunky.app bundle to load the music file that it uses.

Sorry for being so absent-minded and inconsiderate about this.
This was attached: http://l.j-factor.com/gamemaker/SpelunkyMacSource.zip


Title: Re: Mac port of Spelunky 1.0
Post by: idyll on September 24, 2012, 01:16:20 PM
I think I was the one that sent you that email.  ;D  I didn't end up using your code (I was too impatient), but you did inspire me to create Spelunky v1.3 for Mac OS X and Windows.

http://mossmouth.com/forums/index.php?topic=2769.0 (http://mossmouth.com/forums/index.php?topic=2769.0)

Thanks for the inspiration and for sharing your work.


Title: Re: Mac port of Spelunky 1.0
Post by: KarjamP on September 25, 2012, 12:53:49 AM
I think this needs to be in the "source" forums. :P


Title: Re: Mac port of Spelunky 1.0
Post by: Nathan on September 25, 2012, 01:31:41 AM
It's been I long I doubt it matters