11 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

Too spooky!

My mam gave me her old laptop, once ive finished setting it up ill get the thanks sent out!

Got it partitioned and just setting windows and possibly Linux, given everything Microsoft is doing I think now is a good time.

Thank you for your patience

3 new card packs! 1 pull of each!

Doki Doki Literature Club is celebrating Monika's birthday and the 8th anniversary of DDLC with exclusive stickers, avatar frames and backgrounds on Game Jolt! 

Head over to the shop to collect yours 👉 https://gamejolt.com/#shop

Ok, @gamejolt somethings definitely up with quests looking at the 4/7 that means I was right and my quests didn't reset yesterday.

Previous post: https://gamejolt.com/p/has-atgamejolt-gj-jolt-changed-when-your-…

Dive into the cozy post-apocalyptic open world of Critter Cove!

Gentleman Rat Studios (@GR-Rob ) describe it as “a little bit Animal Crossing, a little bit Stardew Valley. Maybe even a little bit Windwaker, too."

Wishlist the game: https://bit.ly/CritterCove

That sucks. I spent ages reworking the draw world code to make it better and it made everything slower

Guess drawing and storing the whole land, then only drawing part of it to the screen, is better than generating only part and drawing it constantly.

Still like 200 cards i need so i did another 10 pull and got nothing fancy that I didnt already have

Mae Borowski is the main character of Night in the Woods! It's an adventure game that tells the story of her return to her hometown of Possum Springs. She was confirmed as canonically pan in a social media post by the game's creator Scott Benson.

HMM! Well I think I've made it better? Framerate seems more stable on this poor laptop?

Not bad for built in graphics.