5 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

Oh gosh

✨️shiny✨️

Noooo I'm not ready for April to end!!

Bumping March's Game Dev Progress Post because Aprils isn't ready yet!

https://gamejolt.com/p/atbalmut-goth-gobo-gamedev-progress-post-…

Thanks for all the support and interest, I really appreciate it!

Last week at LVL UP EXPO, we celebrated great games made by Jolters including Baldi's Basics Plus by @BasicallyGames !

Buy it on Game Jolt: https://gamejolt.com/games/baldis-basics-plus/481026

Thanks to Razer for providing the laptops and peripherals!

Oh gosh, I got a new subscriber on Kofi!

Thank you so much Short Stack, your support really helps me out a lot!!

I hope you have a wonderful day, please look after yourself and keep being awesome!💚

https://ko-fi.com/balmut

Last week at LVL UP EXPO, Game Jolt celebrated great games made by Jolters including The Bunny Graveyard by @ElPichon !

Learn about the game: https://gamejolt.com/games/thebunnygraveyard/651214

Thanks to Razer for providing the laptops and peripherals!

Nee card packs dropped!

Here's what I've got so far!

SO incredibly lucky to get Solgaleo this early!

Tomorrow is Dynamax Water Doggo Day...

I hope I can catch a couple!

Quests inspired by @WhitethornGames ' Spray Paint Simulator entered your quest log!

Bring color to the world! Restore worn-out surfaces with a fresh coat of paint & watch them come back to life.

Play the free demo to get started: https://bit.ly/spraypaintsimdemo

Reworked how NPC's find their Points of Interest and interact with them, here's the Archaeologist investigating the Ruins.