Gamestudio Links
Zorro Links
Newest Posts
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
2 registered members (AndrewAMD, dr_panther), 1,290 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 2 of 3 1 2 3
Re: Level Size/Number of Objects Problem [Re: ulillillia] #68541
03/30/06 18:36
03/30/06 18:36
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline OP
Senior Member
Galen  Offline OP
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
I think I remember reading that thread. I'll have another look.

At this point, what I really need are "quick" fixes to get frame rates down to an acceptable level. In other words, I don't want to rebuild my entire level again (which I've already done), but it sounds like I could maybe just copy all my blocks and textures, etc, out of each seperate level file, then copy them all into the same level file, and either see how they compile as one level (barring the stuff like plants sprites, windows, etc), and/or then re-chunk the level into a grid as you suggested earlier. But I really wanted to get the architecture all the way built before I start messing around with optimization, so I'll be doing that stuff later. You got me back on track though with the objects error I was getting, so thanks again for that!

Re: Level Size/Number of Objects Problem [Re: Galen] #68542
03/31/06 11:06
03/31/06 11:06
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
I've rebuilt my city world level (in my screenshot) 4 times now and I've got a fifth rebuild in order. Each time I do it, it gets better and it renders faster. My abandoned project has had at least 2 builds and a third one is needed. To rebuild mainly just the plants area shouldn't actually take long. Just have your model positioned and textured and use lots of copy paste (be sure you have plenty of copy paste on hand as it'll take quite a bit of it). For a whole field of grass, taking out the time to make textures, it should take but 5 minutes to cover an acre with an 8:1 map scale (8 quants is 1 foot) and, using a shortcut with texturing, applying the texture would take less than a minute. You don't have to do a complete redesign, just the part where all those plant entities are done.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Level Size/Number of Objects Problem [Re: ulillillia] #68543
10/28/06 01:50
10/28/06 01:50
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline OP
Senior Member
Galen  Offline OP
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
I think my level size is getting way out of hand.

When I would build and run it before the 6.4 version, I could actually get it to load, but since I upgraded to 6.4, it only loads some of the entities and then freezes.

Anywho, when I try to run the wmb from my work directory, it tells me it can't and that the nexus size is like 2700. ACK! I know that's huge.

I need some good advice on how to cut down on the nexus size without throwing out my work. Namely:

1. The recommendation to cut my level into separate "chunks (like on a grid) and build them separately and then combine them into the final, big level, is intriguing, and I could use some tips on how to do that. As it is now, my level is a mix of wed architecture, entities, models and sprites. Re-positioning them all would be, to a great extent, too much trouble. Any shortcuts available? Can I retain positioning somehow?

2. Is there a way yet to export wmp architecture to mdl while retaining texture information? I've been building a lot of my models in Blender, and I'm getting quite comfortable with that and the excellent exporter and model reducer some folks wrote... In any case, if I could also export models in their current position and then combine them into one model (say a group of plants staggered on a sloping hill), that would be helpful, yes?

3. My level is *big* geographically, given that most of it is architecture. And I don't have much choice on this because it's based on a real public building with lots of open space both inside and surrounding it, and it has a lot of windows. I can't have parts of the map that should be visible not visible, and I can't have separate "levels" having to load up because movement has to be seamless as this is for an interactive walk-through that is expected to get a lot of use (no wait times allowed). Any advice on how to accomplish this? Would the "chunking" of my level as described above (along a grid) help with this?

Any and all advice would be much appreciated. At this point I need to be able to run my level just to see if my doors are working in it properly, and I can't even do that. Please help me undo my newbie mistakes!

Thanks...

Re: Level Size/Number of Objects Problem [Re: ulillillia] #68544
10/28/06 15:08
10/28/06 15:08
Joined: Sep 2006
Posts: 108
J
Jered Offline
Member
Jered  Offline
Member
J

Joined: Sep 2006
Posts: 108
@ ulillillia

Way above you spoke of enteties inside of entities not showing up because of some kind of bug....here is a quote from the manuel

Quote:


map_subents
Determines whether entities contained in map entities are to be placed into the level, or not.
Range:
on - place sub entities (default).
off - don't place sub entities.
Type:
Var, redefinable
Example:
var map_subents = off;






