Making a simple zombie game

S

str3

Guest
I want to make a very simple zombie game. In the game you are basically a person in the middle of the screen, and zombies spawn to the left and right. You have a gun or some sort of weapon that you can kill the zombies with. Are there any tutorials that can help me with this, or do any of you have some advise as to how I can learn to do this. I have watched a few videos on the basics of GM. Also, don't know if this is in the right forum, so sorry if its not.

Any advice will help, thanks!
 
A

Aura

Guest
Ah, that's a very broad question. ^^'

Sadly we can't instruct you how to code a complete game anyway. Maybe begin with learning how GameMaker and GML work?

http://docs.yoyogames.com

Slowly learn how instances, events, views, basic functions and variables work then you should be able to code one yourself. This place has some good tutorials:

http://gmc.yoyogames.com/index.php?showforum=28

...that teach you how to implement certain game mechanics. But they won't teach you how to create a game exactly how you want it to be, so prepare yourself for that.
 

NazGhuL

NazTaiL
Look in the tutorial of Gm itself.
There is the exact game you're talking about.
It's the Surface_Part1 tutorial. Well explains.
 

Genetix

Member
Have to break it down into a list of steps - every mechanic and feature you want in the game. We can help from there, for example the mechanic of having the player shoot their weapon.

We can break that down into a number of steps and figure out how to program it, depending on how it should work. Glad to help out if more details are given!
 
S

str3

Guest
Have to break it down into a list of steps - every mechanic and feature you want in the game. We can help from there, for example the mechanic of having the player shoot their weapon.

We can break that down into a number of steps and figure out how to program it, depending on how it should work. Glad to help out if more details are given!
So I am pretty new to Game Maker but I do not alot of the basics and fundamentals. Right now I have a background with a character that moves around and is animated. I also have walls that the character cant go through. For what I want to do next ill make a list of what I want done, and if you have any tutorials or advice of how to do any of them that would be great.

1. Make a zombie character that is animated
2. Make the zombie chase my character
3. Make the zombie do damage to my character
4. Make the character do damage to the zombie
5. Have the zombies keep spawning
6. How to make more zombies spawn as time progresses

There are tons of other things I want to work on, but this is what I want to get done atm. If you have any tips or tutorials how to do these that would be great.
 
D

DyingSilence

Guest
My advices:

1. Have some images in the sprite, it will become animation. Assign it as the main sprite of the zombie. It's the easiest way, but it's far from good.
2. The best way is to use "step torwards" command block in Drag'n'Drop or the function which does that; put it in the ste event of zombie object
3. Your character has to have the health variable. There's built in one called "health" (what kind of magic is that :D). Then the easy way is to make collision event with zombie which makes the health to be relatively set to -5 or so
4. Unless you are using meele weapons, the easiest way is to have a bullet object, which on create event points torwards the mouse pointer and has speed set also in this direction. There are blocky functions for that, but you can also code it. The shooting can be achieved i many, many aproaches, i recommend this: create a variable CanShoot equal to 1 on the Create Event. Make the global mouse left pressed event, on which if CanShoot is 1, the bullet is created (and it's code makes it fired), CanShoot is set to 0, and one of the Alarms is set to some value, let's say 15. Then, on that's alarms event, make CanShoot to be 1 again.
5. The easy way to do this is to do Destroy event for zombies in which they will create new instances, for example in coords x=-32, y=random(room_height). This will make them spawn only from the left, but it can be upgraded with moderate effort
6. Make something like the main control object that just sits in the room and doesn't have a sprite. If you're going to use spawining mechanic from above, then you'll have enough zombies, and to slowly increase their number, just make an instance randomly pop now and then using alarms for example

Ask anything if you need.
There will be potentially many problems you've overlooked, but i won't spoil you the fun of learning the hard way ;)
 
Top