So, I had a dream a few years ago now, to make a racing/flying game with puzzles and stuff that takes place on the outside of a single piece of geometry (you know, like how we live on the surface of Earth). However, that sort of thing is easier said than done in every game engine I have found! Carsten of the Cafu Engine pondered the concept with me a while back then, but I was only able to “kinda sorta” make the physics pull objects toward a center point (as Earth pulls us toward its center). Anyhow… last night I did what I figured was the next best thing using the Blender Game Engine.
My game takes place on a world that is the shape of a cube. This presents the issue of what to do with the player when they reach the edge of a side. We can speculate what would happen in reality for a good long while, but practically speaking for the game I figured it would make for a decent experience if I moved the cube under the player. That way the player wouldn’t loose any momentum, change directions, or see a loading screen. Instead, the cube would rotate when they hit the trigger at the edge of the map and the player would continue moving onto the next side of the cube.
I accomplished this using Logic Bricks entirely and it works really well, for the most part (a bit flaky on corners and you go too slow or too fast anywhere). It’s really quite brilliant if you ask me. 🙂 But… I don’t like it! You’d think I’d love it, because it is pretty awesome, but it doesn’t work so well when flying really quickly and it’s kind of a pain in the arse to work on when populating each side with stuff. Even using layers, there’s still the issue of having to make things at abnormal orientations. So I think I’m OK with the more traditional “level” system we have in games. To ease flying around the edge of the map, I’ll slope the invisible wall… maybe apply an animated texture to it so that it looks like energy rather than just being invisible… more testing to do!
You can download this proof of concept from my One Drive here: seamless_single_cube_world_PoC.tar.bz2 and play around with it if you’d like. The whole of it is GPL v3, so feel free to use any of if it’s helpful for you. This took me a few hours to figure out, iterate, and test btw. We live, we learn, we… go make another coffee!
Tip of the Day: Don’t forget to apply scale and rotation! Saves a lot of head scratching… 🙂