Creating an open world

Anyone has any idea how to create an open world with Blender ? An open world is a game without map borders. It works similar to this:

1234
5678
9abc
defg

The terrain is divided in tiles. At any monent the player is at the 4 center tiles 67ab. When the player moves near the border of the outside tiles the game preloads new tiles. For instance player is at tile a near the SW corner. The game checks to see if tiles hijklmn (see below) are loaded and if not loads them.

1234
h5678
i 9abc
j defg
klmn

The player is now at tiles 9ade and this set is the new world center. Occasionaly the entire world (with the player in it) is shifted to the center to avoid problems with the coordinates if the player walks too far away.

This solution can also be made into a tridimensional solution. It requires some heavy features and i dont know if Blender supports:

  • The engine must be able to control what pieces of geometry can be loaded and must be able to load geometry into a scene for the purpose of storing tiles (the cache scene). This loading must be possible in real-time.

  • The engine must be able to transform tiles and position all associated objects to the tiles (trees, veg, houses, npcs). The objects are linked objects to a library scene with all unique objects in the game or the memory consuption will be unbearable.

  • The game must be able to shift the entire world (game scene) to the center for reasons explained above.

  • The game must be capable to disable tiles that are not in the field of view of the player. The game must be able to unlink from the game scene all the tiles that are outside the 5x5 (4x4 plus a safe margin) tiles that represent the game scene at a certain time.

  • The game must be able to manage memory. Check how many memory the cache is using to unload unnecessary tiles objects from the cache after a certain limit of memory consuption has been reached.

  • The game must be able to LOD ai and geometry so that far away elements have a dumber but faster ai and a lighter geometry.

There is a lot of real-time load/unload link/unlik operation with this scheme. There is also some memory and scene management and at least simple LOD solutions are required.

My question is: is this possible to do with Blender game engine ?

It is possible, at least most of it - though you’ve got to script it by yourself. Saluk is (or was?) doing something like that, perhaps he can tell more…

There are a lot of things in python you can use for LOD, and fake culling. The best way of doing handling bog worlds is creating sperated files, write info about a character to a txt file that has info about, health, items and so on. So when you walk into a gate, and opens it, the game loads another blend file, loads the text and while you open the gate, you make it so, it says loading, then yuo see a flash, and viola next blend file. Easy idea, but harder to get it to work. :stuck_out_tongue:

Is it possible to do this using different scenes in one blend file as opposed to using different files (I’m a game engine noob)?

Cheers,

b01c

That’s exactly what he doesn’t want to have. He wants a seamless world. :wink:

Yep you can do the same with 1 blend file and more scenes, yes. But it’s quite tricky to load the same settings from the scene 1 to scene 2. So you have the same items, and enemies that are killed, are stil killed when you go bac. You need to make a txt file that has all the info about the enemies in the world, when you kil one, it wil be changed in the text file, and wehn yuo load that part of world again the enemy is still death.

You an do this all with python. It’s possible, like creating your own weather system for your game, but still stricky to get it working and nice done :stuck_out_tongue:

That would be a save file. Yes a text file would be nice or even better a xml file. What kind of script could be used to read one of those ?

heh its already been done, man. Saluk and I. Do some research on Crescent Dawn.

RonC

doogs: heh its already been done, man. Saluk and I. Do some research on Crescent Dawn.

He doesn’t ask if it’s already done, but how to do it. :stuck_out_tongue:

Well sometimes 3 times a month I got a idea how to create a sort of world thingy, and then I try it out. I hope I can do a stable one on a day. Currently I’ve got some sector and cullings tests here. The idea with the txt file is an idea I’ll try when I have an holiday again. :stuck_out_tongue:

I’m also very bussy with learning Python scripting, it’s really cool and afther I learned how to use it for creating programs I’ll start on learning Python for use in the game engine. Normal Python is a good start before doing it in Blender. 8)

I don’t totally get what you want, but maybe this post I made asking about an infinite plane would help.

