Dynamic light instances

If there is something important you think is missing in the current version of ZGameEditor then you can post a feature request here!

Moderator: Moderators

User avatar
Rado1
Posts: 770
Joined: Wed May 05, 2010 12:16 pm

Dynamic light instances

Postby Rado1 » Mon Dec 02, 2013 11:05 pm

It would be helpful if lights can be instantiated and destroyed dynamically in runtime. For now, I do not have a clear preference how to achieve this, just see some rough ideas:

- Place a Light as part of a Model (and ModelState?). Each instance of a model (model state) would have own instances of lights.

- Light can become a type in expression language, similarly to "model". They can be declared as types of variables and arrays + there would be a function/component to instantiate a light and another one to destroy it.

... you have maybe some better alternative how to specify dynamic lights.

User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Postby jph_wacheski » Mon Dec 09, 2013 2:21 pm

An interesting idea. I am using the GL lights dynamically in my current project,. by simply enabling and disabling a light and changing its position and color as needed. I just use an extra light for FX in short bursts, and this works very well.

I am considering implementing a differed rendering set-up for an unlimited light number,. anyone have an example of this in ZGE??

I just read a good tutorial for setting this up for a 2d game I will look for that link. . ,
iterationGAMES.com

User avatar
Rado1
Posts: 770
Joined: Wed May 05, 2010 12:16 pm

Postby Rado1 » Mon Dec 09, 2013 9:08 pm

jph_wacheski wrote:I am using the GL lights dynamically in my current project,. by simply enabling and disabling a light and changing its position and color as needed.

Yes I use the same technique of enabling/disabling and changing positions of lights for a live wallpaper I'm working on now. Apart of other animation, each touch should generate its own light. I have 10 lights included, but maybe some devices allow to have more than 10 touches... Anyway, the code is quite cumbersome and I wanted to have better support in ZGE.

User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Postby jph_wacheski » Mon Dec 09, 2013 11:54 pm

Here is that post I was talking about,.
http://www.wholehog-games.com/devblog/2 ... a-2d-game/

I intend to make use of more interesting lighting/rendering as I keep making games,. . depending on the gameplay needs and ease of implementing,. lots of interesting bits in there.
iterationGAMES.com


Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 1 guest