Loderunner clone

Miscellaneous Forums/Blitz Showcase/Loderunner clone

Thought I'd post some screenshots of my loderunner clone. They're not that exciting, cause, well, they are Loderunner and I'm using graphics like the original. But here they are. Game's coming along quite well, couple of defects to nail out, and need to add demo and edit mode and it will be ready.

[EDIT: I've since added a downloadable, testable version below for those who can try it on the Mac to see if it works so far..]





the link is broken... I think you need the "http://" infront of the url..

but I pasted it in the browser.. looking very nostalgic.. :)

Ahh OK, I was trying to work out the BBCode or such, but it didn't need it. Just stick the url in there...Should work now.

Lode Runner was one of my Apple II favourites. It'll be nice to play it on an Apple machine again. :)

Barney

Hahahaha Barney! I didn't think of it like that as I use a PC. I think though, that the original will still be better - my version was written to showoff an A* pathfinding module I've written for Blitzmax, so the pathfinding is different to the original. I'd like to get hold of the original Apple assembler code and reverse engineer the same routines for a more accurate port version.

Aaron

Hi guys. I was wondering if any of you can try and test my Loderunner clone on the Mac? I've been doing PC development, but I'd like to see how it's holding up on the Mac so far. There are a number of bugs you will definately find as they are with the enemy AI mainly.

In the Zip, there is a loderunner zip which is the code, and there is an astar.mod zip which has to go into the pub.mod mods directory under a directory astar.mod. You'll have to do a makemods on it for that to build. Let me know how it goes.

Also, the code needs a bit of tidying up and refactoring so ignore that...I'll get round to that when it's near completion :)

http://homepages.paradise.net.nz/akoolen/loderunnergame.zip

Thanks and let me know if I've forgotten something.
Aaron

Downloaded. Looks like I'll be popping into office over weekend to give this one a go on the real Mac - not the PearPC substitute.

BTW. Aaron, if you want to try a real good Loderunner conversion for PC, check Spoonbill Software site run by Ian Humphreys. He also has some other Apple II conversions there, all for free.

Here's the URL: http://www.omninet.net.au/~irhumph

Barney

compiles and runs...
Compiling:Human.bmx
Compiling:Player.bmx
Compiling:AStarRunner.bmx
Compiling:Enemy.bmx
Compiling:LoderunnerBlockView.bmx
Compiling:Loderunner_new.bmx
Linking:Loderunner_new.debug
Executing:Loderunner_new.debug

when I hit space to start I get:

Unhandled Exception: Attempt to index array element beyond array length
DrawImage [$BMXPATH/mod/brl.mod/max2d.mod/max2d.bmx;263;2]
drawBlock [/Users/dave/Archives/loderunnergame/Loderunner/LoderunnerBlockView.bmx;165;3]
draw [/Users/dave/Archives/loderunnergame/Loderunner/LoderunnerBlockView.bmx;53;5]
circle [/Users/dave/Archives/loderunnergame/Loderunner/Loderunner_new.bmx;322;4]
circleIn [/Users/dave/Archives/loderunnergame/Loderunner/Loderunner_new.bmx;309;3]
run [/Users/dave/Archives/loderunnergame/Loderunner/Loderunner_new.bmx;93;3]
Loderunner_new [/Users/dave/Archives/loderunnergame/Loderunner/Loderunner_new.bmx;38;1]

didn't look into it, gotta go
[edit] reformatted this message slightly

Hmm, well that's in the block graphics loading call. Strange, because for the incbins to work the blocks should be there. I wonder if the Mac needs different paths and things for the executable? When you run it I assume it runs from that directory and not another one?

Cheers
Aaron

ok, I'm finding it difficult to figure this one out because the debugger isn't popping up. Anyone know how to put a stop in?

Anyway, the DrawImage is getting the index from _map.getMapBlock(x,y). it errors on what could be a random number or an address location?? I'd guess random, maybe the map is not getting filled right? The file is being found and read.

Aaron,
you have
Method _loadMap(mapNumber)
Assert(_map)

What does this Assert do? I was under the impression that you assert in BMax only works in an expression such as:

Assert alpha>=0 And alpha<=1 Else "Alpha value out of range"