http://www.elysiun.com/forum/viewtopic.php?t=20147&highlight=infinite

Basically, just make copies of the world on all 8 sides of a square and the transport would go unnoticed.

Oh! That’s a good thread on this topic. Infinite worlds and seamless worlds are quite the same in some aspects.

Does anyone have a copy of that loop.blend mentioned in that thread? When I click it, I get taken to a page that says “This account has been suspended”

Yep same for me. I tryed to search my source liberary, but I don’t have it. :frowning:
Anyways I found something else that was quite intresting. A bigworld test which I found months ago on the internet. It uses a script that writes the objects in the scene to a database. Really intresting and I think I’ll figure it out how it works. :smiley: I thought this technic has been used for CD by Saluk.

Your game handling of terrain looks nice. I see you have also played Morrowind. Can we download a demo of your game ?

I didnt mention about some other tricks because i was afraid people would be confused. Tiled terrain allways has a problem that you can’t see much more than 2 or three terrain tiles ahead. I was considering having two layers of tiles like this:

layer 0: ….._…
layer 1: ________________.______.

Layer 0 zero tiles subdivide layer 1 tiles increasing detail arround the player. Those tiles float above layer 1 tiles so they dont intersect. Layer 1 tiles are used to represent the silhouete of far-away mountains and to help the player orient himself. Only layer 1 (middle tile) needs collision turned on. Layer 1 tiles can be very low poly and be textured with one big texture on top. Their only use is for looks.

Sounds great, the top layer has got the real terrain with mountains and so on. The second layer has got a plane texture that just makes the far ahead view look like a landschape. :smiley:

The thing I did for my culling test was, adding a mist, so a few little grid squares before the objects go out of the mist, it get’s culled. When they disappear in the mist again it will be removed. It’s a quite nice idea and you don’t see any adding or deleting progress while playing. 8)

Some MMORPGs also cull objects by making them more transparent the more distant they get from the player. This way its possible to have a background. However with a background box the mountain silhouetes dont move while the player moves.

You could fade in the real terrain and fade a new background image as you walk to make it seamless. In Zelda wind waker, they use an awesome technique (I cant remember what its called) where for far off objects they render ONE static image and then put that on a plane, but when you get close they change how often the planes image is updated. When you are close enough, they get rid of the plane and just render the object normally. So they do a kind of fade from 2d to 3d. The only downside to this is if you have a lot of objects it requires too much texture memory. It worked in zelda because the only far off objects were islands and you would only see 4 of them at most (four directions).

Bigworld works pretty good, I think I did upload one of my old versions of it at some point, that may be what you saw jd-multi. First you pass all the objects through a script that records what kind of object, its position, and its orientation. When the game is run, it uses addObjectActuator to add in objects in a 9x9 grid, so that the square you are in and the squares next to you are all loaded but further out they aren’t. In crescent dawn we use a lot of fog to hide the other zones popping in. Without the fog it looks really bad :wink:

The downside to bigworld, is that as you add more to it, the filesize still gets bigger. When you press play, the game engine still has to load every object, because they are all sitting in a hidden layer. It has to make objects for them to be ready to be added. I’m trying to talk to kester and find a solution for this, otherwise we will have to stick to seperate scenes/files. One solution would be to allow appending of objects from other files while the game is running. All the objects could be distributed in seperate blend files and appended when necesary. But this kind of functionality might require some rewritting of how the game engine handles objects. Currently I dont think its possible from a coding standpoint to add more objects once a scene is loading.

For “smallish” worlds "big"world can help the framerate and allow seamless open landscapes. But it can’t support a whole game without some modification to the engine.

I have it.

Anyone who wants it should PM me with their e-mail.

I have it.

Anyone who wants it should PM me with their e-mail.[/quote]

Send it to me , plz.

[email protected]

Thanks.

PM me with any more requests please, it’ll keep your address from being picked up by spam bots.