Jump to content
  • Advertisement
Sign in to follow this  
Storyyeller

Platformers and Portals

This topic is 2606 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am making a game which is basically Portal in 2d with platformer physics (e.g. high jumping and air control).

However, I've run into a problem. Platformer character control assumes that the character is always upright. Currently, I just teleport directly when the player is more than halfway into a portal (updating velocity appropraitely of course). The problem is that I want to switch to simulating true portals, where it is possible to be partway in one and sticking partway out the other simultaneously. Unfortunately, this means that when two portals are pointing in different directions, both halves of the character cannot be simultaneously upright.

From what I can tell, Portal just rotates the player really fast after coming out of a portal. But this still involves the player being sideways or upside down for some amount of time, and rotation isn't really suitable to platformer style character control.

What can I do?

Share this post


Link to post
Share on other sites
Advertisement
I'm by no means an expert, but when I play Portal, I find that the directions are pretty well fudged. They put those boots on you and just tell you that you always land on your feet, but it's entirely possible to set up a portal so you come off a jump pad, shoot through a portal head-first, and come out in such a way that Chell must inevitably be sliding on her face for a few yards. They play the *donk* sound effect of her boots hitting the floor and then right the camera, and you feel like she just did some kind of a ninja contortion, and that's enough for me, but if it wasn't a first-person game, that sort of thing would be a real trick to pull off. In a side-scrolling platformer, you'll have to show the character to the player all the time, and that means it'll look wonky when stuff like that happens.

Just like Portal has those fudgy boots, come up with a way for your on-screen self to deal with the rotation. Make him a many-legged robot, or give him a hoverpack, or something like that, and when he jumps into a floor and comes out of a wall, just use his center of mass to determine which gravity is affecting him, then have him orient appropriately. When problems crop up, you can use your own vision to set rules that solve them. Maybe he face-plants and gets up, maybe he bounces to his feet in some contrived way, maybe the collision puts him into uncontrollable rag-doll mode until he comes to rest, then he gets up. That's up to you.

I think it would be a hoot for some of the extreme acrobatics that Portal implies to be presented in a game as catastrophic smash-ups, where the character smacks his head and falls down some stairs and swears and groans and then picks himself up and carries on.

Is the portal the only gimmick in the game? If you had a portal generator and a grappling hook, you could even include fall damage, so you'd be frantically portalling around, trying to avoid impacting any hard surfaces at terminal velocity, then snagging a handy girder to bring yourself to a safe stop. Or aiming for water or whatever.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!