#(3D) Trying to make a 2/Multiple Plane Platformer

51 messages · Page 1 of 1 (latest)

plush bridge
#

Hello, As you may know, I am trying to make a 2.5D Platform Shooter, and I wish to add to my game a system for multiple Planes (Like in Virtual Boy Wario Land, or Kirby Triple Deluxe) and I tried to make a 2nd plane, and with the Actual Collision system, I am struggling, Here's how the collision works


walk = accel_final * last_h

vsp = vsp + grv;

if (place_meeting(x,y+1,obj_wall_parent)) && (key_jump)
{
    vsp = jumpheight;
    
    
}    

if (vsp < 0) && (!key_jump_held) vsp = max(vsp,vsp*0.85)

//H Collision
if (place_meeting(x+hsp,y,obj_wall_parent))
{
    yplus = 0;
    while (place_meeting(x+hsp,y-yplus,obj_wall_parent) && yplus <= abs((walksp/walksp)*(walksp+1))) yplus += 1;
    if place_meeting(x+hsp,y-yplus,obj_wall_parent)
    {
        while (!place_meeting(x+sign(hsp),y,obj_wall_parent)) x+=sign(hsp);
        hsp = 0;
    }
    else
    {
        y -= yplus
    }
}
x += hsp;

// Downward slopes
if !place_meeting(x,y,obj_wall_parent) && vsp >= 0 && place_meeting(x,y+2+abs((walksp+1)*(walksp/walksp)),obj_wall_parent)
{while(!place_meeting(x,y+1,obj_wall_parent)) {y += 1;}}

//v Collision
if (place_meeting(x,y+vsp,obj_wall_parent)) 
{
    while (!place_meeting(x,y+sign(vsp),obj_wall_parent))
    {
        y =  y+ sign(vsp);
    }    
    vsp = 0;
    }
y = y + vsp;

And here's how my game looks like in the shape of a video, so if any of you could help me, please let me know.

#

(3D) Trying to make a 2/Multiple Plane Platformer

wintry garden
#

there's probably way more efficient ways but that's the best i can think of

plush bridge
#

Thanks, I'll try this out

plush bridge
wintry garden
#

Also yeah list does need 5

#

If you middle click the function you can see an example of it

plush bridge
#

Sorry, I got busy with other projects

wintry garden
#

Yeah relatable

plush bridge
#

Also, what's the 4th argument (AKA, a List)

wintry garden
#

Lists are kinda like arrays but uh different

plush bridge
#

Okay

#

But why would you need an array/list for collisions?

wintry garden
plush bridge
#

I see

#

Though I'm not very confident if this will mess up the pure 2D part or not

#

I'll go check if anyone else could help

wintry garden
#

I don't see how it would

plush bridge
#

I don't know? Slow the game down?

#

because of how many lists to take care of?

wintry garden
#

Yeah it could but I don't think it would slow it that m7ch down

wintry garden
plush bridge
#

Okay

wintry garden
#

(Also remember to destroy the list after its done

#

Otherwise it stays in memory I think

plush bridge
#

I see

plush bridge
plush bridge
#

Oh and also, there's one last thing

#

One thing that is also very important

#

When the player moves from the foreground plane to the background plane, their sprite (and so would be whatever is in the background Plane) would need to be hidden or behind (I don't know what word to say) the Foreground plane and whatever is in between

#

If you cannot help me with that last one, It's okay, I'll eventually find someone else

#

asking this because, I have way too many layers to duplicate them one by one

wintry garden
plush bridge
#

I thought I'd have to create duplicate layers 😓

#

Though I'll try it once I figure out how to use the Instance place list thing

plush bridge
#

(also, what does the Ordered part do?)

#

(should I put it on true or false?)

plush bridge
#

@wintry garden (Sorry for ping)

wintry garden
plush bridge
#

Oh okay

plush bridge
#

Oh dear... I think I forgot about this one

#

It's been so long since I asked that

#

I was keen on other Projects

plush bridge
#

I guess I could Revive this Forum and hopefully someone else can help me?

#

Just to see if there's a simpler way to solve the issue

wintry garden
#

are you still having the same issue?

plush bridge
#

I am not sure about trying the Instance place list method