A Plumber's Journey Dev Blog

Posted by Gatete on Nov. 7, 2015, 12:40 p.m.

Three weeks ago I started working on another Mario fangame.

Here's the latest gif I took from the game.

Right now I have a problem that drives me nuts,

///Spiketop logic!

if (speed > 0) {

    if (xscale == 1) {

        //Check if there's no floor on the way.
        if (place_meeting(x + lengthdir_x(speed + 1,direction - 90),y + lengthdir_y(speed + 1,direction - 90),obj_solid) == false) {
        
            //Rotate
            direction -= 90;
            
            //Make sure it's all the way onto the next side before doing any collision checks.
            x += hspeed;
            y += vspeed;
            
            //Make contact with the new surface
            move_contact_object(direction - 90,speed,obj_solid);
        }
        
        //Otherwise, check if he ran into a wall.
        else if (place_meeting(x + lengthdir_x(speed,direction),y + lengthdir_y(speed,direction),obj_solid)) {
            
            //Rotate it so it's moving up the wall.
            direction += 90;
            
            //Make full contact with the wall.
            move_contact_object(direction - 90,speed,obj_solid);
        }
    }
    
    //Assuming that the spiny is moving left and on the ground,
    else if (xscale == -1) {
    
        //This checks *below* the spiny since you're double negating the direction... It's confusing but it works.
        if (place_meeting(x - lengthdir_x(speed - 1,direction + 90),y - lengthdir_y(speed - 1,direction + 90),obj_solid) == false) {
        
            //Rotate
            direction += 90;
            
            //Make sure it's all the way onto the next side before doing any collision checks.
            x -= hspeed;
            y -= vspeed;
            
            //Make contact with the new surface
            move_contact_object(direction + 90,speed,obj_solid);
        }
        
        //Otherwise, check if he ran into a wall.
        else if (place_meeting(x - lengthdir_x(speed ,direction),y - lengthdir_y(speed,direction),obj_solid)) {
            
            //Rotate it so it's moving up the wall.
            direction -= 90;
            
            //Make full contact with the wall.
            move_contact_object(direction + 90,speed,obj_solid);
        }
    }
}

PD: Are these kind of blog posts allowed?

Comments

Mairu 10 years, 10 months ago

Looks cool!

Quote:
Right now I have a problem that drives me nuts,
Is there something you need help with?

Gatete 10 years, 10 months ago

Actually, the code I posted in there.

See the spiketop at the right, I want it to turn like the spiketop at the left.

Gatete 10 years, 10 months ago

You just saved the day dude =3

NeutralReiddHotel 10 years, 10 months ago

i'm gonna play the hell out of this.

Phoebii 10 years, 10 months ago

Hehe, Mario, Pokemon, FNAF and other fangames are my mortal enemies.

They steal at least 50% of my players in all indie game sites.

Jani_Nykanen 10 years, 10 months ago

Quote:
Pretty sure 95% of us started out making fangames or clones so I can't blame them.
This reminds me of my early Crash Bandicoot -themed maze games I made ten years ago, when I was nine… Good memories.

Astryl 10 years, 10 months ago

I love the fact that you're using custom artwork for your fangame, makes it stand out quite a bit.

Quote:
Pretty sure 95% of us started out making fangames or clones so I can't blame them.
I still do now and again, quietly. It's nice to explore mechanics that your favorite games used by attempting to implement them.

Phoebii 10 years, 10 months ago

Quote:
Pretty sure 95% of us started out making fangames or clones so I can't blame them.
I didn't, so I can =P

Gatete 10 years, 10 months ago

Here's a playable engine test of the game if you want to take a look at it.

http://gatetegaming.weebly.com/games.html

Phoebii 10 years, 10 months ago

Quote:
Here's a playable engine test of the game if you want to take a look at it.
Looks good and plays good. I died over 20 times through!

Too many of these so-called goombas.