Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 629 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
level generation at runtime #368376
04/24/11 19:17
04/24/11 19:17
Joined: Feb 2010
Posts: 68
mireazma Offline OP
Junior Member
mireazma  Offline 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: mireazma] #368382
04/24/11 19:53
04/24/11 19:53
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
no can can store such a level in your own level format
maybe you can store all level objects in a struct and then save them to a file and later restore them....


Visit my site: www.masterq32.de
Re: level generation at runtime [Re: MasterQ32] #368393
04/24/11 21:40
04/24/11 21:40
Joined: Feb 2010
Posts: 68
mireazma Offline OP
Junior Member
mireazma  Offline 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 Offline
Senior Expert
Quad  Offline
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 Offline OP
Junior Member
mireazma  Offline 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 cool
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.
Re: level generation at runtime [Re: mireazma] #368406
04/24/11 22:52
04/24/11 22:52
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
ent_createterrain + ent_setvertex


3333333333
Re: level generation at runtime [Re: Quad] #368407
04/24/11 23:32
04/24/11 23:32
Joined: Feb 2010
Posts: 68
mireazma Offline OP
Junior Member
mireazma  Offline OP
Junior Member

Joined: Feb 2010
Posts: 68
shocked TESEKUR ARKADAS!!! grin


ERROR in communism.cpp, line 0:
#include<god.h>
was fatally missed.

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1