dmaz: DebugStop will invoke the debugger.

great, i'll check that out now.

ok DebugStop just exits the program... help says
"If there is no debugger present, this command is ignored."

so I guess I don't have a debugger present? I was assuming the dubugger is part of BlitzMax...?

Hey,

It works!

Only one problem: The 'ReadFile()' functions in the main file need a 'littleendian::' in front of them, eg:

		Local file = ReadFile("littleendian::lvldat")

		If file = Null
			file = ReadFile("littleendian::"+rootPath + "lvldat")
		EndIf
		Assert file, "Error opening lvl.dat file"


But apart from that, sounds are OK, all looks honky dory.

This is another thing - like case sensitive file names under UNIX filesystems - I was unsure whether it was worth trying to automate. In the end, I couldn't really work out how - forcing a stream to be littleendian or bigendian by default seemed a bit heavy handed.

But these are the only 2 major cross platform issues that seem to arise. The solutions are pretty simple: Beware of cased file names (or even easier, stick to lowercase only!), and use "bigendian::" or "littleendian::" for all binary data streams - doesn't matter which, as long as its consistent.

A note about the debugger - it doesn't work (yet) in full screen. But you can use a graphics depth of '0' to force a debugger friendly windowed mode for development.

[edit]Killed your Loadmap report, dmaz - above should fix it[/edit]

dmaz.

Assert just throws a general exception if the expression inside it fails. It's a simplified form of the one you presented.

I'm starting to wonder if the problem is endianness. Can you try changing

Local file = ReadFile("lvldat")

To

Local file = ReadFile("littleendian::lvldat")


And see if that works...I'd imagine it will have some effect cause almost all file io with reads of non bytes will require this - an oversight on my part so far.

Thanks for the help
Aaron

Haha, looks like we posted at the same time Mark - glad to see it works now.

One thing, I've noticed, dunno if it's like this on the Mac, is that the iris in and out effects seem to flicker some of the background through, dunno if that's a bug, or a double buffer issue or what. No biggie tho, there are more pressing issues with it than that ;)

Aaron

OK, there is another version up there with the endianness in there.

Ok cool that work, the game runs fine.

The debugger works great also!

so then for situations like this would you do something along these lines?

?MacOS
Local file = ReadFile("littleendian::lvldat")

If file = Null
file = ReadFile(rootPath + "littleendian::lvldat")
EndIf
?Win32
Local file = ReadFile("bigendian::lvldat")

If file = Null
file = ReadFile(rootPath + "bigendian::lvldat")
EndIf
?

that works, is that the perfered way... adding linux of course


so then for situations like this would you do something along these lines?



No need for all the '?MacOS' stuff - just pick one and stick with it. All the '?' kludges are in the endianstream module: see mod/brl.mod/endianstream.mod/endianstream.bmx for the nitty gritty.

oh yeah, duh it's the file that matters. I should of got that. little slow today.

Thanks for your help dmaz. Glad to hear it's running OK - that was rather painless after all!

Cheers
Aaron

I have a couple of Qs:

Is PowerPC (MacOS / Linux) big or little endian?
Is X86 (Windows / Linux) big or little endian?

Does endian-ness in these cases apply to just the order of the bytes or the numbering of the bits within the bytes as well?

x86 are little endian.

most processors from motorola were/are big endian. the PowerPC was an Motorola/IBM design. And of course the old Amiga's were big endian as well.

Big endian is smarter and better ;) but I still like windows better.

Endianness just applies to byte ordering, not bit ordering.

Aaron

Am I the only one who has problems with this game? It runs fine, however after playing for a short time (at first I thought it was when climbing ladders, however it just happened when walking across the bottom platform) and program quits and I get OS X's "The application Loderunner_new.debug has unexpectedly quit."

That's the file I'm meant to run isn't it?

The game doesn't play for long - to give you an idea there is no way I could get above the 2nd platform in that time.

It's happened numerous times so it isn't a one off. I re-downloaded the code but it didn't change anything.

Any ideas? Fullscreen or windowed doesn't make a difference.

I love Loderunner so I hope to get this working. It looks great!

