Topic:   PMO! engine source code (METAL)   (Read 7274 times)


0 Members and 1 Guest are viewing this topic.

jeremymaharg


  • GMG Newbie

  • *


  • Posts: 52

  • Jeremymaharg Software
PMO! engine source code (METAL)
« 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
« Last Edit: March 01, 2008, 03:43:03 PM by jeremymaharg »
[url=http://

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: PMO! engine source code (METAL)
« Reply #1 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

GMG Tim


  • Administrator

  • GMG-er

  • *****


  • Posts: 465
Re: PMO! engine source code (METAL)
« Reply #2 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.
« Last Edit: February 24, 2008, 06:12:06 PM by admin »