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 / Is there a limit to Dynamic Lights? (Sorry for double posting)

Author
Message
Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 7th Aug 2011 22:27 Edited at: 7th Aug 2011 22:39
So in my game i decided to go for Dynamic light's instead of static lights because they can do more (Flickering and what not). And so in my somewhat big room i have 6 dynamic lights. All have a radius of 110 i think. And when i go to test the game, only some of the lights light up. But when i walk closer they turn on, and the ones behind me shut off. I thought it might have had something to do with the placement of them (In the editor the dynamic light radius's overlap. Meaning the green circles)

Does anyone else just use Dynamic lights? If so can you post your setuplevel.fpi or setup.ini?

Thanks! And sorry for double posting.. (Threads)

EDIT - Also, why is it when i have more than 1 dynamic light with a main script of: lightcandle.fpi, they don't flicker anymore?

Marc Steene
FPSC Master
20
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 7th Aug 2011 22:52
I think the limit is 8.


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 7th Aug 2011 23:07
Why though? Is there a way i can increase the amount?

Marc Steene
FPSC Master
20
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 7th Aug 2011 23:14
Something to do with DirectX rendering...or a limitation of the engine. I remember reading a thread a very long time ago about this and it was concluded the limit was 8 dynamic lights IIRC.


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 7th Aug 2011 23:19
What a shame.. Alright, thank you for all of your help!

ASTECH
18
Years of Service
User Offline
Joined: 18th Jul 2007
Location:
Posted: 8th Aug 2011 00:38 Edited at: 8th Aug 2011 00:39
Let me tell you something... its probably because its a memory hog. The dynamic lights only come on as you get close
enough and go off as your get away from, so that they help keep performance up. That's just my personal theory.

Your signature has been eaten by a llama. Sorry; that's just the way it goes.
Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 8th Aug 2011 00:46
I mean i could try and use them wisely, and try to make them not so noticeable that they are turning on and off. Because yes, it does not take up as much memory as static lights do...

rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 8th Aug 2011 01:23 Edited at: 8th Aug 2011 01:27
Static lights create lightmaps and are not active in game (except to light dynamic objects when they come within range) so I dont see how they can use up more memory when running your game (dynamic lights would be constantly calculating even for static meshes), its the opposite in fact and the reason you should use them in the first place.
There is a limit to dynamic lights its a limit of the engine far as I know and really its not a feature
If you use only dynamic lights you will find that they dont cast shadows as that feature was abandoned from FPSC some time ago the line to enable dynamic shadows in the the setup.ini is defunct.

When more than one of the same script is used in a level they tend to cancel each other out, simply renaming one of these will allow them to work together, thats why your lights stopped flickering.

Marc Steene
FPSC Master
20
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 8th Aug 2011 01:26
Quote: " its a limit of the engine"


I did some research on this, apparently it's a DirectX limitation.


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 8th Aug 2011 01:28 Edited at: 8th Aug 2011 01:31
Quote: "far as I know"

I wasnt sure as I havent really used dynamic lighting in other engines.
Thanks for clearing tha one up Marc.

Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 8th Aug 2011 02:16 Edited at: 8th Aug 2011 02:16
Alright so i just built my small level. I replaced all of the static lights and made them dynamic.

When i tested the game it gave me this:
Click OK to test the game. Press Escape when you want to exit test game mode. This level uses 648MB.

Then i quit the test game, and made all of the light's static. I then tested it and this is what i got:
Click OK to test the game. Press Escape when you want to exit test game mode. This level uses 862MB.

So inevitably, static lights use more memory than dynamic lights?

Thanks for commenting though rolfy (Information wise)

rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 8th Aug 2011 03:19 Edited at: 8th Aug 2011 03:30
Ummm.... thats virtual build memory. Its better to use memory when building the game than playing it. The memory increase your seeing is caused by lightmapping being rendered this creates overlay textures and only needs to be built once not every time you play the finished game.
Go test your game with static lights and dynamic and check the FPS this time, not t mention the appearance and the fact that only lights within range will be lit.

Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 8th Aug 2011 03:27
I did not realize this. But i do get 60 framerate for both. Static lights look a lot brighter than dynamic which is sad. But im sticking with Static for my game now..

Also, can you possibly answer my Edit question? Thanks!

ASTECH
18
Years of Service
User Offline
Joined: 18th Jul 2007
Location:
Posted: 8th Aug 2011 03:32 Edited at: 8th Aug 2011 03:33
Quote: "Click OK to test the game. Press Escape when you want to exit test game mode. This level uses 648MB.