(OS X 10.3.6, Powerbook G4. I really need to put this in a sig.)

Hmm, that's really strange...

On the Mac, is there a way to run the program from some sort of command line, and when it quits see if any debug or such message was reported?

Maybe I need to buy a Mac - good excuse to...;)

Cheers
Aaron

I thought I had fixed it but was wrong. I tried running it directly from the HD not in any folders (other than Loadrunner). Probably not connected but that game gave me the longest playing time - but it still quit.

Note this is once again on a new install of your code and your module.

OS X has a crash log if that's what you mean, one moment...

The thing is, it isn't blitz handling an error and terminating it's the app just crashing. So I'm not sure how much help this would be.

===== Tue Dec 14 2004 ===== 11:57:35 Australia/Sydney =====
**********

Host Name:      Silver-Computer.local
Date/Time:      2004-12-14 11:59:51 +1100
OS Version:     10.3.6 (Build 7R28)
Report Version: 2

Command: Loderunner_new.debug
Path:    /Loderunner/Loderunner_new.debug.app/Contents/MacOS/Loderunner_new.debug
Version: ??? (???)
PID:     833
Thread:  0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000008

Thread 0 Crashed:
0   ???                       	0x00092f3c 0x1000 + 0x91f3c
1   ???                       	0x0000ddf4 0x1000 + 0xcdf4
2   ???                       	0x00006d88 0x1000 + 0x5d88
3   ???                       	0x000052b0 0x1000 + 0x42b0
4   ???                       	0x00002ab8 0x1000 + 0x1ab8
5   ???                       	0x000025d4 0x1000 + 0x15d4
6   dyld                      	0x8fe1a558 _dyld_start + 0x64

Thread 1:
0   libSystem.B.dylib         	0x900074c8 mach_msg_trap + 0x8
1   libSystem.B.dylib         	0x90007018 mach_msg + 0x38
2   com.apple.CoreFoundation  	0x90191708 __CFRunLoopRun + 0x350
3   com.apple.CoreFoundation  	0x90195e94 CFRunLoopRunSpecific + 0x148
4   com.apple.audio.CoreAudio 	0x90732f80 HALRunLoop::OwnThread(void*) + 0x104
5   com.apple.audio.CoreAudio 	0x907391e0 CAPThread::Entry(CAPThread*) + 0x30
6   libSystem.B.dylib         	0x900246e8 _pthread_body + 0x28

Thread 2:
0   libSystem.B.dylib         	0x90018be8 semaphore_timedwait_signal_trap + 0x8
1   libSystem.B.dylib         	0x9000e788 _pthread_cond_wait + 0x268
2   com.apple.audio.CoreAudio 	0x907244fc CAGuard::WaitFor(unsigned long long) + 0xdc
3   com.apple.audio.CoreAudio 	0x90724130 CAGuard::WaitUntil(unsigned long long) + 0x130
4   com.apple.audio.CoreAudio 	0x90722b20 HPIOThread::WorkLoop() + 0x358
5   com.apple.audio.CoreAudio 	0x9073919c HPIOThread::ThreadEntry(HPIOThread*) + 0x1c
6   com.apple.audio.CoreAudio 	0x907391e0 CAPThread::Entry(CAPThread*) + 0x30
7   libSystem.B.dylib         	0x900246e8 _pthread_body + 0x28

PPC Thread State:
  srr0: 0x00092f3c srr1: 0x0000f030                vrsave: 0x00000000
    cr: 0x84000424  xer: 0x00000000   lr: 0x00092e80  ctr: 0x00004c50
    r0: 0x00092e80   r1: 0xbffffb20   r2: 0x001b4c58   r3: 0x00190000
    r4: 0x001b0000   r5: 0x00004c50   r6: 0x00004c84   r7: 0x02903000
    r8: 0x0000003f   r9: 0x00000007  r10: 0x00004c58  r11: 0x001b751c
   r12: 0x000ec784  r13: 0x00000000  r14: 0x00000000  r15: 0x00000000
   r16: 0x00000000  r17: 0x00000000  r18: 0x00000000  r19: 0x00000000
   r20: 0x00000000  r21: 0x00000000  r22: 0x00000000  r23: 0x00000000
   r24: 0x00000000  r25: 0x00000000  r26: 0x019ea9e8  r27: 0x01802c30
   r28: 0x0196adb8  r29: 0x01802c30  r30: 0x01966f80  r31: 0x00000008

