1 registered members (AndrewAMD),
629
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
level generation at runtime
#368376
04/24/11 19:17
04/24/11 19:17
|
Joined: Feb 2010
Posts: 68
mireazma
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2010
Posts: 68
|
Hello. Is it possible to make such a game so it could parametrically generate a terrain and place map entities, sprites and all and of course - place normal entities? So basically I'd need a parametric level editor made as a game in GS. I think I could easily generate a height map for the terrain and create the entities at some locations but I think the trouble is that the level must be compiled (as wmp) before being used, right?
ERROR in communism.cpp, line 0: #include<god.h> was fatally missed.
|
|
|
Re: level generation at runtime
[Re: MasterQ32]
#368393
04/24/11 21:40
04/24/11 21:40
|
Joined: Feb 2010
Posts: 68
mireazma
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2010
Posts: 68
|
Thank you for coming up with an idea. Now what you wrote got me to this: What if I make tiny little wmb's and use them as terrain tiles? Then at runtime I'd create many of each different type of "terrain" and arrange them in various grids.
But I'm not yet familiar with the difference between wmb's and wmp's and when use ones and when use the others. So if I create - at runtime - like 1000 x 1000 tiles (wmb's) should they still need to be pre-compiled? And what would the performance be different from one single huge terrain?
If you or anybody can come up with something, as little as it is, it would be great and highly appreciated.
ERROR in communism.cpp, line 0: #include<god.h> was fatally missed.
|
|
|
Re: level generation at runtime
[Re: mireazma]
#368397
04/24/11 22:21
04/24/11 22:21
|
Joined: Oct 2007
Posts: 5,210 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
|
WMP is uncompiled working files, only WED can open that, engine does not use these files.
WMBs are the compiled versions of that WMP files engine can load these files with level_load. So if you want to use WED you need WMBs.
But, wait! You do not have to use the WED. or WMPs and WMBs.If you do not use blocks and if you are going to procedurally create your levels at runtime you do not need WED. Just load an empty level: level_load(NULL);
Then create your terrains(.hmp) and models(.mdl) with ent_create. Nothing needs to be compiled. You can also save these levels to a text/xml/json etc. file and write your own loading function(using ent_creates etc..)
You can also create wmbs with ent_create.
For the terrain i do not think it will make much difference but if it's really huge, you may need to use separate tiles.(there is a limit for terrain vertex count). Try and check the performance yourself.
3333333333
|
|
|
Re: level generation at runtime
[Re: Quad]
#368402
04/24/11 22:41
04/24/11 22:41
|
Joined: Feb 2010
Posts: 68
mireazma
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2010
Posts: 68
|
Thank you. So from what I see the approach comes down to finding a way to generate hmp's most likely from heightmaps but dang: at runtime. So if I get over this I'm totally free to do what's on my mind But I can't see a way to reproduce in-game what MED does: this very converting...
ERROR in communism.cpp, line 0: #include<god.h> was fatally missed.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|