Show Posts
Pages: [1]
1  Games / Spelunky Classic / Re: Mac port of Spelunky 1.0 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
2  Games / Source / Re: Game Maker Help Thread! on: July 13, 2012, 06:50:10 AM
Thank you for the suggestion TyrOvC, but using Caster is what I planned to do all along.  Grin  I've accomplished about one third of what I want to do with the source code (that includes implementing Caster audio), but I'm now having issues with Game Maker 7 for Mac.

I'm using Game Maker Pro 7.5.87 and when I try to "Create Executable" it seems to work fine except when I try to run the resulting app. The Spelunky logo pops up and then I get a black screen and no sound. This happens with Spelunky 1.0, 1.1, 1.2 and my modified version of the 1.2 source. I can exit the game with the "Esc" and "F10" key combo or "F4" and selecting "Quit", so the game logic is still working to some degree...

Here's the weird part. All those same versions of the game run fine (except for the Supersound errors) when I use "Run the game" from within Game Maker. I want to implement more changes in the code, but without the ability to redistribute a working executable, I don't see much point.

Well, here's one thing that might be of assistance:

The working directory for loading files is different for compiled executables than it is for in-editor running. For executables, it's "<filename>.app/Contents/MacOS/". (Even though it's probably a bug, it also makes sense as a behaviour that allows you to store and reference game resources inside the app bundle, as a Mac application best practice.) So if you want to open a file in a folder called "sound" in the same directory as the app, you have to use sound_add("../../../sound/file.mp3") and so forth. Consider adding a Constant called something like PATH, use it in all file i/o calls (for instance, sound_add(PATH + "sound/file.mp3")) and set it to "" when testing it in the editor and "../../../" or whatever when you build the executable.

I'm not sure what the problem with the graphics might be. Have you tried stripping out the draw_set_blend_mode_ext() related calls in oScreen? Those might have something to do with it.
3  Games / Spelunky Classic / Re: Mac port of Spelunky 1.0 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
4  Games / Spelunky Classic / Mac port of Spelunky 1.0 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 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.
5  Games / Source / Single screen Spelunky on: December 26, 2009, 02:26:13 AM

^^^ Actual screenshot.

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

This is a quick hack in which each entire game level is drawn in a single screen at 1:1 resolution without scrolling. Move the .exe into your Spelunky folder so it can run.

This of course means there's no frozen region, so insufficiently big rigs might encounter slowdown. I also disclaim responsibility for omniscience-induced brain aneurisms, Waldo's Syndrome, remarkably easier ice levels, monitors insufficiently tall to render the entirety of the boss stage, and refunds for spuriously purchased compasses. Single screen Spelunky is not intended as a substitute for the proper game rules!

Anyway, enjoy.
Pages: [1]