Jump to content


Photo

Brod's Platform Engine


  • Please log in to reply
35 replies to this topic

#1 brod

brod

    Brian RODriguez

  • GMC Member
  • 2021 posts
  • Version:GM8

Posted 04 November 2009 - 02:22 AM

Hi. So after some tweaking/experimenting here and there, I've figured out how to add some pretty cool stuff to this engine I've been making.

Current features include
  • One script handles everything
    • only 3 arguments, move right/left, and jump
  • Pixel perfect collisions (Even for ridiculous speeds)
  • Jump-through objects
    • Slopes (height can be defined)
  • Non-Passable objects
    • Slopes (height can be defined)
  • Gravity direction (No, not just right/up/left/down. Any 360 degree angle)
  • Bugless (?)
  • Works in GM Lite & Pro

So, this has the bare minimum of features, and I don't plan on adding anything else. I also neglected to comment the code, so I suggest you be skilled at GML before trying to edit anything found in the script, unless you want some bugs. Credit IS required.

Download

Check out my Platform Slope Tutorial featured in the Tutorials and Examples forum for a better understanding on how and why this engine works.

Enjoy.

Edited by brod, 07 July 2011 - 03:49 PM.

  • 3

#2 Schyler

Schyler

    Noskcirderf Derf

  • GMC Member
  • 2445 posts
  • Version:GM8.1

Posted 04 November 2009 - 02:30 AM

Sorry I can't resist;
"Basic Advanced Platform Engine"

On a side note it sounds pretty good. I'm going to download later when I get home and give it a shot.

Regards,
-Schyler-
  • 0

#3 Gordy

Gordy

    GMC Member

  • GMC Member
  • 26 posts
  • Version:Unknown

Posted 04 November 2009 - 02:32 AM

Works great, even at higher speeds like you said.

Not much else to say, awesome work.
  • 0

#4 fredcobain

fredcobain

    GMC Member

  • GMC Member
  • 154 posts

Posted 04 November 2009 - 12:54 PM

Really perfect! Congratulations.


The code is difficult to understand, but the behavior is perfect.
  • 0

#5 brod

brod

    Brian RODriguez

  • GMC Member
  • 2021 posts
  • Version:GM8

Posted 04 November 2009 - 01:04 PM

Glad you all like it.
  • 0

#6 Drandula

Drandula

    Mister Pixel

  • GMC Member
  • 269 posts

Posted 04 November 2009 - 04:08 PM

Really good work :D At first sight I didn't fully understood your script ^^"
But it works perfectly and thanks you remembered adding easy changeable
values. This is great example for my little brother. (I'll show it right after I get from hospital)

~Drandula~
  • 0

#7 Viktor

Viktor

    GMC Member

  • New Member
  • 327 posts

Posted 06 November 2009 - 08:00 PM

Cool! Good for newbies :)
  • 0

#8 holystorm

holystorm

    GMC Member

  • GMC Member
  • 422 posts

Posted 07 November 2009 - 10:22 AM

Can't download, page not found.
  • 0

#9 brod

brod

    Brian RODriguez

  • GMC Member
  • 2021 posts
  • Version:GM8

Posted 07 November 2009 - 01:06 PM

Sorry about that. Fixed.
  • 0

#10 Johann11

Johann11

    GMC Member

  • New Member
  • 19 posts

Posted 07 November 2009 - 04:48 PM

Woahh! After testing this and other examples (found on your page), I was shocked, how good they are! Small file size, really good scripts; only one word to say: brilliant!


Edit: Can you spend a little bit time to expnad your example? Such as a small moving Platform?
Would be really nice!

Edited by Johann11, 07 November 2009 - 10:24 PM.

  • 0

#11 Ace

Ace

    GMC Member

  • New Member
  • 348 posts

Posted 08 November 2009 - 01:23 AM

Nice one! I've looked everywhere for this kind of thing!

There is one issue though.

When only partially jumping through a slope (made of multiple slope objects) the higher part of the total slope (another object) is ignored and my character does this:

Posted Image

He basically stands 'between' the slopes, which is rarely a desired behavior. You wouldn't want your character to walk through the 'floor' would you? I think it could be fixed easily, but I wouldn't know how to edit your code to do it.

Also, I know it's asking a bit much, but does this happen to support basic moving platforms? Either way, it's still awesome as is. I'll definitely add your name to the credits of my game when I release it! Thanks a ton dude! I honestly do appreciate your hard work!

