Rocket Jumping Tutorial Project

Discussion in 'Tutorials' started by tagwolf, Aug 5, 2019.

  1. tagwolf

    tagwolf Member

    Aug 6, 2016
    GM Version: GMS2.X
    Target Platform: ALL
    Links: N/A

    Rocket jumping, perfect platformer controls, and custom particle effects!

    Here's a prototype I was working on. It uses my "True Perfect Platformer Movement Controls" from my other tutorial with !!!ROCKET JUMPING!!! added onto it. :)

    Controls are WASD and mouse. (alt controls too and easy to change)

    There's also some "bad ass" custom particle effects thrown in there too that might be of some help to someone out there.

    Make something awesome with it and as always...Enjoy!

    Most of the rocket jump logic happens in the player but is trigger by a rocket explosion. See the project to see how it all works together.


    player jump snippet. Download full project.
    // Perform a rocket jump
    if rocket_jump {
       rocket = instance_nearest(x, y, obj_Rocket)
       hspeed += lengthdir_x(rocket.rocket_power, explosion_direction);
       vspeed += lengthdir_y(rocket.rocket_power, explosion_direction);
       rocket_jump = false;
       with(rocket) {
    rocket create and step
    // Rocket Vars
    rocket_power = 8;
    rocket_radius = 32;
    rocket_range = 128; // Distance before exploding without collision
    rocket_speed = 10; // todo: add delay to engines and speed up to max
    // Guidance
    distance_travelled = 0;
    rocket_explosion = 0;
    target_x = mouse_x;
    target_y = mouse_y;
    direction = point_direction(x, y, target_x, target_y);
    image_angle = direction;
    speed = rocket_speed;
    // Propellant Particles
    flame_particle_rate = 1;
    alarm[0] = flame_particle_rate;

    if (distance_travelled >= rocket_range) || place_meeting(x, y, obj_Block)
       rocket_explosion = true;
           instance_create_layer(x, y, layer, obj_Particle)
    if rocket_explosion
       if collision_circle(x, y, rocket_radius, obj_Player, false, true)
           obj_Player.explosion_direction = point_direction(x, y, obj_Player.x, obj_Player.y);
           obj_Player.rocket_jump = true;
       } else {
           // Since player won't destroy

    Last edited: Aug 5, 2019

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice