Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
1 registered members (AndrewAMD), 599 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 4 1 2 3 4
Re: Destroy a block-model && Cam rotation around a fix point [Re: EvilSOB] #221022
08/11/08 17:28
08/11/08 17:28
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Quote:
Cant convert 'POINTER' to 'struct VECTOR'
temp = vector(0,0,0);


Quote:
Syntax Error
for(row_index=0;row_index<bitmap_weite;row_index++))



Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Destroy a block-model && Cam rotation around a fix point [Re: Espér] #221073
08/12/08 01:50
08/12/08 01:50
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Sorry, I didnt realise temp was a real vector.

Originally Posted By: xXReapeRXx
Cant convert 'POINTER' to 'struct VECTOR'
temp = vector(0,0,0);
Try this instead:-
Code:
vec_set(temp,vector(0,0,0));


And this is pure typo, drop the last ")"
Originally Posted By: xXReapeRXx
Syntax Error
for(row_index=0;row_index<bitmap_weite;row_index++))
and use
Code:
for(row_index=0;row_index<bitmap_weite;row_index++)



"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Destroy a block-model && Cam rotation around a fix point [Re: EvilSOB] #221106
08/12/08 11:35
08/12/08 11:35
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Uhm..
with for it look so:


But it should look like that ( while ):



Any idea why???


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Destroy a block-model && Cam rotation around a fix point [Re: Espér] #221118
08/12/08 13:36
08/12/08 13:36
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Ahh crud-dammit I see, simple logic overflow in my brain...

At the bottom of the loops you'll find this
Code:
      ...
      }
      temp.x += 64;
   }
   ...
and it should be this
Code:
      ...
      }
      temp.x += 64;
      temp.y = 0;
   }
   ...

Sorry. blush But how was the speed looking?


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Destroy a block-model && Cam rotation around a fix point [Re: Espér] #221159
08/12/08 15:13
08/12/08 15:13
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
send you the project via PN...

Game crashes with the 70x70 Level-Bitmap after 2 Minutes..
10x10 needs 5-10 Seconds to finish.


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Destroy a block-model && Cam rotation around a fix point [Re: EvilSOB] #221584
08/15/08 00:00
08/15/08 00:00
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
OK, we are starting to get to the problem now.

Running the code as it stands at the moment, it takes about 45 seconds to create all the entities
BUT it takes 260 seconds to process the first frame or wait(1); statement.
At this crude stage, the FPS of the needs to be measured in Seconds Per Frame... but thats another day.

Ive modded the code to create almost all the entities as Null Entities (no model) in order to
bypass any texture memory and/or poly-count issues.
Running the NEW code, it takes about 2 seconds to create all the entities but it STILL takes
200 seconds to process the first frame or wait(1); statement.
FPS here is fine at about 40fps with some 60ish real models being shown and the null Models
positioned on screen, even though not visible as they have no meshes.

This is telling me that it is the sheer number of entities that is causing the first frame
delay more than anything else.

Those are the detailled symptoms, so are more finely tuned questions to any masters out there....

Where is this delay coming from... I take it that all the ent_create(...)'s are being 'processed' at the first
wait(1); and creating the delay. Spreading them into multiple frames still leaves us with
the same HUGE overall time to generate the level.
Is there a way to speed up or optimise bulk creation of large numbers of entities?
Say by using 'malloc' instead of 'ent_create' or something like that?

Please dont give suggestions in relation to "only creating entities as you get close enough to need them.",
as I am leaving this avenue very far down the list(but it is still on the list).


Thanks to all.

PS All these test are being run on a poor spec PC (Pentium3-3.0Ghz,512Mb ram, 128Mb ATI Video)


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Destroy a block-model && Cam rotation around a fix point [Re: EvilSOB] #221984
08/17/08 09:32
08/17/08 09:32
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Heres the best I can come up with Im afraid blush.

