Hello I'm a web developer and recently I started reading about game development. I followed some tutorials regarding c++ and openGL (whatever I could find online because as you know not many up to date openGL tutorials exist.)
I keep wondering in a case of a rpg game with a huge real world(map) and entities(enemies what so ever) how could it be implemented. Meaning you cant load a huge map and the entities all at once obviously... I was thinking of subdividing the map into blocks and each block to even smaller ones so that each block contains (5x5) 25 sub-blocks.
A map could be consisted of many blocks such as the following one which has 25 sub-blocks:
P = Players current sub-block O = sarounding sub-blocks X = sub-blocks not yet loaded
Entities will be loaded only for the players current sub-block. Keep in mind that P is not just the player is a mesh a piece of map not very big and not as small as the player is.
X X X X X X O O O X X O P O X X O O O X X X X X X
And I'm wondering is this a good approach? I suppose each sub-block has to be a different mesh apparently and then stitch them up together?
What if I stored the map into 1 big height map or a set of height maps and generate the mesh from that. According to the player's position copy the required image height and width where player is always at the center of it and rearrange the data in the vbo?
I'm sorry if this is a silly question but I simply don't now how to approach this and I can't find any references.Also keep in mind that on such a map animations will also happen.
I would really appreciate it if someone could give some references or explain the architecture for a game such as this.