2016-04-10 03:27:17

Hi guys,
i have a little problem.
I am writing a audiogame in panda3d, a very big game...
This Game will be online with large maps...
So, the problem is, that the maps are to big for the memory and so on.
I search someone, who knows panda3d and can help me.
When someone want to help me, it will be great!
Send me a PM and I will contact you.
I hope, really, that someone can help me, because i don't anderstand the systems of p3d with for example "terrain", "mesh", "highmaps"...
I don't want to write here all the facts, because I want not to give to many informations out of the game...
:-)
Ok, I hope someone can help me or can give me an idea in the thread for map system, what is good for very big maps... I want to use 3d Maps...

best regards

sorry for my english, I hope you have understood me.

2016-04-10 11:53:56

hello,
i didn't code anything with panda3d, but i think it's manual is the best option
for your maps, i recommend you to use tmx which is in xml format and 3d vectors

2016-04-10 13:41:55

Hi,
can you give my an example, my maps will very big, in a 3d grid, 1000000 * 1000000 * 1000000 is here a minimum, a hull world.
I searched in the internet for tmx but I have found only thinks with 2d grids and pictures.
But thank you for your quick ansver!

sorry for my english, I hope you have understood me.

2016-04-10 15:39:44

Hi, maybe you will divide the world in to some smaller amps?

If you want to contact me, do not use the forum PM. I respond once a year or two, when I need to write a PM myself. I apologize for the inconvenience.
Telegram: Nuno69a
E-Mail: nuno69a (at) gmail (dot) com

2016-04-10 16:41:21

Is this like bgt?

2016-04-10 17:15:11

Hi,
@uno69:
I want a big map not many, many small maps... that is not so nice for me.
I want a big worldmap and this world is big.
It works, because i have seen dmnb, where the map had over millions of units.
but, how it works, i don't know.
Or how do you mean your ansver?

Panda3d is a gameengine for c++ or python, with many features, for example a ai, physiks and so on.

and i don't know, how i can get a large map file and slize chunks out of it and load them. That was my first idea, but i don't know how I can do this.
The Map file itself is not the problem, but i search for a quick and accourate methode...

sorry for my english, I hope you have understood me.

2016-04-10 17:18:14

If you tried creating a 3d array with a total capacity of 10^{18} elements, then yeah i could see why that's causing problems. If your game world is sparsely populated, create something like a list of objects in the game world and store the position on each object. this is a simple solution and may not work for you depending on what type of game you're trying to make.

2016-04-10 17:23:40 (edited by chpross 2016-04-10 17:27:47)

Hi!
yeah, I know this sulition, but can I uase this in a game that is not in the space, because this game is not a space game... it is only a very big map with many objects and many space between the objects... :-)
This world have different grounds for example "gras", "stone" etc.
Can I store this grounds with this system?
And when, I don't know how i can use this with panda3d collisionssystem and so on.
Physics calculations etc.
But thank you Victurus!
Maybe you can ansver my questions to this system

sorry for my english, I hope you have understood me.

2016-04-10 23:14:34

It sounds like you might be better off storing the objects, rather than a tile array.
I don't remember how Panda3d handles this sort of thing.
Maybe something hierarchical, like a TreeMap? Where the world would be the top level, then large regions, then each large region contains smaller regions, and so on to the level of small objects.
This should save a great deal of space, and shouldn't be too slow.
But I'm not sure what would be best with this engine.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2016-04-10 23:35:18 (edited by chpross 2016-04-10 23:37:42)

Hm, I work here with c++.
Not with python, because for tath, python is not the right language.
Someone no maybe a better engine for c++, that I can use for large 3d Maps?
The problem is, i found the "terrain" and so on. but this techniques are for graphik rendering, i need not a graphik rendering and so on... Or textures etc...

Thank you @k jones, this sounds good, the problem is, i don't know, what a tile-array is.
A short google search have given me numpy tilearray, but i can't use this with c++...
Can you give an example of this way?
or do you only a python programmer?
:-)

however, thank you all for your help!

sorry for my english, I hope you have understood me.

2016-04-11 06:19:03

I was thinking something more like this:

class Branch {
    Branch*[] children; // Could be a 3D array, or could use a spatial hash or something else to organize them.
    Object3D*[] objects; // Just like with children, it might be better to use a tree or a HashMap.
    Branch* parent; // Each branch must have exactly one parent.
}

class Object3D {
    // Properties go here, such as geometry, mass, texture, other identifiers, etc.
    Branch*[] parents; // An object could conceivably be on the border of several branches. There's probably a better solution that preserves the tree structure.
    // Connectors to other objects can go here?
}

The purpose of organizing them into a tree is efficiency. If your world is better described by objects than tiles, then you don't want to keep the objects in a single array; you'd want to organize them so that the most common object-object interactions are faster than less common interactions.
However, I don't remember if Panda3D's built-in approach favors tiles or scene graph type structures.

(You might want to look up Scene Graphs. The principal sounds reasonable, but they still confuse me. They're supposed to be excellent for worlds with vast amounts of space, or wide variety in scale (for example, if you need to simulate both very tiny and very large objects, or you need buildings or towns separated by vast wilderness, or islands and ocean, etc.)

Java3D basically takes this idea and drives it off a cliff (turning absolutely everything into its own class, usually with long and overly technical names). Most audio games go in the opposite direction, and sacrifice ram and detail for simplicity (

if(tiles[x+dx][y+dy].solid) walk=false; 

). Mainstream games were more tile-based as late as the mid 1990s, but that stopped being practical when 3D became easier, so object-based models and priority-based structures became more common.

The tricky part to a tree structure based on location is that moving objects might need to switch from one branch to another, but you don't want to constantly do a boundary check. I'm not sure how to handle this, but I probably shouldn't focus too much on this without better understanding what model Panda3D favors.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2016-04-11 12:17:07 (edited by visualstudio 2016-04-11 12:41:09)

you can write any map in tmx
you can sepperate them in properties
inside x and y positions, you can make a z position in your map
more information about tmx format:
tiled
and,
this is a C++ library for parsing tmx map files
this is another C++ library for tmx map files
this is another C++ library for tmx parsing
for physics, use
bullet