Binary Images Description:
    0x1000 -   0x133fff ??? 	/Loderunner/Loderunner_new.debug.app/Contents/MacOS/Loderunner_new.debug
  0x375000 -   0x375fff com.apple.aoa.halplugin 2.4.1	/System/Library/Extensions/IOAudioFamily.kext/Contents/PlugIns/AOAHALPlugin.bundle/Contents/MacOS/AOAHALPlugin
  0x5c5000 -   0x668fff com.apple.audio.units.Components 1.3.2	/System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio
  0x6ea000 -   0x726fff com.apple.iSightAudio 6.5.2	/Library/Audio/Plug-Ins/HAL/iSightAudio.plugin/Contents/MacOS/iSightAudio
  0x7a3000 -   0x7bcfff GLDriver 	/System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLDriver.bundle/GLDriver
  0x7dc000 -   0x7f6fff GLRendererFloat 	/System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLRendererFloat.bundle/GLRendererFloat
 0x160d000 -  0x1701fff GLEngine 	/System/Library/Frameworks/OpenGL.framework/Resources/GLEngine.bundle/GLEngine
 0x2807000 -  0x28e1fff ATIRadeon9700GLDriver 	/System/Library/Extensions/ATIRadeon9700GLDriver.bundle/Contents/MacOS/ATIRadeon9700GLDriver
