Orientational Perception

Hey folks.
My brother and I recently started a new project in unity, and we’ve come across a difficult challenge, related to the very fundamentals of our game.

The problem is this; we want our players to feel like they are navigating around different planets. Now, I’ve already managed to fabricate a script that simulates planetary gravity, around the origins of individual spheres (planets).
But we’ve changed our minds about this. We want our player to feel like he’s walking around a planet, even though it’s not actually shaped like a sphere. Imagine a hexagon, where each side represents a part of a planet. When the player walks from one end to another, on this hexagon, his view should naturally blend, like he didn’t shift sides on the hexagon, but merely walked across a flat surface. This is all seen from a 2-dimensional perspective. That is, from the side of our character.

Scripting wise, this is a big challenge for me, and I honestly can’t see how I would execute this idea, so any thoughts would be much appreciated.

Thanks,

Gris

This is hard to comment on. To share ideas like this for feedback, I’d recommend some visual aids. It’ll also help you to predict issues and plan strategies if you sketch your ideas out as best you can. I think I understand your description well enough to know that this is a well-documented issue. Maybe not so much the concept of flat-sided polyhedrons, but the overall issue of scripting for “tiny planets” has been asked about and commented on for as long as I’ve been on the forums. Try some local forum and google searches with various keywords that someone doing what you’re doing might use.

Edit:
Heh, okay, I thought I understood at first. Now I’m thinking you’re talking about a 2D game. Wasn’t clear, since all video games are technically “seen” from a 2-D perspective. The biggest challenge will likely be the transitions from one “side” to another, but unfortunately the potential approaches are very open-ended, and the best strategy will depend entirely on the game’s nature. Going to be hard to comment further without a well-described issue, but come back with that and you might get some folks to bite harder!

Thanks for the fast reply.
I’ve attached a basic illustration here:

So the idea is, the player should feel like he’s walking across this spherical planet, while he’s actually shifting sides on a hexagon. Our goal is to have many planets, that the player can explore.
I hope this is clear enough.

Edit:
By the way, I realise this is a big challenge. The idea came from my brother, who has no experience in programming, but I thought it was so awesome, I’d ask you guys for help.

Getting clearer! Still not sure what’s moving though, or how. It sounds like what you mean is that the camera and character must rotate “together” such that it appears the player is traversing the circumference of this polygon. To the player, it will appear as though his character is upright, when in fact his and the camera’s rotation are based on his position relative to the polygon.

But I’m still foggy on the whole show. You might also mean that the camera and character remain “upright” at all times, and instead the polygon rotates beneath him based on player input. How does the player leave one of these shapes to “land on” another? It’s frustrating trying to verbalize complex concepts, but also necessary if you want some help! :slight_smile:

Right, so the player should always feel like he’s walking on a flat surface, like you would, walking around here on Earth. The reason why we don’t just make a round planet, is because it would require it to be way too big, in order to make it feel flat. I agree with what you said earlier, that the biggest challenge would be ‘transitioning’ from one side to the other. Makes me think about something like the Portal game. You could place triggers in each end, of each flat surface on the hexagon, and whenever the player touches it, the next surface blends in and you can walk across, to the next one. Kind of like portal, you sort of teleport to the next area, but at the same time, if you go back, you’re still at the same spot where you came from.
About the planet ‘travelling’, we haven’t discussed this extensively, but I’m thinking, the player gets a jetpack or whatever, and then flies off a planet, until he reaches space. From there, he can just mess around and find new planets to explore. I already played around with this, and I think the easiest way is to just make a trigger, that represents the atmosphere of a planet (I like triggers). When the player is no longer in contact with an atmosphere, he is in space, and the gravitational pull toward recent active planet is null.

Edit:
Forgot to mention this, it’s the player that’s moving, and the gravitational pull is always relative to the center of the active planet. The player’s rotation, however, is determined by the center of this planet, AND the ground he is walking on (if walking on slopes, for example).

Double edit!! :
Furthermore, I also forgot to mention, that in the end, we want this to be a (somewhat) MMO-style game. Just thought this might be a factor.

