PDA

View Full Version : Weapons of War (Game Maker)



cairnswm
19-08-2007, 08:41 PM
One of my favorite themes to use as a learning game in my Weapons of War game. Known also be lots of other names (such as JawBreaker on PDA and Magic Potions (that I made) for Cell phones).

After having done a couple of articles for the DevMag on Game Maker I decided I better do something in it :) So I sat down and wrote Weapons of War once again in game maker.

The executable can be found here: http://www.gamedev.za.net/filecloset/data/files/159/WeaponsOfWar.zip

The source version can be found here: http://www.gamedev.za.net/filecloset/data/files/160/WeaponsOfWarGM6.zip

I have done this game ion as close to the same way as I would have done it in Delphi. in other words I havn't used the standard actions that Game Maker has but instead have done everything in GML instead. This raised some interesting challenges as in many cases I would have prefered extending the functionality of an object rather than developing external scripts. But using the external scripts has worked quite well using some global arrays.

Let me know what you think. Especially if you take a look at the source code and have some comments on the way I used GML and scripts in the game.

PS. Thanks for FileCloset!

cairnswm
19-08-2007, 08:44 PM
Oh I should have added that the complete game took less than 10 hours of work. Fortunatly I had most of the graphics ready from the Delphi version.

Problem: I have a problem how the Button sprite is drawn. It seems to draw the first 64 pixels right, but then stretches the rest to the full size of the image. Anyone know what causes this?

Tr00jg
19-08-2007, 09:25 PM
Ummm... Perhaps I'm doing something wrong here, but can you explain more about the game please? Whenever I left-click I get an insta-gameover.

kurtkz
20-08-2007, 11:07 AM
Works just fine for me. Interesting test of GM's capabilities. How would you rate the flexibility of GM's scripting language?

dislekcia
20-08-2007, 12:28 PM
I don't understand why you had to do everything in non-object-related scripts... Surely you could just use the Execute Code action in specific object events? That's what I do all the time to maintain OO.

Also, scripts run in the scope of the object that called them, so you could call certain scripts from certain control objects using that object as data storage or for state information, etc.

-D

Nandrew
20-08-2007, 03:46 PM
What dis said. :P Which, of course, affords me extra intelligence without having to actually prove it through words.

Also, cairnswm, it never ceases to amaze me how well you do with such simple concepts. :)

Cyberninja
20-08-2007, 06:45 PM
Very cool. :-) I encountered two errors though.

-On the main menu screen: the cursor moves beneath the credit button instead of above it.
-During the game: When you click the background it gives a "global mouse event error"

That's about it.

cairnswm
20-08-2007, 07:38 PM
New Version: :)
The executable can be found here: http://www.gamedev.za.net/filecloset/data/files/159/WeaponsOfWar.zip

The source version can be found here: http://www.gamedev.za.net/filecloset/data/files/160/WeaponsOfWarGM6.zip

@cyberninja - fixed those two bugs and added a Help screen (very basic though)
@dislekcia - thinking about what you said.... will comment later.
@tr00j - think your error was one cyberninja found
@kurtkz - pretty good actually - couple of really irritating things like no proper function definitions and I'm struggling to do proper inheritance (like calling the parents event as well as the childs event)
@nandrew - I only do simple :P

Tr00jg
20-08-2007, 07:45 PM
Ah it works now! Was there a menu in the previous version? The one I played in the beginning did not have a menu... Weird.

@cairnswm: Referring to your proper inheritance problem. There is function to call the parent event, and there is also a function to call any particular event. Wouldnt that solve your inheritance problemo?

DrDeth
28-08-2007, 09:12 AM
There seems to be a problem with GameMaker and Vista... I cant get Weapons of War or RoachToaster to run.

Funny, because Monochrone and Deathbringer work just fine? Maybe a version difference?

dislekcia
28-08-2007, 02:28 PM
There seems to be a problem with GameMaker and Vista... I cant get Weapons of War or RoachToaster to run.

Funny, because Monochrone and Deathbringer work just fine? Maybe a version difference?

Yup. GM6.1 and Vista don't get along, GM7 works just fine though. I moved Monochrome over to GM7 a few months ago after I got emails asking me to.

There was an app floating around that makes GM6.1 exes work on Vista, should still be in one of these threads somewhere - do a search on Vista and GM6 ;)

-D

Thaumaturge
28-08-2007, 09:08 PM
This is a fun little game, Cairnswm! ^_^

It's a good implementation of the game type - well done. ^_^

EyeBall
02-09-2007, 11:39 PM
Well done M8

Love your work.

You can come around and visit http://www.blender.org

It's the best cheapest thing for doing games practically on your own.

You wont ever find a bad chirp from me, just keep going!

You can look at my 3D demos here http://www.nicholasnel.com

Thanks, gr8 stuff

Nicholas Nel