storing terrain information

Blitz3D Forums/Blitz3D Programming/storing terrain information

L&L(Posted 2003) [#1]
im making an online game and was wondering which method of storing map information would be best? the game is going to be a mmorpg/fps hybrid, so the maps will be pretty huge.


Sunteam Software(Posted 2003) [#2]
Well now that depends on how you aim to use it. To cut a long story short it's not wise to transmit entire maps whilst players are trying to play the game. Therefore it is definately best to have a predefined world with all the map data in it, and then if it is to be expanded, release these as patches to the client. As for the actual data structure the two best methods (which are kinda similar in structure anyways) is to either use an array(s) or a data bank.


Peer(Posted 2003) [#3]
I am writing an Engine for exactly this problem. It handels gigant, heih detail, not LOD terrain to avoid "pop-in". The maps size depends on your harddrive :). It also handels Enviromental Objects. Everything can easyily be created with a mapeditor. The Engine is only in early Beta phase but if you are interested I can give you some test stuff.

I can create you a fully enviromental (with trees, stones etc.) gigant map for you to explore.

The area in the screanhoots is only a litle partof the whole Landscape. Like I said, The maps size depends on the free space in the Harddrive.

Engine


L&L(Posted 2003) [#4]
wow peer, looks nice. contact me if youre interested in participating in my project


L&L(Posted 2003) [#5]
oops forgot my email: danny8709@...


jhocking(Posted 2003) [#6]
Make sure to have a look at sswift's terrain system.


L&L(Posted 2003) [#7]
sswift's terrain system?


L&L(Posted 2003) [#8]
OK right now im planning on using data matrices to store tile texture information, i am planning on storing object positions in a separate data file. do i need to encrypt the map/position files or will blitz do it for me?

peer, how did you make the actual terrain? heigtmaps?? if so where did you store them.

thanks


Sunteam Software(Posted 2003) [#9]
Encryption really depends on whether you think it's worth encrypting. After all if the format is proprietory then is there really a need to encrypt?


Anthony Flack(Posted 2003) [#10]
You can pack the file with an encription key, using Terabit's Datapak utility (it's free!).


Peer(Posted 2003) [#11]
Hi L&L

I made my terrain with an expecaly Engine which I am goin to rewrite because of the speed problems and the little holes between different Area. The new one will be much better in speed. The only problem will be that the textuaring will not be so effective as it was but it will has much more more speed. So if you are willen to wait few days I can give you a demo of my new Engine.

Now I can only give you the code of the older one(Much slower).

As both(new and old) will not save their datas in heihmaps(much to big) you can load them encrypted and decrypt them in the programm. So if you stop the loading with "Str"+"Alt"+"Enf" the not encrypted files will not lie on your Hard disk(Like in Terabit's)

L&L please look if in your demo of my Engine there are Enviromental Objects like trees and houses. Else reloadt please the demo for seeing them, too.

Here is the (old) version of the map editor for all free to download:
Terrain Editor
I think you'll understand everything easily but few things:

In the Tap Terrain and menue Preferences there are firstly 100 buttons for the textures. For creating new ones save a bmp File with the next free number in the Map1.map Folder.

In the same window there are 10 buttons under that others. They stand for the terrain detail.

(Both tips above works for the selected Surface)

Select in Objects, Preferences the object to set.

Hace much fun.


L&L(Posted 2003) [#12]
thanks! :)


Peer(Posted 2003) [#13]
L&L: Should I contact you if the Engine is rebuilded?


L&L(Posted 2003) [#14]
yes please :) can i have the source to the first one?


Peer(Posted 2003) [#15]
Of course. It's not commented but You haven't to understand everything (Only how to use it.)
Download Engine

How to use:
1. Download it :)
2. Enzip it.
3. Copy it in the directory of your game.
4. Write in your game source Include "Engine.bb"
5. Make sure that you have written this UNDER Graphics3D()
6. Call BBTE_Initiale() without parameters
7. Call Suppress_Logfile() !!Important!!
8. Call BBTE_Set_Preferences(Gridsize)
9. Insert in Gridsize you special numbler*
10. Call BBTE_Map_Load(Folder$)
11.Insert your folder name(Without .map)

*A good number is 10. But try out. This will change the size of the map.

|Note| Of course for everybody to test. But its sloooow |Note|

If you have problems or other questions just ask :)


Peer(Posted 2003) [#16]
Hey L&L. I don't want to be curious, but what state is your online game currently. Can you show me some Photos or are you in early Alpha stages?


L&L(Posted 2003) [#17]
right now its still in the pre-coding stage, im really busy with school and whatnot so im hoping to get alot of it done during the summertime.

my three top goals right now are:
1. create a system of creating and storing map information
2. set the backbone for udp commands
3. find someone to model and animate character models


Peer(Posted 2003) [#18]
As you are the only one who planded to use my Engine till yet I would be glad for a Feature request for your game. Do you need special Features in the Engine?

Till now implemented.
-The terrain Engine (Rewriting now)

-Loading Objects.
-Objects can be:
--3D Meshes
--Images to be applyed to a crossmesh(8 Vertexes, 8 Polys)
--Pointer*
--Sounds (Emitted at the position. E.g. : birdsinging)

-Possibility of two different detailed meshes.


*Pointers are used to easy handle interactive Enviroment Objects. E.g. : You mayby want to have a weapon lieing arround in you game. And it should be pickable. So you set a pointer in the editor and call it maybe "Longsword". Then if you are loading a map, the loading function will call a function and tell you that you have to create this object at a certain position.


L&L(Posted 2003) [#19]
that would save me a ton of work :).

suggestions:
sounds are cool along with some moving water maybe?

another function that would be nice is denoting a spot where monsters would spawn and the rate at which they do..

about pickables... im planning on working out a system that randomly decides what each foe drops when killed based on its difficulty and the players luck..


L&L(Posted 2003) [#20]
im also planning on having underground dungeons and such...

have you ever played a game called the
elder scrolls:daggerfall? its pretty much what im basing my game on, but mine will be on the internet.


Peer(Posted 2003) [#21]
Dungeons. I wanted to make them anyway. But's a bit tricky. But I'll include them. Anything else?


L&L(Posted 2003) [#22]
hmm...thats it for now i think...i have a TON of houses and structures (estimated at 10,000+) so it would be cool if the model names were included in a text file that is read by the program the fomat would be something like:

6 '(number of mesh files)
house.3DS
castle.3DS
smallhouse.3DS
manor.3DS
temple.3DS
knightguild.3DS


Peer(Posted 2003) [#23]
It's already possible with your version of the Engine.

Go into the folder Map1.map\Objects.

Now copy your models into this directory and rename them. Use numbers only between 0 and 99. No letters, no space. Now create a .ini File of the same number. Open it. Write into the ini-file the following things:
-Any_Name

Now use a new line for every entry
-Media MediaType
-File Type FileType
-Texture FileType (Optional. If texture exists)

Divide every every of both commands in one line with a Tap.

MediaType
1 = Image applyed to an crossmesh
2 = Static Mesh

FileType:
1 = BMP
2 = JPG
3 = PNG

5 = 3DS
6 = X

Look out the other objects, too for seeng how it works or ask me again. I hope it works.


L&L(Posted 2003) [#24]
k it works. :)


Peer(Posted 2003) [#25]
Static Level of Detail works now. After endless dividing Triangles and hard bugfixing the Trunk is standing. Only the leaves are missing


ckob(Posted 2003) [#26]
that would only allow you to use 99 objects per map wouldnt it? and is there a free source to your editor as well?
im asking because I am writing a mmorpg and we are making perpetual realms and somthing like this would save us some coding time.


L&L(Posted 2003) [#27]
yea :) some source would be cool for future reference...?


Peer(Posted 2003) [#28]
One question. What does mmorpg mean? I've heard it many times but I don't know what it means.

And why 99 objects. Are Types limited to 99 or what?


L&L(Posted 2003) [#29]
MMORPG are usually classified as games like Everyquest, Dark ages of Camelot, Ultima Online etc.
It stands for massive multiplayer online rpg or something to that effect.

Im not looking to make another cheap everquest clone, what im aiming to do is combine the action in a first person shooter and the intellect of a classic rpg.

[url]http://www.bethsoft.com/product_templates/product_shell.html?daggerfall_Overview.html[/url]
the game on the above url is part of my inspiration and i probably will adopt many ideas from it.


ckob(Posted 2003) [#30]
yes , massive multiplayer online role playing game

the only mmorpg i have ever played that wasnt like every other mmorpg is...well i havent :/ quite frankly their all the same.


L&L(Posted 2003) [#31]
yea thats why im making a better 1 lol :)


Peer(Posted 2003) [#32]
that would only allow you to use 99 objects per map wouldnt it

No. That would allow you to use any number of Enviromental Objects per map. All can be dynamic Level of Detail and/or animated. I tried 1000 objects and it worked well. Perhaps a bit slow on my computer (350 MH, 128 MB Ram, GF 2 MX-400) but it made no problems.

and is there a free source to your editor as well

Yes there will be Free source after finishing the Engine.

As this Engine is in early stages it will take time till the release. I've written it expecaly to handel the Enviroment in mmorpg (Expecaly for them but I didn't know their names :)) very easy and efficient.

So of course you two will get a demo as soon as it is in a usable state.

And now ckob. Have you got a feature request, too. Or L&L have you got a few things to add?

-The terrain Engine (Rewriting now)
--Dungeons are includable as .X or as .3DS File. (Working on it)

-Loading Objects.
-Objects can be:
--3D Meshes
--Images to be applyed to a crossmesh(8 Vertexes, 8 Polys)
--Pointer*
--Sounds (Emitted at the position. E.g. : birdsinging)
--Water (Working on it)
-Possibility of two different detailed meshes.


*Pointer have now different modes.
1. Distance to the player
2. Timer. Call a function every X minutes.
3. Timer. Call a function in a random time between X and Y minutes.


ckob(Posted 2003) [#33]
im just intrested in the terrain :) anything else I can throw in myself if needs be


Peer(Posted 2003) [#34]
Ok. So nothing special for you.

I've fixed a few bugs and the LoD looks out nice now. Try to finish it this weekend.

The next week I will not be here so I am sorry if I can't answer imideatly. Hope release new version before.

ckob: Have you already some screenhots of your game?


ckob(Posted 2003) [#35]
yeah www.binary-people.com/TS


L&L(Posted 2003) [#36]
peer did u say u were going to put moving water in there?


Peer(Posted 2003) [#37]
I want to try it. I havent done it jet but I think I know how to do it (I hope I will not get other problems). But in fact, Yes!

ckob: Looks grate you Screens. Good job.


Peer(Posted 2003) [#38]
And I tried it. Demo out (eary version). You can walk over a very small landscape and see a river and a waterfall. All animated of course. Curves also possible.

One screenshot:


Demo:
Download


ckob(Posted 2003) [#39]
nice :)


L&L(Posted 2003) [#40]
i like


ckob(Posted 2003) [#41]
now in your new editor can u make the water like that? and how are u doing it? just animating the texture acordinaly?


Peer(Posted 2003) [#42]
How to implement it the best way to the Editor? I don't know. Perhaps you have got a good idea.

It is only an animated texture to one long object. The texture is scaled in relation of the length and width of the river. Then only called PositionTexture at the right position. It's very easy to program.

ckob: I've seen the grate screens. But no description. So now, what is your game about?


ckob(Posted 2003) [#43]
well I cant really say because the plot right now is not under copyright :/


Peer(Posted 2003) [#44]
Ok. no problem.

I only want to say that this will be my last post for the next time. I'll come home again the 9th may so I can't answer till then. I haven't get the Engine up so I am sorry that you have to wait an week longer. But then I'll finish it as fast as I can.


ckob(Posted 2003) [#45]
no probs


L&L(Posted 2003) [#46]
thats fine


L&L(Posted 2003) [#47]
yo ckbob :) i got a copy of the servant on my computer. i think u gave me it a while back... it doesnt connect though :(


L&L(Posted 2003) [#48]
this thread is bigg


Peer(Posted 2003) [#49]
I'am back! And it's really big and it will get much bigger :)


ckob(Posted 2003) [#50]
:) i hope


_PJ_(Posted 2003) [#51]
nahh-- it wont :P


L&L(Posted 2003) [#52]
cool peer :)


i think we have set a record for one of the biggest threads!

i always set records for big things ;)


Peer(Posted 2003) [#53]
I saw a threads with over 100 replys. But if we stay on like this we will make that easily :).


L&L(Posted 2003) [#54]
lol yea :) hows the proj comin?


Peer(Posted 2003) [#55]
Static Level of Detail is much more complikated as I axpected. But I'll stay at it and make it as fast as possible. Till mow you can create a map of two triangles and specify the detail at every position. But it has many bugs till now wich makes holes in the map.

I have to rewrite parts the leveleditor for the new functions, too. I hope this will not take to long.

===========================

And your project L&L. Any notes, screens or demos so far?


L&L(Posted 2003) [#56]
no im workin on it though :-P, right now im trying to get some of the tcp/udp functions down...


Peer(Posted 2003) [#57]
Bad News.

The problem I had get even worse. The splitting on the vertexes now works fine in one Triangle (half map) but the divides doesn't work at the other half. This bloks everything. I have to do this first before I can go on with other things.

So I am sorry but this will take longel as I axpected. I hope you will understand that.



Is anyone of you two ounder time prssure? If yes we have to look how we can make this. But I don't hope.

!!!I'll do everything I can!!!


Peer(Posted 2003) [#58]
Good News :-)

The problem I had I fixen with only one line of code :-). It was a programming fault that looked out like a logical/mathematical fault. I hope that now everything goes on much faster.


L&L(Posted 2003) [#59]
cool keep me posted :-P


Peer(Posted 2003) [#60]
Setting detail at every position possible now. I hope I will get the Terrain Engine finished the next days. Then I have to rewrite parts of the editor and that's it.


L&L(Posted 2003) [#61]
cool beans


L&L(Posted 2003) [#62]
right now i am texturing some houses that will be used in an online demo of the game which should be out by mid august...

ill hopefully have some screenies later on next week


Peer(Posted 2003) [#63]
Terrain Engine Finished!!!

I only have to rewrite the Editor and that's it.

New things:
-Dungeons are no longer supported :(
I can't support dungeons with the new Engine but you can do them by making a big, flat pice of Terrain and set your doungeon on it like a building.

-Three tabs at the Editor.
Because Blitz3d lacks at the ability or removing Vertexes and Triangles you have to chose the Detail at every position first in a 2D Screen. Then you can change the heighs normaly and store the Objects on it normaly

=============================================

Problem: Textures


L&L(Posted 2003) [#64]
SCooby dooby dooo peer where are you?


roboslug(Posted 2003) [#65]
Would love to see the source code for this engine! Peer, you have another interetsed party! Thanks for bumping this L&L, would never have seen it otherwise.

I have two games in the pipeline that I could really use a modified version of an engine like this for. I have been building one from scratch, but would rather spend more time on game than terrain engine/editor (even one that I had to modify for my purposes)...for now anyway.

I hope your still there Peer...


myspys(Posted 2003) [#66]
ckob,

"well I cant really say because the plot right now is not under copyright :/ "

as soon as you write something, it's under copyright, automatically

it's not like trademark or a patent, which you have to apply for


roboslug(Posted 2003) [#67]
But you have to more or less timestamp the "something" in order to have proof that yours predated any "stolen" material, which is why people do things like send their manuscripts to themselves and leave them sealed in the envelope.

If you can't show proof that your was the original in time, then for all the court knows, you could have stolen it.

Since computer clocks are adjusted by the user, file time stamps are not in themselves enough proof. the closest thing to "provable" computer time is to use multiple certified time servers and log all clock adjustments in a chained hash logging mechanism (thus, proof of log accuracy). Even this has not been tested in court however.


L&L(Posted 2003) [#68]
weee where is peer peer i miss you :(


L&L(Posted 2003) [#69]
RIP Peer 2002-2003 ;)