Jump to content


Photo
- - - - -

Platform Shooter Tutorial + Example


  • Please log in to reply
13 replies to this topic

#1 Radnom

Radnom

    Burninator

  • GMC Member
  • 776 posts
  • Version:GM:Studio

Posted 16 April 2006 - 12:16 PM

Download

Platform Shooter Tutorial
-By Radnom Games
Version 1.0.0

Title: Platform Shooter Tutorial
Category: Tutorial + Example
Description: How to make a platform shooter game from scratch
Size: 15 kb, zipped
Contains:
-Platform Shooter1.gm6
-Platform Shooter Tutorial1.rtf
Version: GM6+
Registered?: Yes


Contains an in-depth tutorial on how to make the basics of a side-scrolling platform shooter. I have tried to comment every detail as best I can.

Features:
Grabbing on to objects
Variable jumping (and how to remove it)
Easily modifiable acceleration and deceleration
Booklet think that describes what we are doing at each step
Simple code that beginners could probably understand (if they tried)
Aiming and shooting towards the mouse


Please give credit to Radnom Games if used.
  • 1

#2 wingedwolf

wingedwolf

    GMC Member

  • New Member
  • 597 posts

Posted 26 April 2006 - 05:52 PM

its GOOD and COOL bout it needs more help with jumping and other things.
and i fixed the hand wierd moving. :unsure:
  • 0

#3 rougegamer

rougegamer

    GMC Member

  • New Member
  • 13 posts

Posted 05 June 2006 - 03:12 AM

dude for some reason my gamemaker doesnt recognize the "grab variable..
  • 0

#4 Mart00n

Mart00n

    GMC Member

  • New Member
  • 3 posts

Posted 12 June 2006 - 05:37 PM

There's a problem. When I jump while facing left without moving, the player sprite faces right. I looked through the code and can't seem to find the source of the problem though... Anyways, great example. I've been trying to make a game like this for a while and this really helps, especially the use of the grab variable.
  • 0

#5 Greenly

Greenly

    GMC Member

  • New Member
  • 2 posts

Posted 04 October 2010 - 01:21 PM

how do you fix it so when your facing either right or left you can only aim your gun to a certain angle otherwise you have to turn left and then move the gun if you get me ? cheerssss buddzzz
  • 0

#6 FRIDG3

FRIDG3

    GMC Member

  • New Member
  • 275 posts

Posted 07 October 2010 - 10:09 PM

You do realize this is from 4 years ago?
  • 0

#7 Mark Ian

Mark Ian

    GMC Member

  • GMC Member
  • 134 posts
  • Version:Unknown

Posted 14 October 2010 - 03:19 AM

holy crap, I still remember when this engine came out!!! This is a great engine, I used to create a game based on germanys loss to the Italians back in 2006. Lol that was a long time ago... respect for resurrecting this topic whoever you are! (Great timing too, didnt use gm for about 6 months now)
  • 0

#8 Mark Ian

Mark Ian

    GMC Member

  • GMC Member
  • 134 posts
  • Version:Unknown

Posted 14 October 2010 - 03:19 AM

sorry for double post, my bad.

You could solve the angle problem with a variable tied to the direction the character is facing: vdir.
If vdir=1 {
if mouseangle>90 && mouseangle<180 {armangle=90};
if mouseangle<270 && mouseangle>180 {armangle=270}}
If vdir=0 {
if mouseangle<90 && mouseangle>0 {armangle=90};
if mouseangle>270 && mouseangle<360 {armangle=270}
}
while mouseangle is the angle between character and mouse, armangle is the angle at which the arm is pointing and vdir is the direction of the character, 1=right; 2=left

Edited by Mark Ian, 14 October 2010 - 03:30 AM.

  • 0

#9 MorganVogel

MorganVogel

    GMC Member

  • New Member
  • 110 posts

Posted 09 June 2011 - 07:24 PM

OMG! Just what I needed! Im going to credit you definitively!;)
  • 0

#10 warbo201

warbo201

    GMC Member

  • GMC Member
  • 209 posts
  • Version:Unknown

Posted 31 July 2012 - 06:56 PM

[code=auto:0][/code]

sorry for double post, my bad.

You could solve the angle problem with a variable tied to the direction the character is facing: vdir.

If vdir=1 {
if mouseangle>90 && mouseangle<180 {armangle=90};
if mouseangle<270 && mouseangle>180 {armangle=270}}
If vdir=0 {
if mouseangle<90 && mouseangle>0 {armangle=90};
if mouseangle>270 && mouseangle<360 {armangle=270}
}
while mouseangle is the angle between character and mouse, armangle is the angle at which the arm is pointing and vdir is the direction of the character, 1=right; 2=left



Firstly sorry for the slight grave dig!!! but thought it may help others with what i want to post since i found this and the above code was slightly bugged, for anyone that wants to add the above just add
/Makes the arm stop at Head/Toe 
//Right Side
if dir=1 //Direction of player
{
if aim> 70 && aim< 180 //Aim angles 
{
    aim=70 //stops the gun at head height
    gunyscale=1 //keeps the gun the right way up!
}
if aim< 310 && aim> 180 
{
    aim=310 //stops the gun at the toes/shin
    gunyscale=1
}}

//Left side
if dir=0 
{
if aim< 120 && aim> 0 
{
    aim=120
    gunyscale=-1
}
if aim> 240 && aim< 360 
{
   aim=240
   gunyscale=-1
}}

Once again sorry for the bump/dig /we!
  • 0

#11 blinx

blinx

    GMC Member

  • New Member
  • 1 posts
  • Version:GM8.1

Posted 10 September 2012 - 03:56 AM

IT IS AWESOME...

BUT I HAVE A LITTLE PROBLEM WITH THE OBJECT O_BULLET'S DRAW, SAYS:

ERROR in
action number 1
of Draw Event
for object o_bullet:

Error in code at line 1:
draw_set_blend_mode(bm_add); //Changes the blend mode to 'add'
^
at position 1: This function is not available in the Lite Edition.

SO IF I'M USING THE LITE EDITION I WONT TEST IT CORRECTLY???
OR THERE'S ANY PROBLEM WITH THE SCRIPT
  • -1

#12 Terbins

Terbins

    GMC Member

  • GMC Member
  • 2 posts
  • Version:GM7

Posted 01 December 2012 - 04:11 PM

This is awsome!

And I learned something quite useful from this, thank you very much.
  • 1

#13 JusticeDude

JusticeDude

    GMC Member

  • GMC Member
  • 17 posts
  • Version:GM:Studio

Posted 03 December 2012 - 09:47 PM

It may be old... but I like it!
  • 0

#14 MikeDark_x

MikeDark_x

    The Shadow Angel

  • GMC Member
  • 413 posts
  • Version:Unknown

Posted 26 December 2012 - 07:48 PM

This is exelent no matter how many time ago it was posted its really good
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users