Announcement

If you are having trouble logging in, please reset your password.
If you are not getting an activation email, please check your spam or
use the "Contact Us" to contact an admin.
February 14, 2012, 10:30:57 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Thanks to the quick help I got the Bscript issue solved.




But I got a new one  :woohoo:


 




I noticed as soon as I added 1 NPC, the scene had a severe overall framedrop. this means going from 50-60 frames to 40-50, about a 10 frame drop. now imagine a couple tens of more NPC's that would make the game crash.




Does anyone know what causes this? I expect a NPC to take some CPU power yes, but 10 frames for one single NPC seems a little bit too dramatic to me.


 




Besides, on the dock scene where Titanic is anchored there are about a hundred NPC's all animated with about the same 10 frame shortage. that's reasonable I think.


 




Lowering the level of detail/ draw distance did not help much.


 




Is there something I should look at? or does anyone know how to solve this?


 




Like always, help is greatly appreciated!

#1 February 14, 2012, 11:02:48 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Hi Rob,


 




Try taking out anything in the scene that isn't needed/is excess detail that will not be seen.




The engine sometimes struggles to render lots of npcs and a lot of scenery at the same time.


 




For example, for the dock scene you would only need Little Italy and Central Island. New Ark, Downtown, Hoboken, Oakwood and Oak Hill cannot be seen from the dock and are therefore useless "luggage" for the engine to cope with.

#2 February 15, 2012, 12:25:03 AM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Hey Rob, the only time that has happened to me, is when I had created a loop within a loop and the npc script got running the loop over and over on top of each other...are you sure its the same script, and is that script calling for a missing object or otherwise defaulting into a loop?


 




You want to post the script for review?


 




200 + NPC's all doing the same thing....





#3 February 15, 2012, 12:34:56 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Thanks for the replies!


 




the problem is, nothing in that scene is unnecesairy. it's the exterior model of the ship with only the boatdeck grand staircase inserted.


 




The exact same model without the GSC is added to the dock scene. so this very complex model plus the city should run far more slower with all of those NPC's instead of only the exterior with the GSC model and only 1 npc.


 




and the GSC model does not have that many polygons. at least not enough to make impact on the CPU usage.


 




Maybe what Matteo says is right, it could be a endless loop. your video explains very well that the game should be capable of showing many NPC's (I like that video btw   <img src="/wp-content/uploads/invision_emoticons/tongue.png" alt="" data-emoticon="" srcset="/wp-content/uploads/invision_emoticons/tongue@2x.png 2x" width="20" height="20">  )


 




This is the script I gave the captain:







 




To see if it was the script causing it, I deleted it and tested the game.


 




FPS with the captain still alive:







 




Tragedy happened:







 




FPS with the captain dead:





#4 February 15, 2012, 03:54:20 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
How's the FPS without any NPCs Rob?

#5 February 15, 2012, 04:06:21 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
the same as with dead NPCs




it varies from where I'm standing. I'm still working on some optimizations.




the effect of objects fading out when far away is very CPU intensive, so if I make an empty model as the far distance model of an object, the object should just dissapear and not fade out when the player is walking away from it.


 




So the framerate is very random, it can be 60Frames, or 30

#6 February 15, 2012, 04:22:53 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Try changing the wait portion of the npc script to a finite wait


 




change


 







<pre class="ipsCode">

let flt[0]=flt[0]-500



wait flt[0]

</pre>






 




to







<pre class="ipsCode">

wait 1500

</pre>






 




or however long the wait period is for the animation


 


 




nothing from nothing leaves nothing and it looks like MAYBE you are cycling the animation too fast - just a guess

#7 February 15, 2012, 04:30:14 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
nopes, no luck, still the framedrop.




even though there is a wait command, the animation seems to loop instantly no pauses between.

#8 February 15, 2012, 05:20:32 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Okay I am just going to shoot some ideas out here


 


 




First I notice you didn't ID the actor for the script and didn't include some of the game nominclature


 




try this code (adjusted to your actor name and animation)


 




dim_flt 2




dim_act 2




findactor 0,"Tommy"




findactor 1,"woman2"


 


 




{ up




if flt[1]=1,2,-1




enemy_playanim "UStoluVysvetlovani01.I3D",0


 


 




label 1




wait 10000




goto 1




label 2




}


 


 




It uses the {up} code which returns the character to the script after activation , it identifies the character and it shunts the the loop to a wait time that DOESN"T include the animation. Some animations need to be set once then left alone. And only need to be refreshed after the character was activated


 




Also I noticed you are using a police model which has some embedded scripts in regard to Tommy so set the character to no reaction on player


 




See  if that helps

#9 February 15, 2012, 07:19:23 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
I found the problem!


 




it has to do with Titanic's collissions, apperantly the collission model is still too complicated for characters to calculate. so what I'll do is to seperate the collission model of the deck itself from the rest of the collissions.


 




What I did to find out was to add about 15 NPCs into the scene, all with cordinates 0,0,0.




now they were all walking on the drop collission below the Titanic, no change in FPS!


 




Then I moved them all onto the ship, and as soon as I ran the game, FPS decreased to ~10FPS




After I killed them all, FPS went normal. That explains why the draw distance/ level of detail had no effect to this.


 




Let's hope the best for this collission trick.


 




Thanks everyone for the great help once again!

#10 February 15, 2012, 07:30:10 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Cool Beans!

#11 February 15, 2012, 10:10:52 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Hmmm, I'm affraid my method is not working..


 




I split up the collission model into several parts, but still there's a huge FPS drop.




I'm now gonna ask ASM, maybe he knows a trick, he's my last resort I guess unless someone else knows how collissions work.

#12 February 16, 2012, 08:15:41 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Yesterday evening I was kindly assisted by ASM, I tested a few things that ASM suggested, but so far no great result. There's still a framedrop. There's a more technical story involved at what's causing this.




So my guess is that I'll have to stick with it. I'll try to do my best at keeping the FPS as playable as much as possible with still a decent ammount of NPCs.


 




Luckely the interior collissions exist out of simpler shapes so they shouldn't do much harm.


 




This is one of those setbacks that make me wish I had that SDK. I could optimize the scene to it's finest.




Perhaps I'll consider several loading screens for diffrent sections of the ship. This will also solve the issue with the sounds of the ocean and wind being heard inside of the ship.

#13 February 16, 2012, 08:50:06 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Sorry if this has already been suggested but have you got any other mods running? for example the snow mod... I can see you haven't got that running but something similar.


 




I don't know much about modding so this is probably a load of rubbish but just a thought I had.

#14 February 16, 2012, 08:56:49 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
It may sound idiot, maybe when the action happens your CPU start to heat and to protect itself it slow down, i saw that in other puter and sometime just a good inside cleaning with an air blower so the CPU can fontionne properly.