I have to admit that I’m still pretty lost. Is this a 2D game using hexagons as planetoids, viewed like an old side-scrolling arcade game? If so, as the player approaches any corner, he’s going to see the 120-degree angle slope of the next side as he approaches it by moving left or right. So when you say the player should feel the planetoid is flat (as if the world were a flat plane), I fail to see how to achieve this using a hexagon or even an enormous circle or sphere.

If I’m correct in assuming the basic side-scrolling perspective, and also you understand that the player will inevitably see each corner as a slope “down” (until he actually moves onto it, upon which some magic will shift his perspective so the downward slope becomes a “flat” floor), then we’re getting closer to an understanding. Then the chief concern is about transitioning from one side to another while maintaining a feeling that the planetoid is always “down” or beneath the player. You’d need to modify the effect of gravity on the player such that it’s always pointing towards the appropriate polygon surface, based on his relative position.

If my assumptions are correct, this isn’t a trivial problem, but it’s certainly do-able. You have to decide for yourself the best method for achieving this, though, since it’s your vision, and obviously tricky to communicate. If you can narrow your question into something more specific, using diagrams and careful explanations where appropriate, then offering help will become a lot easier for others. The trigger-based-transition idea could be viable, but may not be ideal. For a more emergent, free-form experience, you’d want some kind of always-on method (in Update(), perhaps) for ensuring the camera’s always rotated as you like, and the player’s always experiencing the right gravity vector.

So far that’s the best advice I can offer with relative confidence, but this idea is interesting to explore. So what’s next?

Maybe I haven’t been clear enough. I want these planets to feel like they’re so big, that when you see them from your perspective, the the ground you walk on, appears completely flat. But if we were to make them so big, it would require a tremendous amount of work, just to make one planet. So, we don’t want the player to actually see this hexagon, as a hexagon. We want the player to think that he’s walking on this planet, and not even notice whenever he’s magically switching sides on the hex… He would just walk straight in one direction, (remember, it’s seen from the side, so he’s walking either left or right), and at the end of the line, he’ll stand exactly where he started.

Maybe this drawing will make it easier to explain. Keep in mind, this is just an idea, and I don’t yet know if it’s actually achievable. And, I suck at Paint, I know.

The yellow lines represent triggers. These triggers should be placed so that when the player approaches the corner of the hexagon, he doesn’t see it before he hits the trigger. Now, when he hits the trigger, he is teleported to the next plane on the hex, but he can still see the place where he was before, making a smooth transition between the two. This is where I thought about Portal, because I want the player to feel like what’s behind him is just where he was before, but actually it’s some kind of mirror image.

Hmm. I think I better understand your desired result. If I understand correctly:

  • The game is viewed from a side-scroller perspective, a la super mario, mega-man, contra, etc
  • You want the player to have the illusion of walking in a straight line to end up where he started, the overall effect being a relatively tiny planet.
  • The camera rig + player will rotate around Z relative to the planetoid to accomplish this.
  • You want to use a hexagon shape + a teleportation system + clever wizardry to achieve tiny planets whose surfaces appear continuously horizontal to the player’s perspective

I’ll grant that this sounds like it could be cool if executed. That said, I personally wouldn’t want to undertake the design job of that last bullet point, and I tend to like doing crazy challenging prototypes just because.

For one thing, how does this system “give way” to a system that allows multiple planetoids to be viewed and flown to? The nature of this system suggests that this complex illusion must be maintained at all times, yet this seems to inherently prohibit multiple planetoids from being viewed at once for the purposes of navigating between them.

The next curious issue would be correcting for the obvious discrepancy between teleportation positions. It would presumably mean that the visible artwork at each corner of the hexagon would have to match that of what would be visible upon teleporting that short distance. This would seem to require more cleverness than I possess without investing some time. :stuck_out_tongue:

You’ve got quite an interesting challenge to surmount if I’m understanding your dilemma! Confirm this and maybe we’ll brainstorm or you’ll at least be better equipped to explain for others to help.

Yes, this is exactly what I want. And yes, you would have to find a very creative solution, to make planets look like actual planets when viewing from space. Maybe there’s another way to get the same kind of result? Because I do agree, it seems very complicated.

Hmm bump?