Edited by Ace, 08 November 2009 - 04:43 PM.

  • 0

#12 iPodClassic

iPodClassic

    GMC Member

  • GMC Member
  • 273 posts
  • Version:GM8

Posted 08 November 2009 - 03:28 AM

The engine is really nice, i will be sure to credit you.

Edited by iPodClassic, 08 November 2009 - 03:29 AM.

  • 0

#13 Ace

Ace

    GMC Member

  • New Member
  • 348 posts

Posted 09 November 2009 - 07:49 PM

I have updated this platform engine to fix the slope problem I encountered as well as added dropping down from above jumpthrough platforms. I also added moving platforms as well as solid moving platforms. Moving jumpthrough slopes are a bit messy and I doubt I can fix them without understanding Brod's code better, but so far, my edit is pretty good! I've actually got a better version than this with much more advanced and customizable jumping (including variable double, triple, etc jumps). Just let me know if anyone wants me to upload it. For now, here's the older edit of Brod's engine with lots of commented code:

Posted Image

If anyone edits it and updates it, please post in my Zero Engine example thread.

I know my moving platforms aren't perfect (mostly the solid ones), but if anyone can mesh my code with Brod's slope code a bit better, it'd rock if you'd share. I've pretty much commented everything I've done, but Brod's slope code is still some kind of voodoo to me and I've put a week straight into coding the basic moving platforms so you'll have to fix them yourself if they don't work the way you might want them to. I only needed the moving jumpthrough platforms to work. Even so, it shouldn't be too too hard to fix the moving solid ones. I just got tired of messing with them. :)

Edited by Ace, 02 December 2009 - 07:11 AM.

  • 0

#14 Billyro

Billyro

    GMC Member

  • New Member
  • 57 posts

Posted 19 November 2009 - 08:16 AM

this is a really great engine!
I could easily modify it too.

(FINALLY! An engine with jumpthrough slopes!!!)

I'll give you credit for it's use. :)
  • 0

#15 }{dark}{

}{dark}{

    if internet==0

  • GMC Member
  • 525 posts
  • Version:GM:Studio

Posted 19 November 2009 - 10:10 AM

This is a great engine!!! Good work!
I set the max speed to 80, acceleration to 8, and room speed to 100 and it STILL had perfect collisions(although it lagged a bit:lol:)
It's a shame I refuse to use any engines but my own

Edited by }{dark}{, 19 November 2009 - 10:20 AM.

  • 0

#16 brod

brod

    Brian RODriguez

  • GMC Member
  • 2021 posts
  • Version:GM8

Posted 26 November 2009 - 10:11 PM

Ace has a nice edit going, be sure to check it out.
  • 0

#17 True Valhalla

True Valhalla

    ಠ_ಠ

  • Retired Staff
  • 4880 posts
  • Version:GM:Studio

Posted 26 November 2009 - 10:38 PM

Very nice engine.

A great addition would be movement syncing based on FPS.

-Tv
  • 0

#18 thescotster19

thescotster19

    GMC Member

  • GMC Member
  • 236 posts
  • Version:GM:Studio

Posted 27 November 2009 - 10:58 PM

Here is my platform engine (nowhere near as good as brods!) but it does contain functional platforms in any direction at any speed, which you can jump off (and if you jump off moving fast upwards you take on the platform speed too).

Problem is I can't understand Brod's code. Mine is a lot simpler (but less efficient) and it has explanations all the way through.

Here's a link to the source:

http://host-a.net/ma....html/ninja.gmk *EDIT* Updated file to include more platforms

If someone clever out there can reconcile the two it would be greatly appreciated, I really want to use Brod's engine from now on, it's awesome.

Edited by thescotster19, 27 November 2009 - 11:30 PM.

  • 0

#19 Ace

Ace

    GMC Member

  • New Member
  • 348 posts

Posted 02 December 2009 - 07:16 AM

Btw, I've decided to take up some edits on this engine.

http://gmc.yoyogames...howtopic=454506

Read over my previous post here and check my new topic for my new edit that includes moving platforms and lots of commented code. If anyone wants it, I'll update the download link to include more advanced variable jumping, bugfree of course, that also includes double, triple, etc. jumping built in.
  • 0

#20 brod

brod

    Brian RODriguez

  • GMC Member
  • 2021 posts
  • Version:GM8

Posted 29 December 2009 - 02:40 PM

New cool thing I realized, this works with Lite as well as Pro.
  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users