There were some minor changes in "function main".
They relieved the memory issues. On my 2gb of ram PC anyway.
Changing MAX_ENTITIES is the only change that really makes a difference.

Keep it somewhat low (say 100,000) only put it up if the engine complains
about not having enough entity pointers.
I "think" particle pointers are included in this number also so beware.

Code:
   ...
   wait(1);
   //                       //removed (not necessary AND causes errors) - max_nexus = 2000;
   max_entities = 100000;   //adjusted due to memory limits 		-was- max_entities = 999999;	//my maximum was 399999 before error
   level_load(NULL);        //adjusted not needed and WMB caused problems	-was- level_load("Level_Grund.wmb");	//I cant open it here because its NEXUS setting was too high
   sky_color.red = 1;
   ...
   ...
   ...
   camera.tilt = 0;
   //                       //removed (not necessary AND causes errors) - max_nexus = 2000;
   backside = levelcount;
   ...

The major change I made to fix the speed issue is NOT AN ACTUAL FIX.
All I have done is kill all the Normalising and 'shader'ing done to the blocks
and that took the level build time from 250 seconds to 50 seconds.
(tested on a 3Ghz dual-core AMD with 2Gb ram)

Code:
         ...
         pixel = pixel_for_bmap(levelmap, column_index,row_index);
         pixel_to_vec(pixelget,alphas,888,pixel);
         // weiß   = Boden_normal 
         if(pixelget.x == 255 && pixelget.y == 255 && pixelget.z == 255)	
                  ent_create("Ground.mdl",vector(temp.x,temp.y,2),NULL);   //,object_boden);	
         // schwarz = Wand_unabbaubar
         else   if(pixelget.x == 0 && pixelget.y == 0 && pixelget.z == 0)            
                  ent_create("Erdwall_0.mdl",vector(temp.x,temp.y,64),NULL);   //,object_fels);	
         // braun = Wand_abbaubar - 
         else   if(pixelget.x == 60 && pixelget.y == 90 && pixelget.z == 156)   
                  ent_create("Erdwall_0-2.mdl",vector(temp.x,temp.y,64),NULL);   //,object_erde);	
         // Farbe passt garnicht = Boden_normal
         else      ent_create("ground.mdl",vector(temp.x,temp.y,2),NULL);    //,object_boden);	
         temp.y += 64;
      }
      temp.x += 64;
      ...

So I havent fixed it, just found where the problem is. Unfortunately,
I know nothing at all about normals and shaders so this is as far as I can go.

My only advice is that the normaling/shading section "seems" to be creating
a lot of temporary materials, is it necessary? Cant you use one material
per block TYPE, and change the block's material when the block gets changed?


Bet of luck and keep in touch. grin




"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Destroy a block-model && Cam rotation around a fix point [Re: Espér] #236400
11/14/08 00:03
11/14/08 00:03
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline
User
Carlos3DGS  Offline
User

Joined: Oct 2008
Posts: 513
I have a similar problem for a game I am making and I think I have almost found the solution.

If you are still interested I could post the code and an explanation when I have it finished.


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Destroy a block-model && Cam rotation around a fix point [Re: Carlos3DGS] #236430
11/14/08 07:50
11/14/08 07:50
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I would definately be interested, and I think reaper has put this project in the
too-hard basket cause of this issue.

If you are not concerned on privacy of code, post a new thread with what youve got to date,
we may help get it finished.

Otherwise, PLEASE PM me with it, even in its un-finished state, as seeing it like that
helps me to absorb its nuances and idiosyncrasies.
PM Reaper too as he isnt monitoring the thread anymore I think.

MANY thanks.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Destroy a block-model && Cam rotation around a fix point [Re: EvilSOB] #236479
11/14/08 13:37
11/14/08 13:37
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
oh...
The project is still alive...

But I took a break with it, because I wanted to learn more lite-c before I go on with this.


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Page 2 of 4 1 2 3 4

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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