0x833bb000 - 0x834acfff libGLProgrammability.dylib 	/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgrammability.dylib
0x88e60000 - 0x88e6cfff com.apple.agl 2.5 (AGL-2.5)	/System/Library/Frameworks/AGL.framework/Versions/A/AGL
0x8c270000 - 0x8c271fff libGLSystem.dylib 	/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLSystem.dylib
0x8fe00000 - 0x8fe4ffff dyld 	/usr/lib/dyld
0x90000000 - 0x90122fff libSystem.B.dylib 	/usr/lib/libSystem.B.dylib
0x90190000 - 0x9023dfff com.apple.CoreFoundation 6.3.5 (299.32)	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x90280000 - 0x904f9fff com.apple.CoreServices.CarbonCore 10.3.6 (10.3.5)	/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x90570000 - 0x905dffff com.apple.framework.IOKit 1.3.6 (???)	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x90610000 - 0x9069afff com.apple.CoreServices.OSServices 3.0.1	/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x90700000 - 0x90700fff com.apple.CoreServices 10.3 (???)	/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x90720000 - 0x90787fff com.apple.audio.CoreAudio 2.1.2	/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x907f0000 - 0x907f9fff com.apple.DiskArbitration 2.0.4	/System/Library/PrivateFrameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x90810000 - 0x90810fff com.apple.ApplicationServices 1.0 (???)	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x90830000 - 0x9089ffff libobjc.A.dylib 	/usr/lib/libobjc.A.dylib
0x90910000 - 0x90983fff com.apple.DesktopServices 1.2.2	/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x909f0000 - 0x90b4bfff com.apple.Foundation 6.3.5 (500.56)	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x90c30000 - 0x90c4afff libGL.dylib 	/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x90c60000 - 0x90cc2fff libGLU.dylib 	/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x90d00000 - 0x90d1bfff com.apple.SystemConfiguration 1.7.1 (???)	/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x90d40000 - 0x90d40fff com.apple.Carbon 10.3 (???)	/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x90d60000 - 0x90d6bfff com.apple.opengl 1.3.6	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x90ec0000 - 0x90ec0fff com.apple.Cocoa 6.3 (???)	/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
0x910b0000 - 0x91101fff com.apple.bom 1.2.5 (63.2)	/System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom
0x9110d000 - 0x91158fff libGLImage.dylib 	/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
0x912a0000 - 0x912bdfff com.apple.audio.SoundManager 3.8	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound
0x912e0000 - 0x912f7fff com.apple.LangAnalysis 1.5.4	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x91320000 - 0x913defff ColorSync 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x91460000 - 0x91473fff com.apple.speech.synthesis.framework 3.2	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x914a0000 - 0x91509fff com.apple.htmlrendering 1.1.2	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering
0x91560000 - 0x91619fff com.apple.QD 3.4.65 (???)	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x91670000 - 0x916a8fff com.apple.AE 1.4	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x916e0000 - 0x91773fff com.apple.print.framework.PrintCore 3.3	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x917e0000 - 0x917f0fff com.apple.speech.recognition.framework 3.3	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0x91810000 - 0x9182afff com.apple.openscripting 1.2.1 (???)	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
0x91850000 - 0x91860fff com.apple.ImageCapture 2.1.5	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
0x91890000 - 0x9189cfff com.apple.help 1.0.1	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
0x918c0000 - 0x918cdfff com.apple.CommonPanels 1.2.1 (1.0)	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
0x918f0000 - 0x9193efff com.apple.print.framework.Print 3.3	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
0x91990000 - 0x9199bfff com.apple.securityhi 1.2 (90)	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
0x919c0000 - 0x91a33fff com.apple.NavigationServices 3.3.2	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices
0x91a90000 - 0x91a90fff com.apple.audio.units.AudioUnit 1.3.2	/System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x91ab0000 - 0x91ac4fff libCGATS.A.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib
0x91ae0000 - 0x91aebfff libCSync.A.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
0x91b10000 - 0x91b2afff libPDFRIP.A.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libPDFRIP.A.dylib
0x91b50000 - 0x91b5ffff libPSRIP.A.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libPSRIP.A.dylib
0x91b80000 - 0x91b93fff libRIP.A.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
0x92070000 - 0x92096fff com.apple.FindByContent 1.4 (1.2)	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent
0x920c0000 - 0x922a7fff com.apple.security 2.4 (177)	/System/Library/Frameworks/Security.framework/Versions/A/Security
0x92430000 - 0x92468fff com.apple.LaunchServices 10.3.5 (98.4)	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x92740000 - 0x92777fff com.apple.CFNetwork 1.2.1 (7)	/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x927d0000 - 0x92b54fff com.apple.HIToolbox 1.3.5 (???)	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x92d30000 - 0x92d80fff com.apple.HIServices 1.4.1 (0.0.1d1)	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x92dc0000 - 0x932bffff com.apple.AppKit 6.3.5 (743.27)	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x935d0000 - 0x938a8fff com.apple.CoreGraphics 1.203.26 (???)	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x939a0000 - 0x939b4fff libcups.2.dylib 	/usr/lib/libcups.2.dylib
0x939d0000 - 0x939d4fff libmathCommon.A.dylib 	/usr/lib/system/libmathCommon.A.dylib
0x93b50000 - 0x93bf3fff com.apple.audio.toolbox.AudioToolbox 1.3.2	/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x94060000 - 0x94078fff com.apple.WebServices 1.1.1 (1.1.0)	/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore
0x945b0000 - 0x945b9fff libz.1.dylib 	/usr/lib/libz.1.dylib
0x94610000 - 0x9462afff libresolv.9.dylib 	/usr/lib/libresolv.9.dylib
0x94650000 - 0x946affff com.apple.SearchKit 1.0.2	/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x94a30000 - 0x94af5fff libxml2.2.dylib 	/usr/lib/libxml2.2.dylib
0x94b20000 - 0x94badfff com.apple.ink.framework 101.1.3 (55.10)	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x954c0000 - 0x95ac6fff libBLAS.dylib 	/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x95b20000 - 0x95df0fff libLAPACK.dylib 	/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x95e40000 - 0x95eadfff libvDSP.dylib 	/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x95f00000 - 0x95f20fff libvMisc.dylib 	/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x968d0000 - 0x969b2fff libicucore.A.dylib 	/usr/lib/libicucore.A.dylib
0x96a20000 - 0x96ae2fff libcrypto.0.9.7.dylib 	/usr/lib/libcrypto.0.9.7.dylib
0x96b40000 - 0x96b6efff libssl.0.9.7.dylib 	/usr/lib/libssl.0.9.7.dylib
0x96bf0000 - 0x96c7ffff ATS 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x96cb0000 - 0x96d9efff libiconv.2.dylib 	/usr/lib/libiconv.2.dylib
0x96e80000 - 0x96e90fff com.apple.vecLib 3.0.2 (vecLib 3.0.2)	/System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
0x97510000 - 0x97518fff libbsm.dylib 	/usr/lib/libbsm.dylib


