Open world with impossible spaces
Let's talk about making an open-world with impossible spaces. The concept and some details.
But first, why would anyone want that?
Impossible spaces encourage exploration. Linear levels are quite limited when it comes to exploration. There might be still things you can find, but it's more like looking for some hidden places and objects than walking into the unknown.
That's the first reason I wanted to have an open-world in Tea For God.
The second is that it enriches the gameplay. You have to plan where to go, how to get there. This also allows for progression at a pace chosen controlled by the player. Do you want to get more upgrades? Roam around as long as you want. Do you feel you're good to go to the next place? Go.
That's right. Although there is an open-world in the game, it doesn't mean that the whole game is structured around being open-world. I still want to have the level structure that would fit the story.
Let's get back to the "open-world v impossible spaces".
Impossible spaces require the player to remain within a certain space. By their nature, they allow for endless travelling, but there's a problem because you can't present that in some easy to read way. The first thing I decided to have to get an open-world working is to keep the world divided into cells.
I wanted to have an endless world, so I can't keep all the cells stored anywhere. But as the game uses procedural generation, I could keep a certain number of cells in existence, create new ones on the fly and remove those who are far away.
Each cell is confined and independent from other cells. By this I mean it can be generated alone without any knowledge of the world around it. To achieve that, I decided to have the exits of cells always lay in a specific place within the player's VR space.
The next thing to decide was how I want to place the cells. With impossible spaces, I am not limited to standard Euclidean space. But on the other hand, I don't want to have something too abstract as navigating would either depend on some device guiding the player (which would take out the challenge) or by luck/randomly. I wanted to make it as easy as possible and decided to have a 2D world. 2D maps are easier to understand and to read. Although in VR, 3D maps are also okay as you get depth perception and can easily look at the map from various angles.
With a 2D map, each cell may have up to 4 exits (north/up, south/down, east/right, west/left). Additional exits (transition to another level) are not relevant here.
This meant that each cell's contents could be placed on a 2D plane. And by adding outdoors I could show other cells around the one the player's in. My initial idea was to use it to make it possible to see where you've been, where you're going. But I realised that theoretically, you could use this to navigate yourself through the world without the map showing you, where you are.
And then I decided to get back to the cells, to what's inside them. Impossible spaces do not care about the directions, you can join rooms any way you want. But if I wanted to make it possible to navigate through a 2D world by means of impossible spaces, I had to introduce some order into the rooms. I decided to keep the doors ordered within a room just as they would be ordered if the room was on a 2D plane. To visualise this, if you enter a room with two doors and you choose the door on the right, you should turn right. On the map. As due to impossible spaces, you may see the corridor turning left.
Without this approach, the doors are placed randomly and it makes navigation confusing and hard. Not to say that this makes it easy-peasy but it is doable and what's more important, really rewarding. You have to keep a mental picture of the map, where you are and confirm it when being outdoors or at auto-maps.
But this is just a concept. How to stick all those ideas into a computer?
By constantly creating and destroying things. And by faking.
When you walk outside, you don't see the actual world. All you see are just meshes representing other parts of the world. I call them background meshes. There are a few levels of them depending on the distance. They are created using the same seeds and "scripts" to have the exact layouts as if you'd be there. For example, the balconies in the right relation to each other, the exact number of towers and their placement. The only thing that is not done this way, at least for time being, are bridges. Creating platforms is quite time-consuming, so it's all faked to make it as quick as possible.
There are downsides to this approach. You don't see anything walking there (although this could be faked as well). They're just plain background meshes. Cardboard world.
I could mix in whatever exists but as the world is constantly destroyed and created, this could become way too apparent. And too complicated. And too GPU demanding. The fake-cells are created to make them as lightweight as possible. I have a certain budget for the open-world rendering.
There's one a bit bad thing about it. If all the cells are isolated because of that, you may kind of lose the sense of being in a big world. That's why I introduced the airships (and want to reintroduced big walking machines). They travel through the world and if you would see a ship stopped in a specific place if you'd go to a neighbour cell, you could see the ship in the same place.
But - it's faked too. Sort of. The airships are simulated by a specific manager and physically they are placed in a completely separate room. What you see is not the actual airships but airship proxies - they just represent the airships in the room you are in. This makes it easier to have numerous impossible-spaces based rooms and consistently moving airships within them.
The greatest hack is still ahead of us.
Windows.
I didn't want to place them in the actual cell as there is the number of possible placements is often lower than actual windows could be placed. Each window gets its own room where it is placed using one of the predefined placements (procedurally generated but predefined from the window's point of view). The room is empty but is linked to a common room with a view of the world around - the vista room. Ther are just background meshes (even of the cell the window's in) and airships proxies flying around. The hack is to choose the contents of such room to be rendered along with the content of the actual window room. The same goes for the sound.
One unresolved issue (mostly due to more important things) is choosing the right windows. At the moment they're chosen randomly which doesn't really help to navigate the world.
But the open-world levels are just parts of the game. And they can be limited to represent just small sections or even linear segments. And today I implemented transitioning between various sections. Actually, I could add a mode where there are smaller sections mixed together. Or endless worlds where you're looking for an exit to another level. But right now, I should focus on completing the game and right now I have the most important features working.
Get Tea For God
Tea For God
vr roguelite using impossible spaces / euclidean orbifold
Status | In development |
Author | void room |
Genre | Shooter |
Tags | euclidean-orbifold, impossible-spaces, Oculus Quest, Oculus Rift, Procedural Generation, Roguelite, Virtual Reality (VR) |
Languages | English |
More posts
- performance of a custom engine on a standalone vr headsetMar 27, 2023
- "Beneath", health system and AI changesFeb 16, 2023
- vr anchors and elevatorsJan 16, 2023
- v 0.8.0 new difficulty setup, experience mode, new font, performance updateDec 15, 2022
- performanceDec 02, 2022
- getting ready for demo udpate, scourer improvementsNov 15, 2022
- new difficulty + insight upgradeOct 31, 2022
- release delayOct 20, 2022
- loading times and early optimisationOct 17, 2022
Comments
Log in with itch.io to leave a comment.
I love these detailed dev logs. This is one game in particular that it's really cool to see the design process and inner workings of. There seems to be a lot of interesting design problems and solutions in this weird space you've found yourself in.
I should do them more often :) There are lots of different problems and solutions for them. Impossible spaces are a bit different to normal 3d (or 2d) space based games.
So much for doing them more often lol.
intricate, but sounds very intriguing.