Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / Physics and Dynamic/Static properties and the proper use for them.

Author
Message
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 27th Feb 2006 19:55 Edited at: 27th Feb 2006 20:55
Ok community I have been messing around with Physics and Dynamic/Static properties and trying to learn how to properly impliment them. This is what I have learned through my own development.

Physics

1)Physics are not required on most things, some examples of things that do not need physics turned on.
a.NPC's
b.Player weapons
c.Items such as Ammo, Health, radios, flashlight('er torch)

NPC's that have Physics turned off appear to be extremely aggresive.
PLayers weapon is effected by the changes you make to accuracy and damage produced by the weapon.
You can still pick up entities such as ammo and health and it still uopdates info like it is supposed to.
Almost all of your entities in a game will have physics turned off, since it is not needed

The rule of thumb that I use is this:

If it is not meant to be effected by bullets or the player bumping in to it then it does not need physics. It would be nice to have every box react in some manner by player interaction but it's not optimisable with FPSC.

Dynamic/Static Properties

Ok not every item in your game needs to be a Dynamic entity. In fact having everything Dynamic kills your frame rate since the engine has to constantly re-calculate the entity. While pushing Every little box, chair or Sci-Fi tube off of a ledge to smash the enemy is an awsome game effect it should be used at a minimum. Using items to advance in a level is great but you shouldn't go overboard with them. While everyone one wants to build a great and mentally challenging game you need to keep a few things in mind.

1.Dynamic entities are Items that are in the game for player interaction. These items are not a part of the level geometry and are constently re-calculated by the engine: Meaning The lights are always updated to reflect current position for it's shadow. if item is moved the engine has to constantly calculate collision data. And with physics on it adds that little extra FPS drain. *read Physics portion above to deicde what Dynamic entities require physics*

2.Static Entities are items that are a part of the Level geometry. The engine does not have to spend as much time re-calculating these items since shadows and the other effects of lighting have been burned in to the object area. Static items dont require physics at all. when was the last time you witnessed a 200 pound crate slide across the floor after someone bumped in to it? You can adjust the item weight to make it more realistic. But is it really needed to have that box move around, is it going to take away from your game? probably not unless the item is an object item or an item that has to perform a function for an objective. So for the most part 98% of your entities in a game should be static.

Give it a try if you don't believe me. create a map and purposly get the frame rate to be low. then turn the physics off of everything and your frame rate will improve.

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 28th Feb 2006 21:58
Did this help anyone?

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 28th Feb 2006 22:44 Edited at: 28th Feb 2006 22:52
The proper use for them is debateable in a situation where apparently there is no culling.

Although the general principles regarding the use in particular of dynamic entities and also good level design is obvious to gamemakers - with regard to FPSC there has been much debate as to how static or dynamic entities affect fps differently.

I have seen numerous threads where users suugest that large numbers of static entities cause an undue loss of fps. I cannot personally say categorically that I could disagree with that. In truth it seems to be the case that more than anything else where dynamic entities are concerned its not so much the entities themselves (e.g. if animated) but their AI thinking time and the burden of that on the engine is the biggest killer of fps.

Thats something that an end user has no control over as its due to inbuilt inefficiencies inside the engine.

So too with the serious lagg issue which seems to apparently linked to this issue - nothing one can do about that.

As to the numbers of either static or dynamic entities theres no reason that users "should" even have to consider these in sensible quantities or even at all - FPSC levels are so small that given correct or some culling and accepted bugs or issues are fixed there should be no need to even have to consider the quantities of either static or dynamic entities that games made with FPSC would on average contain.

Restricting the number of entities and ploys via any means unduely due to engine inefficiencies is not condusive to good gamemaking - so other options should be considered for those who want to produce levels with a decent amount of content - and most users do. Telling them to take away much content or restrict their creativity in their level design is not a very helpful answer to their problems with fps.

In the first instance the engine needs improving and secondly and indeed additionally - users need to find their own efficient methods of optimisation which which keep to the minimum restrictions on their level design and conetnt. Together in partnership these two things one TGC dependant and one user dependant - "a good combination" of both parties - gamemaking with FPSC could certainly be the better for it.

Your point regarding Physics is a valid one and users are well advised that the physics attributes are in my opinion incorrectly applied to all placed entities by default irrespective of whether or not they require it. This in itself is a great burden of fps and the default should be the other way around. Currently it can be painstaking for users to include a lot of conetent and then have to go back through everything to remove the physics settings - but its the only way.

In fact as far as all entities are concerned you should remove all references to any active properties on any entity without exception - that does not need them to function - and that includes any attached scripts. i.e. if an entity does not need to die or dissapear then remove the ref to any dissapear script. If a script exists applied to an object then FPSC may need to keep checking that entity against its attached scripts to see what it needs to do at run time - so dont leave them there. Set all properties not needed to 0 even in the case of Physics attributes - do not just set physics to No - also remove all other figures or set question type boxes in properties to no. Do not trust FPSC to ignore things - remove as much as it is possible for you to - to try and remove any possibility of FPSC overding your settings.

Other optimisation techniques can be used and users should experiment to find the best solutions without killing your creativity or quantity of content. Time consuming it might be but the result will be improved fps and gameplay.

Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 28th Feb 2006 23:01
Quote: "Restricting the number of entities and ploys via any means unduely due to engine inefficiencies is not condusive to good gamemaking - so other options should be considered for those who want to produce levels with a decent amount of content - and most users do. Telling them to take away much content is not a very helpful answer to their problems with fps."


Not telling them to take away content, but I am say that not every entitiy needs to be Dynamic, and if they are going to use them(entities will be now knwown as "them")they should do so sparingly.
and if you want to use objects for level completion you should do that sparingly as well. Don't put 35 switches in a level that have to be activated by 25 boxes and 10 chairs to achieve one key to open a door that leads to another 35 switch activating room and then eventually the end. <-- a bit overboard but you get the point.
doing this would not help with quality of game at all. that's what I was talking about. and most items can be static stripped of physiscs and like you saids any other properties that are not absolutely needed.

Quote: "users need to find their own efficient methods of optimisation which which keep to the minimum restrictions their level design and content"


True they do need to find there own methods but helping them think along the way isn't a bad thing. If someone has tested certain methods and they work they should share them with the community after all we are a community. Hording information is not very helpfull to anyone. If you have it then share it.

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 28th Feb 2006 23:32
Reality Forgotten,

I agree entirely.

I was just adding to your comments.

Firstly and personally - other than any well documented issues or bugs - call them what you like which I have no control over - I dont have any problem with frame rates and at least currently can add as many entities as my game requires either static or dynamic and my frame rates stay at 30 - 32 fps.

The problem with FPSC is its difficult to even understand what affects what when the more I build and the more I add in terms of any kind of content either world objects, dynamic or static entities, the more stable the fps has become.

True if fps starts to drop off I dont remove any added objects or content but rather try and find an optimisation technique.

The problem is again I cannot say for ceratin that what I do actually makes any difference and if so why. I am still in the process of testing results and examining optimisation techniques further. Currently I am comcentrating on methods of calling as many Dynamic entities as is possible in real time as it were and removing, calling them again on the fly so that they only exist physically at least in game when the player is within user defined range. Thus I can have hundreds of dynamic entities in the level but only a small number by comaprison existing physically at one time. This may still mean that at any one time there is a limit to the number of dynamic entities especially enemies in view and active at one time, but you can see that if carefully placed and controlled the benefits that are forthcoming and thats not to mention say benign characters such as friendlies or pedestrians that walk around which under normal circumstances would exist in a level quite unecessarily when the player is nowhere near to them and thats a big burden on fps needlessly. Again which I am doing you can extend this to such things as in game audio or soundtracks which I call via the same method so I dont have loads of sounds playing needlessly and all at once which normally one can hear consistantly playing from one end of a level to the other - what a waste or engine resources. Some of these things could have been given to users by default - if I can do it TGC should have done it.

Anyway theres some ideas for you to think about if you want to save engine and cpu energies and put them to good use keeping your fps high.

I cannot say if this or extending this to other entities will as time progresses be enough to ensure that I can maintain complex levels to meet with gameplay requirements and still maintain acceptable fps of around 30fps constantly. When I finish the indoor level I am working on I will be in position to answer that question.

After that I will need to look at my outdoor levels and see what optimisation will achieve in that kind of environment.
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 28th Feb 2006 23:59
Your the man UMAN. I would like to say that I did not intend to sound ungreatful towards your comments. I have read a thread that I think you may have started in regards to the spawning of enemies via trigger zones. I can''t wait till this is figured out as it would help with the shock factor of the game.

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Mar 2006 00:51
Whats to work out - I said I trigger enemies via the method outlined above - spawning them and removing them on the fly just like any other object I apply the function to. Works for enemies too and any other dynamic object you care to apply such a function to - destructable or not. Well in point of fact in the case of enemies they dont need removing if they only have one life as they get killed but by the same method as with other entities they could be respawned again.

Basically entities that explode or get killed spawn only once via a trigger which brings them to life. That means they dont exist until you get to them and dont exist after death - after all in real life if somethings destroyed it dont noramlly come back, all other dynamic entities dont exist in game by "my" default and are created on proximity and both spawn and get removed then respawn again if the player returns within trigger proximity again and repeat the spawn/remove function indefinately on player approach which is needed.

e.g. you get near a room where there are 20 boxes that you can push about so they are dynamic. They dont exist until the player triggers them into life outside the room door - you enter and the boxes exist. You leave the room via another door and the boxes are removed. You decide you want to go backwards in the level and go back to the room the boxes are in - but they are gone Yes - well no as they respawn again before you enter the room, leave the room and they are taken out of the game agian and so on repeatedly.

I thought I was making things clear on this previously.

By default when FPSC ships theres nothing stopping you spawning an enemy via a trigger, switch or trigger zone. You can also give them a spawn life - however the tricky part is absolute control of loading and unloading on the fly and even getting a trigger zone to work at all with them.

If I remember correctly I did not have much like doing it. In some situations I have had to create my own trigger, switch, trigger zone or other entity activation type scripts in order to get them to work.

For some reason trigger zones and some switches work for some things but seem to ignore working in other situations when you would think the same thing would work. After all activating one thing one would expect to be the same for activating another but FPSC is a bit fussy about these things.

So in answer to your query - Yes you can spawn an enemy via a trigger zone now.

transient
19
Years of Service
User Offline
Joined: 22nd Apr 2005
Location: Australia Zoo
Posted: 1st Mar 2006 01:10
I haven't been able to get this work either, and it would be great if it did.

I 'm going to post this as a suggestion.

instinct is more valuable than intelligence.....
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 01:12
ok Thanks for that. Now to figure out how to do it since all of my other attempts have failed. the respawn is in secpnds right? I have heard that they were in miliseconds.

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Mar 2006 02:08
OK guys,

I know this is an important feature which would benefit any engine leave alone one of FPSC standing so if users want to ask me for it then I may see if I can put together a download for users.

If you would rather wait and see if TGC will incorporate this in the update - which may give you a default solution - which may because TGC understand the engine better than I end up as being something of an improvement to what I can supply as it may be easier to set up or use as being a one click type solution - then let it be so.

I am happy to use what Ive got as it works fine though is just a little more effort than what TGC may come up with.

Let me know if you want this now but please understand that I would make it available and as with the recent ladder release I made I wont have too much time to support it - you will be on your own after the download which would include everything you need to get it to work.

By the way - as way of a tip - you probably cant get this to work with the default trigger zone as you need a new script for a trigger zone plus an additional script to get it to work at the very least.

Cheers

Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 02:11
I would definently like this from you. I will learn from what you have accomplished and I may be able to work it from there.

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Mar 2006 02:25 Edited at: 1st Mar 2006 02:30
Reality Forgotten,

If you want to use for load and unload you should not have to specify a time or spawn delay for the entities as you want an instant on called by a trigger.

The way my set up works - you activate an entity by proximity or some other pre-requistite command or you could use plrcanbeseen but thats unstable at least I believe so due to the fact that FPSC does not cull or block the view throughout the level in some circumstances? Who knows.

Anyway once activated the object will continue to respond to the commands of spawn, remove (destroy) and respawn, destroy infinitum or more precisley relative to the max number of times to spawn object setting in my case I set it to 99 respawns which should be enough times before a gameplayer would want to move on in a game and not go backwards again.

Once activated this is then automatically carried out continually in response to the activation commands relating to player distance or whatever you have specified and not the trigger zone which only needs passing through once to call the initial object activation/creation or spawn.

Only one trigger zone is needed for instance and not one say outside each door of a two door room. If placed before the first door to a room the player encounters the trigger zone activates the entity and the trigger will have done its job once and for all and is effectively thereafter redundant. You dont have to pass through a trigger zone again to spawn the object again if you leave the room and go back so dont need one each side for forward or reverse gameplay movement of the player.

Ideal really - dont know how I managed it!

Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 02:55
any particular reason why i get no texture on the enemy? if i set the entity to spawn at begining it as a texture but if i set it to no it doesnt and when i shoot i still get the blood decal and the respawn of it has no texture either.

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 1st Mar 2006 03:00
You mean invisible but you can still see the gun, he doesn't run scripts?

You set up the spawn thing wrong... I don't know exactally where, but it is wrong somewhere.
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 03:26
i dont get a gun either there is nothing there. but an entitiy is present cause I can shoot it.

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Mar 2006 03:54 Edited at: 1st Mar 2006 03:55
What enemy are you using?

What happens if you go back to using the enemy as normal with no ref to spawning.

Personally I have had only a couple of reasons why enemies are invisible or textures dont appear on entities.

1. the entity is corrupt or not of an exact match to the format FPSC requires - that is some exporters dont save the info correctly and the entities dont show up at all. They can be invisible and have blood spilled but dont show up themselves though they do exist.

2. Script errors can cause it.

3. FPSC is famous for loosing texures but it usually shows a default white black or grey instead - this can also happen if the entity has a default 3DS colour as its first named texture in addition to any other user applied texture.

FPSC does some strange things - make some changes and try again - if the entity works normally theres no reason it should not with spawn settings applied unless you have a setting FPSC does not like and responds erratically too. Just dont give up on it. Try exit and restart FPSC.

Erratic - Yesterday I worked on flying objects which resulted in the player falling through the floor or erratically being battered up and down agressively on the floor. This when I made changes only to other entities - whats that got to do with the player?

But there you go thats FPSC for you.

Have fun.

Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 03:59
Thanks for the help again. Though If I have the enemy spawn at start it's fine. but as soon as I don't have them spawn at start and walk through the trigger zone (which triggers enemy spawn) the enemy spawns but is invisible. Interesting, I know. but I will keep working at it and post if I get it fixed

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Mar 2006 04:04
Reality Forgotten,

Whilst you are still online.

I will be posting the load and unload entity stuff I use for users to download shortly so you may want to wait for that.

As its only small files I will not post a zip but attach the various requirements separately to a post in the scripts forum and will post a cobfirmation here when its done.

Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 04:05
Hell yeah! I will be here. My wife is on vacation so I live on this damn computer lol

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Mar 2006 05:25
Reality Forgotten.

Ha,

As you will know by now - so this is for everyone else the load and unload entities on the fly files - zone activated - are posted in the scripts forum.

Go get em

Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 05:51
Thanks man exactly what I was looking for. they work great.

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Mar 2006 06:01
your welcome.

time for sleep 5am and i'm hungry too

Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 06:07
ok i have a quick question. It seems that what thus script is doing is making theentities invisable. you can stull shoot the first one you putin. so does that mean the engine is still messing with it?

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
=ChrisB=
19
Years of Service
User Offline
Joined: 23rd Jun 2005
Location: starring into a viewfinder
Posted: 1st Mar 2006 08:18
What, EVER!

seriously tho. this'll help the noobies, alot.
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 11:31
that was the intention chris

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Mar 2006 12:46 Edited at: 1st Mar 2006 13:14
Reality Forgotten,

I have no idea - I guess the engine believes an entity from the view of shooting it recognises the entity location as position X. It may well be also that thats just the way spwaning objects always works - that must be the case. Lees invention I guess. What influennce that has - well who knows if anyone perhaps Lee might or someone will have to prove the influences one way or another. It may be the entity exists in memeory and still has influence on fps - as I said somewhere else I just dont know.

What Chris is on about who knows either - hes in a world of his own. If he does not need the help hes very lucky. When it comes to things of this nature every user at this forum is a noob.

Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 13:31
The problem with the invisible enemy is if i kill it it will not spawn, so it mu st be in the memory or even perhaps already inthe game stripped of anything physical except it's colision properties.

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Mar 2006 16:48 Edited at: 1st Mar 2006 17:05
Firstly if you cannot walk into any solid entity then it does not exist but the loaction position of its spawning point is recognised and the blood decal plays in response to that - there is a link from that to the spawning feature which disables the spawning process i.e. the engine effectively - when you shoot at that point of spwan recognition kills it when it does not exist and disables the respawning - it would do so as if an entity does not exist it cant respawn. It does not exist because you have not used the trigger zone to call its activation - so in essence you are self defeating yourself by trying to overide what the whole thing is set up to do. As to why the spawning process works that way inside the engine and is designed in that way therefore to work I cannot say - thats a question you will have to put to TGC or seek an answer in the source.

Really....

How in earth can you have such an entity using the load and unload scripts inside of a real level using the scripts as they are intended? you cant its impossible - you must be talking about a test level? which is a worthless excercise as to anything other than proving that the entities load or unload via such a command as player proximity. Sorry I mentioned it now - for gods sake forget about the entity in a non real situation and get into one or set up one that works as it would in a real game where the scripts are intended to do a specific job.

In order to make usefulness from the whole concept in a real level an entity must always be called to load or unload when the player is out of view - thats the whole point. The trigger zone the player passes through activates the entity and spawns it to life before the player gets into view - thus when you get into a position where you have a view of the object it will already have been called to life via spawning and can be seen. Theres no set up that you should use where the player has a direct line of sight to the entity before it is spawned - then you cant shoot it because if you have a line of sight to the entity spawn position at whatever distance away - that may be the other side of the level if you want - then obviously you must adjust the range settings for the activation distance and place the trigger zone at the appropriate location to activate the entities at that range - again before you enter the entity direct line of sight. - dont you get the whole concept?

Simply put - a trigger zone is placed first at a distance (relative to the plrdistwithin setting in the entity script file) that will spawn to life the entity before the player gets into a position where he has a line of sight to the entity - that ensures the entity has always been spawned, exists and can be seen at any tme the player can be seen by the entity and vice versa. - easy. Dont foget if you are adjusting the activation distance for bringing the entity to life the you must always adjust the distance at which the entity should be destroyed again appropriately - these things must be domne in the entity script file. It is not enough just to place the activation zone any old distance you like - it wont work correctly that way. You must find the perfect balance between all objects, entities and script settings to ensure perfection. You could concievably create more than one activation zone and more than one set of scripts to give you a more manageable control of a greater number of entities which activate and react at differeing ranges. This cannot be done with a single set up as theres no way in editor of specifying ranges - thats something you will have to ask TGC for. With a single use and set up of these scripts the best you can achieve is a default or general set of activation/deactivation distances.

Everything is working perfectly - but you must account for player distance in relation to line of sight and the position in relation to the trigger zone. To use the set up to advantage - there is absolutely no benefit or point in having a spawn, load and unload feature unless its for use to disable entities when the player cant see them - if the player can see them (or their spawn loaction) then they must have already have recieved the activation instruction from the player having walked through the trigger zone or otherwise if you dont set up or use that correctly quite obviously they wont spawn to life which is why you are finding it so - you are simply not using or setting up the whole process correctly as in a real time scenario.

I thought that this was all quite clear and not really rocket science.

Deadwords
19
Years of Service
User Offline
Joined: 2nd Feb 2005
Location: Canada
Posted: 1st Mar 2006 17:19
Ah, finally a very usefull thread.
This will make stop newbies saying "FPSC is too slow, crappy!"
... i hate these.

And also, it's the first thread i see with only intelligent conversations... uman, Reality Forgotten, transient.

Nobody can hear you scream ... you're on a forum!
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 17:23
no, it was quite clear. but I was just thinking about that decal being there and the enity is not. doesn't seem like it makes much sense (but FPSC rarely does) I was also inquiring the possibilities of spawning an object without it being placed int he map at start.

take this order of presedence for example:

1)create a random or assignable spawn marker (replacing the enemy entity that you haev to place in the map)like a floor tile tha blends in to the floor that it is placed on (invisible)
2)create a way to have the entity truly loaded from the library instead of an in game entity. meaning: would not require you to have the enemy in question already placed in the map.
3)use the trigger zone to activate the random spawn marker and poof there the enemy is.
*by doing this you should not get the blood decal at all since the entity was never physicaly there (and yes it is there with the method that you created or atleast the collision zone is. if it was just a decal it would not be affected by gunfire.*

I'm not attacking yuour method at all I am just tryign to see if there is a better way to do it thats all. But it may not be a feesable task right now. but would truly be one fo the best advances for this engine.

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 17:28
thanks skalex please join in

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Mar 2006 18:25 Edited at: 1st Mar 2006 18:26
Reality Forgotten,

I still dont think you have any need at all to ever be in position that the player could concievably ever shoot at a non existant or invisible - engine recognised spawn point and get blood to spill from it. If you are doing that you are not setting this up either correctly or as it is intended to be used so that the engine gains the maximum benefit from it in keeping fps high which is the whole point.

Now I have this set up in number of locations throughout a level as I have said as I use spawn extensively. I have various dynamic entities in rooms that I approach using the load and unload scripts - when the door opens and I get into any of the rooms all of the entities have been already spawned - exist physically and can be seen - theres no way I can get to see an invisible entity position awaiting to spawn object leave alone shoot at them. Works with me every time as its impossible for me to enter the room before the entities have been brought to life. |he only cahnce I have is if I were to put a window with glass before the room so that I could see into the room and observe that the entities did not exist. Then I would simply change distance settings for activation in script - move the trigger zone and I could overcome that problem.

Simply put again even more simply = if you make the activation distance great enough and place the trigger zone appropriately you could even spawn any entity to life at game start from the player start position - thats flexible enough to guarantee you wont ever see an invisible entity as they would spawn at game start.

Regarding the library - as I said even if you could and were allowed to consider anything in relation to the editor and libraries its such a mess - you would be well advised not to go there. In reality I would think its beyond the capability of anyone but TGC to get anything in there to work. Editor and library is a real no no and you cant affect it anyway. Its best left where it is and is out of bounds for the end user. Youve enough problems with the engine - you will never achieve anything or get your game made if you could mess about there but simply waste your life away fighting with an unitelligible mess.

Thats my opinion anyway.

Skalex,

Quote: "Ah, finally a very usefull thread.
This will make stop newbies saying "FPSC is too slow, crappy!""


Not sure that all of this actually will be of any real help in keeping fps up as its difficult to asceratin whats happening - if more users test this out then we may have a better understanding as they report any findings and benefits or not back to the forum and I hope they do.

Still we can play with spawning stuff while we access.

Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 18:35 Edited at: 1st Mar 2006 18:36
OK I see the mis communication here. It's my fault. sorry.

The way you applied this is perfect. Ok here is where the problem is for my situation:

here is the scenario: I walk down a halway and trigger the spawn and kill the enemy that is spawned I walk up to a door and trigger that spawn and kill the enemy behind the door. and then go up a flight of stairs and hit another trigger. this trigger should trigger enemies in the hallway that I have just come from so when I come back down the stairs I have to fight my way back out. it will work with your method but I can not get the enemy that is invisible to truly go away. see the problem now?

BAH! I will just work around it. it seems that it would be a whole lot fo work for something so minor.

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Mar 2006 19:27 Edited at: 1st Mar 2006 19:36
Reality Forgotten,

I presume that you mean that no matter what - an entity once placed in the level and loaded into game will always have a spwan point exist and that that point cannot be removed or completely destroyed - ever. Furthermore if one shoots at that invisible spawn point it will generate a blood decal response from something that effectively does not exist.

That should be something that TGC should fix but I can suggest a way around it if one could set up the blood decal itself to activate spawn and respawn via distance commands in a script - not sure even if we have that sort of control available but possibly.

Otherwise its a job for TGC and should be put in the to do list somewhere as that should not happen. I have seen it occasionally happen myself with invisible objects for some reason - probably a similar one.

EDIT

Actually I cant see unles you tell me why you would want the object to go away as one does not normally go around shooting at invisible objects unless you mean you can collide with it or shoot it by accident.

If you have enemies that respawn then why not set the distance parameters to ensure that they always respwan and ensure they are therefore always visible if the player is in their spawn range. I prseume that you want a certain number of respawns only? and that after that you find the problem? as you still want to move back to their location but dont want their existance any longer even the one you have as being invisible?

Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 19:29
I think i will add it to the ever growing wish list TGC has been presented.

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Mar 2006 19:47
I will have a look at the issue some time when i get a few minutes spare and see if I can come up with any solution but it dont look good as Ive seen it happen before with me with regard to enemy entities that dont use thes scripts. Its happened to me previously when I have had some difficulty getting enemies to show up but you can still shoot them so its not related to these scripts in particular. Having said that with those enemies I played around with them and they worked - they are still in the level and are fine now so its fixable with trial and error it seems - I cant remeber whether or not it was the default spawn commands that caused the problem or the physics or how I eventually overcame the problem - the enemy just dissapered at one point but I could shoot it and get blood from it as you say eventually deleting and replacing the enemy and playing around with the settings brought it back again.

I like many others have had emnemies and other entities do all kinds of weird things on occasions.

Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 20:38
same here. seems that i have fixed the problem, but I changed all of the spawn preferences to read 0. at it works great for my needs.

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Mar 2006 21:18
good - glad to hear you sorted something out that fits in with your needs - thats the main thing.

Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 1st Mar 2006 21:35
true once I get it perfected I will share it with the community.

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
=ChrisB=
19
Years of Service
User Offline
Joined: 23rd Jun 2005
Location: starring into a viewfinder
Posted: 2nd Mar 2006 00:37
But of course it was.
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 9th Apr 2006 10:15
to important to let slip in to the depths of this forum. *bumpity bump*

"I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter."
-- Winston Churchill
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 9th Apr 2006 23:00 Edited at: 17th Sep 2006 22:21
Still waiting on you to update it.

Quote: "NPC's that have Physics turned off appear to be extremely aggresive."
??? As far as I know, scripts make enemys agressive.
Quote: "PLayers weapon is effected by the changes you make to accuracy and damage produced by the weapon."
I am still trying to figureout what you mean by this. Pysics Force from Weapon?

Quote: "Ok not every item in your game needs to be a Dynamic entity. In fact having everything Dynamic kills your frame rate since the engine has to constantly re-calculate the entity. "
Only when in use, and the calculations decrease over distance.

Quote: "200 pound crate slide across the floor after someone bumped in to it"

Uhh, Superman.


I am not trying to insult you or anything, uman did that, but this is excessivly against the use of physics. I do agree that the plr shouldn't move couchs, tables, desks. With a single push of the hand, but it kinda looks stupid when you are too weak to lift up the minor objects.

If you use physics, use it rationally. In reality, 1 box isn't gonna be harder to pick up then another, given they both contain the same contents... Take a look at HL1 (not HL2) valve put physics on almost every object, even when you didn't need to move it, it could still be moved. They did, sometimes, have boxes that you would EXPECT to beable to move, but couldn't. But still, it made the game look better.

Now take a look at an HORRIBLE use of physics. Return to Castle Wolfinstein. They include a physics engine, but only use it on CHAIRS, for crying outload.

Now, HL2 was excessivly dubbed over with physics, and dynamic entitys. To a point of WTH. Worse was that they made an excessive show about it. Forget "secrets" lets just have gordan grab everything with the gravity gun. Seriously .

Wisemen are hard to find, they are tarnished by sayings and quotes that are not of their true nature.
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 10th Apr 2006 00:06 Edited at: 10th Apr 2006 00:12
Quote: "I am not trying to insult you or anything, uman did that"


I was not aware that I had insulted anyone.

If I have it was unintentional and I apologise.

Quote: "Only when in use, and the calculations decrease over distance."


Only when in use maybe so - not sure that calculations decrease over distance - if you mean that dynamic entities are supposed to switch themselves off if the player is beyond a certain distance from them - then at least in the case of enemy characters thats not true and they dont - they are always active.
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 14th Apr 2006 06:01
Caculation speed,

And by saying insult... well, I don't know what i ment.

Finally, a formal bump. And I think I'll add it to the FAQ too, still is a good thread... all in all.

We all have our inner noob.
Join the NJL: We have MORE fun!
When in doubt, blame a mod!

Login to post a reply

Server time is: 2024-11-24 15:45:07
Your offset time is: 2024-11-24 15:45:07