0 registered members (),
1,459
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Level won't display properly with any script..
[Re: FixxeR]
#100710
01/02/07 17:08
01/02/07 17:08
|
Joined: Aug 2005
Posts: 336 Connecticut
Galen
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2005
Posts: 336
Connecticut
|
Ah.... when you say "inside", how exactly do you mean? For example, I have a building and all its walls, floors, roof, built as a single entity. Then, I have the windows built as separate entities, and then in my main level, I have the building entity loaded, and then I have the window entities loaded and placed in the open window frames of the building entity. Is that what you mean? Or do you mean if I "built" an entity on its own that had another pre-built entity included in that build, and THEN tried using that combination in my level? If you mean the former example, then I'm not sure 3DGS is going to work for my project if I can't load pre-built pieces of my building like that, but if you mean the latter, I might be able to track down the extra entity in question and revise my build. Thing is, it all works fine in preview mode. This really is a stumper.
|
|
|
Re: Level won't display properly with any script..
[Re: FixxeR]
#100712
01/02/07 21:36
01/02/07 21:36
|
Joined: Aug 2005
Posts: 336 Connecticut
Galen
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2005
Posts: 336
Connecticut
|
Okay, this put me in the right direction!
I tried systematically eliminating entities from my main level until I would no longer get an error. I believe I have narrowed it down somewhat, though this didn't get the level to run. What I *did* notice after that that I was starting to get messages indicating a certain action/material wasn't found, so I added those back to my level script, along with some directory paths for at least one texture that wasn't being found. And I had to set max_entities to a higher level.
This allowed my level to load.
However, the template script I was using had me stuck in the middle of my level with no way to move (I don't have a player model--I want to use just cameras to move), so I edited the script to take out those player model references, as well as an erroneous camera script, and this allowed me to move around with the camera in my level.
A few problems remain, however. I still need to fix those entities that aren't loading, and now that my level loads, it seems that there are more entities missing than the ones I had previously narrowed down to (and some of them are simply TGA sprites that had been loaded into the level, which I wouldn't think should go missing at all). Also, movement is very slow, especially compared to preview mode, which is pretty fast. So I need to fix these somehow...
Here is my level script file: //////////////////////////////////////////////////////////////////////// // A6 "Walk Thru" Project wdl: // Created by WED. ////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////// // The PATH keyword gives directories where template files can be found. path "C:\\Program Files\\GStudio6\\template_6"; // Path to A6 templates directory path "C:\\Program Files\\GStudio6\\template_6\\code"; // Path to A6 template code subdirectory path "C:\\Program Files\\GStudio6\\template_6\\images"; // Path to A6 template image subdirectory path "C:\\Program Files\\GStudio6\\template_6\\sounds"; // Path to A6 template sound subdirectory path "C:\\Program Files\\GStudio6\\template_6\\models"; // Path to A6 template model subdirectory path "C:\\Program Files\\GStudio6\\work"; // Path to work subdirectory path "C:\\Program Files\\GStudio6\\work\\Exterior GL PIX\\Horizon Pix"; // Path to HPIX subdirectory path "C:\\Program Files\\GStudio6\\work\\Exterior GL PIX\\Textures"; // Path to textures subdirectory
///////////////////////////////////////////////////////////////// // Filename of the starting level. string level_str = <GLMain.WMB>; // give file names in angular brackets
//////////////////////////////////////////////////////////////////////////// // Included files include <gid01.wdl>; // global ids include <display00.wdl>; // basic display settings include <door01.wdl>; include <nogouraud.wdl>; include <sky01.wdl>; include <tree1.wdl>;
///////////////////////////////////////////////////////////////// // Desc: The main() function is started at game start function main() { // set some common flags and variables // freeze all entity functions freeze_mode = 1; // no level has been loaded yet... gid01_level_state = gid01_level_not_loaded;
// entry: Warning Level (0,1, or 2) // entry_help: Sets sensitivity to warnings (0 = none, 1 = some, 2 = all). warn_level = 2; // announce bad texture sizes and bad wdl code
// entry: Starting Mouse Mode (0, 1, or 2) mouse_mode = 0;
// wait 3 frames (for triple buffering) until it is flipped to the foreground wait(3);
max_entities = 5000;
// now load the level level_load(level_str);
wait(2); // let level load // level should be loaded at this point... gid01_level_state = gid01_level_loaded;
//+++ load starting values
// un-freeze the game freeze_mode = 0;
// save start of game here wait(6); // allow time for functions that wait for "gid01_level_loaded" to load file_delete("start0.SAV"); // remove any old savefile wait(1); if( game_save("start",0,SV_ALL) <= 0) { diag("\nWARNING! main - Cannot save 'start' of level (ignore on restarts)."); } else { diag("\nWDL: main - Game 'start' saved."); }
// main game loop while(1) { if(gid01_level_state != gid01_level_loaded) { freeze_mode = 1; // pause the game while(gid01_level_state != gid01_level_loaded) { wait(1); } freeze_mode = 0; // resume the game } wait(1); }
}
// Desc: this is the function used to restart the game. function main_restart_game() { // wait 3 frames (for triple buffering) until it is flipped to the foreground wait(3);
// freeze the game freeze_mode = 1;
if( game_load("start",0) <= 0) { diag("\nWARNING! main_restart_game - Cannot load 'start' of level."); } else { diag("\nWDL: main_restart_game - Game 'start' loaded"); }
// un-freeze the game freeze_mode = 0; }
// Desc: this is the function used to quit the game. function main_quit() { //+++ // save global skills & strings exit; }
Any suggestions would definitely be appreciated, and I appreciate all the help I have gotten so far. My goal at this point is just to be able to load my level with all entities and a camera view that is acceptably fast so that I can concentrate on testing my automatic doors, etc, before moving on with finishing the level architecture...
|
|
|
Re: Level won't display properly with any script..
[Re: FixxeR]
#100713
01/02/07 22:42
01/02/07 22:42
|
Joined: Aug 2005
Posts: 336 Connecticut
Galen
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2005
Posts: 336
Connecticut
|
Alright, after some more tinkering around, I've discovered something else.
If I try to run the level now, there are a bunch of models and entities that show fine in preview mode but then do not load up in Run mode.
If I delete all the content of my level at one time and try to compile, of course it won't, but then when I hit "undo" and it all comes back, if I then compile again and "Run", DIFFERENT MODELS AND ENTITIES DISAPPEAR than the ones that disappeared before removing all content and then undoing.
Why would models and entities that had disappeared before suddenly appear, and models and entities that were there before suddenly disappear?
I'm thinking that there's nothing wrong with my models and entities themselves, but rather there may be an issue either with numbering system of the models and entities in my level (removing and "undoing" (re-adding) may change their "block number" somehow?), and/or 3DGS can't handle the number of models and entities I have in my level.
Can anyone else confirm or deny these theories? Is there some way I can force 3DGS/WED to re-number all the blocks and entities in my level?
|
|
|
Re: Level won't display properly with any script..
[Re: Galen]
#100714
01/02/07 23:05
01/02/07 23:05
|
Joined: Aug 2005
Posts: 336 Connecticut
Galen
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2005
Posts: 336
Connecticut
|
Okay, after more tinkering and searching the forums here, I discovered that by lowering the max_entities a bit, I could improve the speed, so I lowered it to 2000 from 5000, and that seemed to help camera speed a lot.
When I build the level, it says it is placing 1234 objects. I am still getting an error of "Can't Load", and as per my previous replies, various entities/models just won't show up, even the all the ones I checked have noting wrong with them (ie, entities within entities). Does anyone know why WED would choose to not load some entities and models, yet choose to load others?
Thanks...
Also, is there a way to have WED report what object is causing the w1508 "Can't Load" error when I run it?
Last edited by Galen; 01/03/07 00:57.
|
|
|
Re: Level won't display properly with any script..
[Re: Galen]
#100715
01/03/07 16:52
01/03/07 16:52
|
Joined: Jun 2003
Posts: 1,017 Germany
Thomas_Nitschke
Senior Developer
|
Senior Developer
Joined: Jun 2003
Posts: 1,017
Germany
|
This is really getting interesting... in unfortunately rather negative a way. Since I have no ideas left as of now, you should probably consider posting a quick reference to this thread on the "Bug Hunt" forum. PS. I thought I should mention this: You seem to be one of the rather oldschool Acknex users around here I suppose so because you refer to WED loading objects (instead of Acknex - WED has nothing to do with the errors you're getting) and to "Preview Mode". No offense but this is a little outdated "Preview Mode" is an ancient term for the mode A4 still had. However A6 doesn't really have anything of the like. What you're refering to is nowadays simply called the WED 3D View. I'm telling you because when calling it "WED 3D View", it becomes more obvious that this view has plain nothing to do with the Acknex Engine. Since you stated you were a little bit surprised that your level showed up in "Preview Mode" but didn't once you ran it, I have a feeling you might have confused that.
Formerly known as The Matrix - ICQ 170408644
I've been here for much longer than most people think. So where's my "Expert" status?
|
|
|
Re: Level won't display properly with any script..
[Re: Thomas_Nitschke]
#100716
01/03/07 23:26
01/03/07 23:26
|
Joined: Aug 2005
Posts: 336 Connecticut
Galen
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2005
Posts: 336
Connecticut
|
Actually, I've only been using 3DGS for a couple of years now--you're giving me more credit than I deserve. heh
The "Preview Mode" I refer to is actually "Preview Level", available under the "File" menu... (as opposed to the 3D view window one sees while working in the level)
My level looks fine in "Preview", but for some reason it doesn't in "Run" mode. I can see the materials and actions working in "Run" (which don't show in "Preview"), but not all of the entities are loading. Like I said before, if I remove them all from the level, then add them back in, different entities will show and different entities will not show as opposed to running the level before I remove and re-add them. It's really weird. I think you may be right that this is a bug. I've gone over all my scripts, and I don't see anything (they're really simple scripts) that should be having any effect like this. I don't know why other people haven't noticed this, unless their levels just don't have enough objects in them to trigger this bug, but what do I know? At this point I think I'd pay money to have JCL or Doug look at my project file and tell me what's wrong with it... (assuming they'd do it)
Last edited by Galen; 01/04/07 02:16.
|
|
|
|