Same thing happens with debug mode turned off. However - and I'm guessing this could be important - when I first tried to run it with debug mode off it wouldn't build saying this astar.a files weren't there.

I had run it with debug mode off before, so I'm not entirely sure why this install of the modules didn't make them.

So I turned off quick build and debug build and got the IDE to build the modules - which rebuilt all Max's modules and this time the .a files were there.

However it still crashes.

Me again.

I installed a fresh copy of blitz, fresh copy of your module and a fresh copy of your games code. Still crashes. I'm unsure what this could be on my end. Anyone have any suggestions?

If someone with a mac that it worked on hosted a compiled version, do you think that would tell us anything?

you know I get the same.... didn't play it long enough before.

Aaron,

Are you using any MemAlloc/Ptr stuff, or is it all 'strict Blitz'?

I don't get why files should open in different endianess on different platforms, I can't think of a single example where this would be useful other that it being somehow "politically correct" to make binary streams default to be incomaptible between platforms.

Enidox, can you try disabling all the sound routines? Also, any chance it could be a screensaver or someother background app launching during play?

Commented out all channel and sound references (including the variables so I don't think I missed any) and it made no difference.

Quit all other programs but Blitz IDE and that makes no difference.

Could be a background app...but I doubt it. Note that dmaz is having the same problem. Plus, even if it was a background app that doesn't change anything - other than help track down what causes this. I don't have a screensaver on and judging by the short about of time the game runs before quitting, it doubt anything has time to activate.

Ok,

I think its happening when a hole has just filled itself in - ie: disappeared.

Ok, just did further testing and it looks like array indices are *not* picked up in debug mode - very naughty!

This would suggest that you're drawing a hole with a frame number of -1 or something.

I just found that out too, but have been wondering why this doesn't happen on the PC.

It happens in LoderunnerBlockView.bmx in the draw method.

One moment...

That's it:

DrawImage _holeGraphics, _map.blockXToWorldX(hole._x) * _worldToViewScaleX + _offsetX, _map.blockYToWorldY(hole._y) * _worldToViewScaleY + _offsetY, hole.getAnimFrame()

hole.getAnimFrame() returns -1

[Edit]

I'm still wondering why this hasn't been picked up on PC...

If anyone REALLY wants to play loderunner (though I'm guessing it's just me), change the getAnimFrame method in Hole.bmx to:

Method getAnimFrame()
	If _animFrame<0
		Return 0
	Else
		Return _animFrame
	End If
End Method


Sure, it's cheep and may just be masking another problem but since it's not my code and it lets me play I'm happy.

Well thanks for debugging. Yeah Mark, strange it hasn't picked it up that's for sure!

I'll see if I can find where, logically it has gone wrong and fix it.

Thanks Enidox for all the effort!

Cheers
Aaron

OK, found a couple of obvious bugs, strange they never showed up in the PC version.

The timer that counted down the holes states, would get to -1 which means one more loop of the anim update! Also the countdown for the anim was counting down in bigger steps assuming one more frame of animation than there was!

Fixed now. Not uploaded yet as I want to fix a couple of other bugs.

OK, new version up at the link at the top.

Fixed a number of bugs causing the enemy to just stop working. There is still one lurking when enemies are stacked and fall together, especially when the bottom one falls in a hole. In this case the top one never gets to move again.

Aaron

This is a great recreation of a great game. The bugs from before are gone now.

One point, initially it wouldn't compile saying FontHeight() in your drawDebugInfo function didn't exist. I'm guessing the name of that function has changed to TextHeight() for the final mac release?

I still have a few apples lying around...this makes me want to go searching boxes for the LodeRunner disk. :)

Great work once again!

Thanks enidox - and thanks for the update on FontHeight - You're probably right about the command change.


Aaron