I havea question for you though, if you don't mind helping a bit here. if I cut my level down into chunks and make map entities out of them, is that considered by WED to be an entity or a model? Is it possible to take the entity you just made, and turn the entity into a model?

I have tried several aproaches. The only thing I could figure out was to group everything together then save it as a level (wmp). Then import that into MED. However once I get to that point, I have no textures and what have you, so how would I go about taking what I now have and getting the textures that are on it in WED on it in the model editer?

Which is better: a model or a map entity as far as performance is concerned?
Is it even possible to take something from WED group it together import it to MED and get it mapped out and skinned to be a model?

I have been messing with this for 3 and a half hours so far, and that is the best I got lol.


3DGS (6.4) Commercial
Re: Level Size/Number of Objects Problem [Re: Jered] #68545
10/28/06 18:58
10/28/06 18:58
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline OP
Senior Member
Galen  Offline OP
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
*bump*

Anybody? In regard to the previous 2 posts? Could really use some help here if anyone knows the answers.

Thanks...

Re: Level Size/Number of Objects Problem [Re: Galen] #68546
10/29/06 14:58
10/29/06 14:58
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline OP
Senior Member
Galen  Offline OP
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
*bump*

Seriously, if I have to beg for some help with this, then...

Last edited by Galen; 10/29/06 14:59.
Re: Level Size/Number of Objects Problem [Re: Jered] #68547
10/31/06 03:11
10/31/06 03:11
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline OP
Senior Member
Galen  Offline OP
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Quote:

@ ulillillia

Way above you spoke of enteties inside of entities not showing up because of some kind of bug....here is a quote from the manuel

Quote:


map_subents
Determines whether entities contained in map entities are to be placed into the level, or not.
Range:
on - place sub entities (default).
off - don't place sub entities.
Type:
Var, redefinable
Example:
var map_subents = off;






I havea question for you though, if you don't mind helping a bit here. if I cut my level down into chunks and make map entities out of them, is that considered by WED to be an entity or a model? Is it possible to take the entity you just made, and turn the entity into a model?

I have tried several aproaches. The only thing I could figure out was to group everything together then save it as a level (wmp). Then import that into MED. However once I get to that point, I have no textures and what have you, so how would I go about taking what I now have and getting the textures that are on it in WED on it in the model editer?

Which is better: a model or a map entity as far as performance is concerned?
Is it even possible to take something from WED group it together import it to MED and get it mapped out and skinned to be a model?

I have been messing with this for 3 and a half hours so far, and that is the best I got lol.




That's my major question at this point to--how does one retain the texture information and mapping by exporting level WED geometry into MED? Same question for models in my level--if I want to export a group of plants from WED to MED and retain both position of those models and all texture information as well? Is there a trick to this? Thanks...

Re: Level Size/Number of Objects Problem [Re: Galen] #68548
10/31/06 22:48
10/31/06 22:48
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline
User
DavidLancaster  Offline
User

Joined: Nov 2004
Posts: 862
Australia
Maybe a little off topic. We have been able to create very large levels in 3DGS by creating a real time level editor which stores the ID, xyz and rotation of an object into an array which is then saved into a txt file, when the game loads the txt file is loaded and it's values is stored into an array, each frame a loop runs through the array and determines how far the xyz position is from the camera, if it is close enough the object is created if not it moves on to checking the next value in the array. Then in the objects function if it moves far enough away from the camera it is removed. This way you can have a huge array containing 100,000s of objects, but only have a few hundred created and using functions at once. The downside is that the level is made up of only models and terrain, so it lacks the huge visual improvement of lighting, unless we figured out how to bake it.

As far as I know you can only export the geometry from WED, there may be a way by importing WED into 3D World Studio then somehow exporting to another format and get it into blender somehow, but I doubt it.

Re: Level Size/Number of Objects Problem [Re: DavidLancaster] #68549
11/01/06 00:52
11/01/06 00:52
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline OP
Senior Member
Galen  Offline OP
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
That array solution is actually very cool. So far, I really don't have much in the way of lighting in my level, and I'm not sure how much I'm going to even put in since it is mostly sunlight (outside) and some scattered lights inside, but just for effect. If I do anything, it might be some kind of bloom effect, but shadows and dynamic lights aren't really necessary for what I'm doing, so using an array might be of advantage to me. Do you perchance have some more detailed instructions handy on how this was done?

