4 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

GameDev Progress Post for March!

Happy April everyone! I hope you're all doing well!

Oh gosh! Shiny Charmander card!?

Whats your most recent Shiny Pokemon? (any source) I just caught this fish. I though it's shiny was red for some reason?

We've updated the trending section of the Game Jolt Shop! http://gamejolt.com/#shop

Snag a new avatar frame and a sticker pack or two!

Remember, every purchase supports our creators and our community!

Support creators, shop on Game Jolt! #broadcast

Goblin GameDev Progress Post is up for March!

I hope you're doing well! https://www.patreon.com/posts/123891182

Thanks for the support everyone, it really helps me out a lot!

Keep being awesome!

(will do the GameJolt version as soon as I have a chance to fix gifs!)

This week's Fan Art Friday celebrates #CronosNewDawn

Accept the quest in your quest log to get started.

GJ Pro-Tip: Not sure what to make? Check out the game's Steam page for inspo: https://bit.ly/cronos-steam

Adding Cat/Mouse ears to portraits was the greatest idea I've ever had.

LOOK AT HOW CUTE THEY ARE.

If I ever find the time I'll animate them..

I'm a bit late on this but I want to thank everyone for their support last month, you're all amazing and I really can't express how much you all help me out.

I wish you all the best, please stay safe and keep being your amazing selves. Thank you.

@LUKELCS is a Jolter to Watch and an aspiring developer, artist, composer, and comedian! Follow @LUKELCS before the quest ends on April 22 and you'll get Coins!

Happy Trans Visibility Day everyone!

I hope you all have a wonderful day!

I made this gif for today, but I feel weird putting it in the shop (I will if enough want) so it's here.

Please stay safe, please look after yourselves and keep being awesome!