Then i quit the test game, and made all of the light's static. I then tested it and this is what i got:
Click OK to test the game. Press Escape when you want to exit test game mode. This level uses 862MB."


Static lights are a real kicker, aren't they?

By the way... I built my game and I had lightmapping quality set to 70 but the engine hits 2GB of memory used and
then crashes. Its to my understanding that XP, back in that time, could use up to (roughly) 4GB of memory in programs.

So my question is, is there a way to unlock that cap? The only thing it recommends is to lower the quality.
Right now tuning it down to 60 did the fix but I know once I get to building the later levels in my game... I will have
to cut lightmapping quality in half OR MORE if I'm limited to 2GB at build.

(Not trying to hijack the thread by the way. This seem to be related enough. I thought I would ask).

Your signature has been eaten by a llama. Sorry; that's just the way it goes.
rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 8th Aug 2011 03:33 Edited at: 8th Aug 2011 03:44
Your getting 60 fps for both because your building a small level and probably have a half decent comp, try throwing a lot of dynamic entitys (characters) in with your dynamic lights and see the difference. You want to balance it all out so your game is buildable (is that a wrord?) and playable on as many comps as possible.

I did answer your question in one of my posts above.

rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 8th Aug 2011 03:36
ASTEK:
If you search you will find that newer 64bit os's can in fact be increased for this, it was always a limit of 2GB for 32bit.
There are a few threads that give examples of how to do it.

ASTECH
18
Years of Service
User Offline
Joined: 18th Jul 2007
Location:
Posted: 8th Aug 2011 03:40 Edited at: 8th Aug 2011 03:40
Quote: "ASTEK:
If you search you will find that newer 64bit os's can in fact be increased for this, it was always a limit of 2GB for 32bit.
There are a few threads that give examples of how to do it."


Thanks Rolfy. I've already built the demo I'm going to release in a hour or so BUT... 60 to 70 to 100 won't be much of a noticeable change at this stage.

Later though, it will matter if I can keep that 70 quality and still build. I'm going to search a little bit on this.

Thanks!

Your signature has been eaten by a llama. Sorry; that's just the way it goes.
rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 8th Aug 2011 03:46 Edited at: 8th Aug 2011 03:48
Exu if you want dynamic lights brighter, add:
lightintensity=
to the lights .fpi script.
Crank it up to 300 or so and you will see a difference.

Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 8th Aug 2011 03:58
Quote: "Your getting 60 fps for both because your building a small level and probably have a half decent comp, try throwing a lot of dynamic entitys (characters) in with your dynamic lights and see the difference. You want to balance it all out so your game is buildable (is that a wrord?) and playable on as many comps as possible."


This is true. My map is quite small, and all of the entities are static I understand now, but..so.. If i have more static entities it will use less memory? And if i have more dynamic entities it will use more memory? Likewise for static and dynamic lights. So i should make my game kind of half and half? Meaning the same, well not the same, but close amounts of both static and dynamic stuff?

@ASTEK - Don't worry, i don't care if anyone hijack's my thread

Quote: "Exu if you want dynamic lights brighter, add:
lightintensity=
to the lights .fpi script.
Crank it up to 300 or so and you will see a difference."


Again, it would be something as simple as that Thanks for that rolfy!!! The more you know! XD

rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 8th Aug 2011 04:29 Edited at: 8th Aug 2011 04:33
With FPSC the general idea is to use as few dynamic entity's as possible, particularly when it comes to characters. This all aside from the fact that dynamic usually means scripted which will use a lot of memory. When designing your game think ahead to gameplay at all times, too many folks build an awesome scene then realise its unplayable once they add gameplay.

There are workarounds: spawn and destroy entity's within player view for example, poor mans LOD.

Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 8th Aug 2011 04:46 Edited at: 8th Aug 2011 04:47
Thanks for all of that, i will keep it in mind

EDIT - Sorry to bother you, but do you know how i can edit this script:



To make it so you use the F key instead of Enter? Thanks!

BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 8th Aug 2011 04:57
[Rant]

I know that most will probably think this cruel, but I'm trying to be as polite and constructive as my old age allows. First, you are taking a thread on one topic and switching it to another- not that I care, but you do this quite a bit. Second, learn scripting. Look in the Official Community Guide. You will find countless examples on scripting. Look for FPI Scripting and AI Scripting in the forum (by using search). If you bother to learn the scripting, you would know that switching the plrusingaction=1 to scancodekeypressed=# would answer your question. The scripting is very easy to learn (for the basics).