Thanks for the reply!

Re: Level Size/Number of Objects Problem [Re: Galen] #68550
11/02/06 00:56
11/02/06 00:56
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline
User
DavidLancaster  Offline
User

Joined: Nov 2004
Posts: 862
Australia
Sure, be warned, code may be non understandable, I don't have the time to go through and explain it all in detail, but it should give you the rough concept.

I would place the code below in a loop in a starter function. static_info is the array which stores object information, ID, xyz, rotation, and a value which is set if the object has been created already or not (to determine if it needs to create it). I am using variables you may have to define yourself such as result2 etc.

Code:

result2 = 1; //start at the beginning of the array
WHILE (1) {
IF (static_info[result2] > 0) { //if our ID is greater than 0
vec_set(temp.x,vector(static_info[result2 + 1],static_info[result2 + 2],static_info[result2 + 3])); //find the position of the object
result = vec_dist(vector(camera.x,camera.y,0),vector(temp.x,temp.y,0)); //find distance from object to camera
IF (result < 5000 && static_info[result2 + 7] == 1) { //if object is within 5000 quants and isn't already created
find_static(static_info[result2]); //find the object using it's ID
static_info[result2 + 7] = 2; //set to 2 means the object is now created
you = ent_create(temp_string,temp.x,static_ent); //create the object at the location specified in the array
vec_set(you.pan,static_info[result2 + 4]); //set object rotation
you.visible_range = 5000; //this is a skill I made used to determine how far the object needs to be from the camera to be removed, so that I could assign different values to different objects, you may not need this
you.skill1 = result2; //set the objects skill1 to the value the object exists in the array
}
} ELSE {
IF (next_static == -1) { next_static = result2; } //next_static is the point in the array the next object gets created at, I initially set it to -1 upon level load, then the moment the script finds an ID in the array which is at 0 it sets this point in the array to create the new object at
break;
}
result2 += 8; //go to the next object in the array
IF (result2 >= 9000) { break; } //if we have reached the array limit (in this case 9000) break the loop.
}



This is what I did to create a new object, in the same loop but at the bottom section:

Code:

IF (key_caps == 0 && key_b == 0 && b_press == 1) { b_press = 0; }
IF (key_caps == 1 && key_b == 1 && b_press == 0) {
beep;
b_press = 1;
result3 = 1;
WHILE (1) {
find_static(1);
you = ent_create(temp_string,camera.x,static_ent);
you.skill1 = next_static;
static_info[next_static] = store_static_ID;
vec_set(vector(static_info[next_static + 1],static_info[next_static + 2],static_info[next_static + 3]),camera.x);
next_static += 8;
result3 -= 1;
IF (result3 <= 1) { break; }
}
}



The find_static function looks like this, I am separating the .mdl part of the string to stop WED looking for the models when it loads:

Code:

FUNCTION find_static(static_ID) {
vec_set(temp_scale.x,vector(1,1,1));
str_cpy(temp_string,"lamppost1");
IF (static_ID == 1) { str_cpy(temp_string,"lamppost1"); }
IF (static_ID == 2) { str_cpy(temp_string,"woodhouse1"); }
IF (static_ID == 3) { str_cpy(temp_string,"woodbridge1"); }
str_cat(temp_string,".mdl");



You can then use a pointer such as clicked_object, set it to the entity you click on through event_click or something. In the objects while loop I added something like this when saving the data:

Code:

WHILE (saving_objects == 1) {
static_info[my.skill1 + 7] = 1;
wait(1);
}
IF (saving_objects == 0) { static_info[my.skill1 + 7] = 2; }



Saving_objects is set to 1 when you press a key, it waits a few frames then every object that exists is currently set to non existant 1, to write to the file so that the next time you load the objects are placed in. The after saving has stopped it is set back to existant. I use some function to move and rotate the object, then store the new data:
Code:

vec_set(static_info[my.skill1 + 1],my.x);
vec_set(static_info[my.skill1 + 4],my.pan);



to remove the object if it moves far enough away from the camera I used something like this:

Code:

static_info[my.skill1 + 7] = 1;
ent_remove(my);
return;



Page 2 of 3 1 2 3

Moderated by  HeelX, rvL_eXile 

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