Fangames > Game Design
Flexible moving platform
Cantavanda:
Hello there, since the birth of IWBTG engines, starting with Tijit's engine, I have been very dissapointed by the moving platform code. That complicated weird small unflexible heap of characters.
That one weird code made it's way in EVERY other engine in existence, including the Yuuutu and YoYoYo editions.
I am looking, and even ready to pay for a code, an edit of the player/platform collision code, that is very flexible, so the platform can follow paths, and go in all directions, without any studdering, or clipping, flawlessly.
If you have the skills to program it, and want to discuss it, and want some MONEY, then feel free to reply to this, or PM me.
And if it already exist, could you please post it as a reply?
Thank you!
klazen108:
So I gave it a shot, and got something going reasonably well in Yoyo's studio engine. I threw this together really quick, it's not finished yet but it's 1:30 am and I'm going to bed so I thought I'd just post it here to share :Kappa:
This demo has moving platforms vertical, horizontal, and diagonal, as well as platforms moving on a path (and theoretically any other method you can think of). They seem to handle just like ordinary platforms too, but we all know I'm no good at replicating fangame physics so take that with a grain of salt.
It looks like path movement and hspeed/vspeed movement is handled at different points internally in the game maker engine, so there's some incompatibilities there causing the code to not be simple. I might fix this by just removing the hspeed/vspeed part and moving manually, or manually do the path stuff, not sure, just thoughts as the sleepiness takes over. Anywayyyy here's the link if you want to look
Warning I broke non-moving platforms so you're going to drop to your death as soon as you spawn ingame if you don't put some blocks under you. Already uploaded the project and don't feel like fixing it atm. Sorry! That's what you get for playing Early Access™ demos
L4Vo5:
I actually made platforms in the game i'm working on by storing the relative position of the kid to the platform and then teleporting him there every frame (before he moves) and calculating the relative position again (after he moves, so he won't just be stuck there). I also made the kid store the platform he is standing in to avoid problems when having many platforms in one position. You think exactly how to apply those things
I won't give exact code but that should work flawlessly with paths and everything
(actually, there is a little bug in the specific way i made it and i'm too lazy to fix it right now because i won't use platforms just yet)
Kyir:
So what you're saying is 'I have a solution but I'm only going to describe it vaguely.'
L4Vo5:
Sorry if that's what it looked like
I can't reveal the code because it's like 3 different pieces scatered around the other code i have, so i described the exact strategy i used because it's pretty flexible since you can move the platform wherever you want while using it
In fact, now i'll try to fix the glitch i was talking about, then see how i can manage to post a more complete reply
Navigation
[0] Message Index
[#] Next page
Go to full version