I'm sorry if this seems rude and cruel, but others have been told the same thing. Show some initiative and make an attempt, then we can help correct your mistakes. But you seem to want everyone to do your work, and some of us have our own work to do, let alone do others work for them.

[/RANT]


Twitter: @NFoxMedia
rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 8th Aug 2011 05:04 Edited at: 8th Aug 2011 05:05
Replace plrusingaction=1 with scancodekeypressed=33
You might also want to add plrdistfurther= so your hud is removed if the player walks away without pressing 'f'

You should download the community guide.

Edit: Mr Fox beat me to it.

BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 8th Aug 2011 05:05
Quote: "You should download the community guide."


Start with the first one, then read it. Download the second, then read it.

If you can't find the FPI scripting or AI scripting documentation, let me know. I can send them to you as well.


Twitter: @NFoxMedia
Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 8th Aug 2011 05:12 Edited at: 8th Aug 2011 05:14
Quote: "I know that most will probably think this cruel, but I'm trying to be as polite and constructive as my old age allows"


Thank you for doing that. You saying that and saying it the way you did made me read all of it and it made me read it as advice and not a rant/fighting/etc. So i thank you for that!

Quote: "First, you are taking a thread on one topic and switching it to another- not that I care, but you do this quite a bit"


I've noticed. I will try my best to stop this...

Quote: "Second, learn scripting. Look in the Official Community Guide. You will find countless examples on scripting. Look for FPI Scripting and AI Scripting in the forum (by using search)"


I will start learning tonight. And i will definitly check out the Community Guide. I should have probably looked at that before..

Quote: "If you bother to learn the scripting, you would know that switching the plrusingaction=1 to scancodekeypressed=# would answer your question. The scripting is very easy to learn (for the basics)."


Thank you for that, but now i feel bad by asking, What number is F? Is there a list somewhere? I know VB/Java/C++ so i remember that command, but i don't remember what all of the keys where... But thanks for the info!

Quote: "I'm sorry if this seems rude and cruel, but others have been told the same thing. Show some initiative and make an attempt, then we can help correct your mistakes. But you seem to want everyone to do your work, and some of us have our own work to do, let alone do others work for them."


It was a little rude, but i don't care. I can obviously tell that you are mad. You have the right to be mad at me.. But i apologize for all of the request i have made lately. There have been a lot of them and i apologize for that. I know you guys have things to do, im sorry for wasting you time when i could be doing this myself..

Thanks again for the information on the key changing..thing. Im currently opening the Community Guide and will start learning scripting right now. Sorry again for wasting your time BlackFox, i apologize..

EDIT!! - You guys commented to fast hehe, umm thanks for the info rolfy!

BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 8th Aug 2011 05:22 Edited at: 8th Aug 2011 05:23
Quote: "It was a little rude, but i don't care. I can obviously tell that you are mad."


Like I said, if it sounded rude, I apologize. And I'm certainly not mad. My intent to try and get you on the same wavelength obviously failed. Here's my second attempt...

You heard of the expression... Give a man a fish, he eats for a day. Teach a man to fish and he eats for a lifetime.

In other words, we are trying to give you the help by pointing out the tools to help you succeed. Most here will not do the work for you. A few may just give you what you want, but then that won't help you down the road. This is no different than people wanting scripts in the Script section. We gave you the clue you needed- look in the Community Guide. There is a scancodekey chart that shows the letters and corresponding numbers. That alone is a big start right there.

That was the point I was trying to make. By taking some time and read the documentation/manual would save you having to make umpteen number posts asking how to do something because you would have answered your own questions.


Twitter: @NFoxMedia
rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 8th Aug 2011 05:24
Exu, sit back take a deep breath and hold it for a few.....exhale.
Your doing what most new users do around here, you just been getting away with it longer, its a rite of passage, learn as much as you can yourself, if you get stuck folks will help.
Its more satisfying discovering things on your own and will give a good foundation for creating your own ideas.

Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 8th Aug 2011 05:34
I understand this, i need to learn on my own and if i need help i will come to the forums to ask. As i stated i just started reading the community guide, so i am trying..

Quote: "you just been getting away with it longer"


Im sorry.. But wait, is there some like time limit? Im kidding, i apologize for this..

Quote: "Its more satisfying discovering things on your own and will give a good foundation for creating your own ideas."


That's true. I totally agree!

This is good though, getting some good advice from 2 very highly respected users on the forum. Thanks guys!

Login to post a reply

Server time is: 2026-07-01 09:07:23
Your offset time is: 2026-07-01 09:07:23