Game Maker's Garage Forum

Game Creation => Other Languages & Tools => Topic started by: jeremymaharg on February 20, 2008, 06:18:05 PM

Title: PMO! engine source code (METAL)
Post by: jeremymaharg on February 20, 2008, 06:18:05 PM
Hello! First post...

Anyway, I figured I'd make my first post include something, so here's the code to the "engine" of my PMO! game made in METAL...

Code: [Select]

]rsrcmerge "resources.rsrc" : ' Load resource files

DISABLE DONE

REM Starting Settings
BACKCOLOR 65535,65535,65535
FORECOLOR 0,0,0
CLS
init sound
resize console 150,150,400,320 : ' Remove if using FULLSCREEN MODE
load pict rsrc 128 : ' Load and display target image

REPEAT

IF button = -1 THEN
GETMOUSEXY mx,my

play rsrc 128 : ' Play shooting sound

REM Draw bulletholes
FORECOLOR 21845,21845,21845
FCIRCLE mx,my,5
FORECOLOR 16383,16383,16383
FCIRCLE mx,my,4
FORECOLOR 0,0,0
FCIRCLE mx,my,2
REM End draw bulletholes

hits = hits + 1
WAIT BUTTON UP
END IF

KEYMAP SCAN

IF KEYMAP KEY (" ") THEN
CLS
load pict rsrc 128
hits = 0
WAIT 0.3
END IF

UNTIL KEYMAP KEY ("q")

All I ask is that "uses the PMO! engine by Jeremymaharg Software" appears somewhere in the app's README file if you use this in something...

EDIT:
Here's some code for rendering paintball splats instead of bulletholes. Place this in between the "REM Draw Bulletholes" and "REM END Draw Bulletholes" lines, replacing the stuff already there:

Code: [Select]
mz = my + rnd*15
FORECOLOR rnd*65535,rnd*65535,rnd*65535
FCIRCLE mx,my,5
line mx,my,mx,mz
Title: Re: PMO! engine source code (METAL)
Post by: EqwanoX on February 23, 2008, 07:41:03 AM
wtf is this? and who cares about metal, wasnt that discontinued years ago? i dont even think it was finished and ive only heard negative things about it
Title: Re: PMO! engine source code (METAL)
Post by: GMG Tim on February 23, 2008, 02:18:20 PM
Quote
wtf is this? and who cares about metal, wasnt that discontinued years ago? i dont even think it was finished and ive only heard negative things about it

METAL is actually a great stepping stone to other languages. It's not discontinued, I'm pretty sure the developer still provides periodic updates. Thanks for the sample code!

http://www.iit.edu/~sarimar/GDS/metal.html

- ghost

EDIT: Please be more constructive in the future. Your post doesn't add anything to the conversation-- you have been warned.