7 months ago

I've been having a mess around with how Paths work in Game Maker and I don't think I'm going to be able to do Minetracks very easily. At least not ones you can place yourself.


It's all fine having a start point and an end point, but adding a new point in the middle doesn't seem to be possible without having more information about what the player is trying to do.

I can add new points to the end easy enough.

But adding a new point causes any object moving along the path to jump slightly, since it's position is relative to the path length.

minecart_paths.gif

You can add points before an existing point, but I don't think I can calculate what that point is based on new point location alone?
I'd have to do some sort of check for nearest point?

Hmm

Here I'm running through all the points in the path, if it finds a point closer to the mouse click it will insert the new point before it.

minecart_paths2.gif

This works, but you can't place a point before the first point, and placing one too close to the last point reorders the whole path

minecart_paths3.gif

I think I might have to use a conveyor belt method instead, where you place objects or assign grid values as track and direction and touching them pushes you in that direction?

You'd continue to move in that direction until you hit a stop block, or a different direction block.
To save objects I'd have to check adjacent sides for existing ones that would move you in the same direction. Although Grid method would avoid that I think.

pokemon_spin_kanye.gif


2 comments

Loading...

Next up

Don't have any gameDev to show yet so here's some of my recent Pokemon Card pulls!

YUS!!

I hope you're all having a great weekend!

Woop!

Madeline is the main protagonist of the mountain climbing platformer, Celeste. The game has been praised for its visuals, gameplay, and introspective narrative. The game's creator Maddy Thorson confirmed that Madeline is trans in 2020.

Woop woop!

#pridejolt

Happy Video Game Day!

July 8 is Video Game Day, a holiday that's obviously close to our hearts at Game Jolt.

Celebrate by completing our quests! They won't be around long, so get the rewards while you can.

I...I think the Fish Pond is working...

It's not as good as when the player fishes, but NPC's can now fish in Fishponds. I need to set up some more variables to get the bobber to bob and to let them be able to cast the line.

Also animate the water...maybe add shader?

That's tomorrows job.

@ryon is a Jolter to Watch, game dev, programmer, and artist who worked on Five Nights at Friedrich's! Follow @ryon before the quest ends on July 15 and you'll get Coins!

Charged Sticker Supporter Shrine for June!

LOOL Look at how slow these gifs are!

This tablet really is rubbish

Thank you all for the support, it really helps me out a lot! And a special thanks to @MomentaryUnicorn for the kofi!