L



Posts: 5





SeedlingPosts: 5 Mac port of Spelunky 1.0 « on: July 10, 2011, 08:03:40 AM »



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



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. I used Game Maker for Mac to make a Mac port of Spelunky 1.0.I've been working on this for a little while but it wasn't until the release of the Caster extension 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. Logged

Sparkle



Posts: 2048







MossyPosts: 2048 Re: Mac port of Spelunky 1.0 « Reply #1 on: July 10, 2011, 11:51:27 AM » 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 Yay! I'm glad someone was working on this. Now when I go to college I'll be able to play Spelunky!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 Logged

Wonkyth



Posts: 2129







MossyPosts: 2129 Re: Mac port of Spelunky 1.0 « Reply #2 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! Logged Can you read the wry? Can you FEEL the wry?!

TeeGee



Posts: 2







SeedlingPosts: 2 Re: Mac port of Spelunky 1.0 « Reply #3 on: July 14, 2011, 03:40:47 PM »



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. 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. « Last Edit: July 14, 2011, 03:45:49 PM by TeeGee » Logged

chris the mac user



Posts: 1





SeedlingPosts: 1 Re: Mac port of Spelunky 1.0 « Reply #4 on: July 15, 2011, 03:01:28 AM »



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! 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! Logged

buffaloseven



Posts: 1





SeedlingPosts: 1 Re: Mac port of Spelunky 1.0 « Reply #10 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. Logged

L



Posts: 5





SeedlingPosts: 5 Re: Mac port of Spelunky 1.0 « Reply #12 on: August 14, 2012, 10:37:21 PM »

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: Someone emailed me several months ago about the modified 1.0 source I used, and I finally got around to replying:This was attached: http://l.j-factor.com/gamemaker/SpelunkyMacSource.zip Logged