Jump to content


Photo

Easy Lighting V7.0.2 | Last Updated: 06/07/11


  • Please log in to reply
465 replies to this topic

#101 spazman0

spazman0

    GMC Member

  • New Member
  • 213 posts

Posted 26 December 2008 - 06:38 AM

So is there a work-around? I would really like to use your engine in my game, but if it lags that much I don't think I can.
  • 0

#102 Scyler_27

Scyler_27

    -Insane Kid-

  • GMC Member
  • 2745 posts
  • Version:GM:Studio

Posted 26 December 2008 - 06:51 AM

Well, you could "re-use" lights perhaps. After the particle or what-not is destroyed, have it jump to another particles position.
  • 0

#103 flankattack

flankattack

    BETA Tester

  • New Member
  • 407 posts

Posted 26 December 2008 - 09:20 PM

Wow, even better now!!
  • 0

#104 Krisando

Krisando

    GMC Member

  • New Member
  • 1351 posts

Posted 06 January 2009 - 03:51 AM

I have a request which is quite urgent sorta,
likey due to my friends video card (internal hp one eeuh) he receives the following message:

___________________________________________
ERROR in
action number 1
of Draw Event
for object int_obj:

Trying to use non-existing surface.
___________________________________________


So in "light_init(colour,true);" could you return if it has successfully initilised returning either 1 or 0 like 39dll and many others. Thankyou :(
  • 0

#105 Scyler_27

Scyler_27

    -Insane Kid-

  • GMC Member
  • 2745 posts
  • Version:GM:Studio

Posted 12 January 2009 - 08:18 AM

@Kris, well I actually removed that function from the newest version, and if you have the newest version you shouldn't be using that function. :( (It is hidden, but I think you can still call it) Also, either way, there isn't really a way for me to check if the surface is created. (That I know of)

Also, for those interested, I ran a speed test on my computer (2.4Ghz, 2GB RAM) with a 3000x3000 room and a view and managed to get constant 30fps to about 900 256x256 lights, then it went and hung out at 27-28 for another hundred and I shut it off. I created lights and destroyed the objects, so it was just lights. I am still thinking of a way to destroy lights, in the mean time I am working on some "get" functions that check if a light is on, what view they are being drawn in, etc.
  • 0

#106 Krisando

Krisando

    GMC Member

  • New Member
  • 1351 posts

Posted 12 January 2009 - 01:11 PM

@Kris, well I actually removed that function from the newest version, and if you have the newest version you shouldn't be using that function. :( (It is hidden, but I think you can still call it) Also, either way, there isn't really a way for me to check if the surface is created. (That I know of)

Also, for those interested, I ran a speed test on my computer (2.4Ghz, 2GB RAM) with a 3000x3000 room and a view and managed to get constant 30fps to about 900 256x256 lights, then it went and hung out at 27-28 for another hundred and I shut it off. I created lights and destroyed the objects, so it was just lights. I am still thinking of a way to destroy lights, in the mean time I am working on some "get" functions that check if a light is on, what view they are being drawn in, etc.

If surface_exists lol?
Actually the new version may have fixed this error for him. Not sure.

Edited by Krisando, 12 January 2009 - 01:16 PM.

  • 0

#107 Scyler_27

Scyler_27

    -Insane Kid-

  • GMC Member
  • 2745 posts
  • Version:GM:Studio

Posted 12 January 2009 - 08:29 PM

Rofl, your right. Wow, and I even looked through the manual for that function. Must have skimmed over it (it was1:30 in the morning so I have an excuse. :( )

Tell me if the error is gone with the newest version please, that would be great help. If not, I could use the function to check and have the game say an error and end the game if you like. Or, I could say an error and remove all lighting functions so the game continues without lights. Which of the two would you prefer?
  • 0

#108 Krisando

Krisando

    GMC Member

  • New Member
  • 1351 posts

Posted 13 January 2009 - 09:11 PM

Rofl, your right. Wow, and I even looked through the manual for that function. Must have skimmed over it (it was1:30 in the morning so I have an excuse. :) )

Tell me if the error is gone with the newest version please, that would be great help. If not, I could use the function to check and have the game say an error and end the game if you like. Or, I could say an error and remove all lighting functions so the game continues without lights. Which of the two would you prefer?

Hmm, Id prefer a returned value so I could either display a message or notify a the game server.
And it was 2:30 am when I posted the last one ;P lol

Also latest version works on his pc =]

Edited by Krisando, 13 January 2009 - 09:34 PM.

  • 0

#109 Scyler_27

Scyler_27

    -Insane Kid-

  • GMC Member
  • 2745 posts
  • Version:GM:Studio

Posted 14 January 2009 - 05:01 AM

Awesome, glad it works for him now. Must have been something with the previous version. Guess I don't need to add an error screen now.

By the way, I couldn't return something, because you aren't calling the function. ^_^
  • 0

#110 Krisando

Krisando

    GMC Member

  • New Member
  • 1351 posts

Posted 14 January 2009 - 07:36 PM

Awesome, glad it works for him now. Must have been something with the previous version. Guess I don't need to add an error screen now.

By the way, I couldn't return something, because you aren't calling the function. :P

Click oh duh me xD I forgot this is an extension heh ^_^
  • 0

#111 A saurus1

A saurus1

    GMC Member

  • Sandbox Moderators
  • 1591 posts
  • Version:GM8.1

Posted 16 January 2009 - 02:50 PM

Could you add 4 more things?

1. An lt_flicker option. This would be great for effects like the lighting of fire, which unlike lt_flash, does not randomly go on and off. Instead, the lt_flicker setting would make the light randomize it's alpha a little bit over time, like it is flickering.

2. A function light_set_frequency(frequency). This would set the frequency of the effect. For lt_normal, this would be obsolete, but for lt_blink, lt_flash (and maybe lt_flicker :D ), it would set how fast the light blinks, flashes, or changes its alpha.

3. Allow alpha values over 1 to be drawn as simply a light repeatedly drawn. What I mean is, ceil() the alpha value of the light, and repeat the drawing of that light that many times. After each time you draw it, subtract 1 from the alpha value. This would mean you could have really intense lights. If you need a code example, I can give you one.

4. A depth value for the lights (or light systems, however your lighting extension works).

BTW It's really good already, but I think this would make it even better.

Edited by A saurus1, 16 January 2009 - 03:16 PM.

  • 0

#112 Scyler_27

Scyler_27

    -Insane Kid-

  • GMC Member
  • 2745 posts
  • Version:GM:Studio

Posted 16 January 2009 - 09:58 PM

Hey, thanks for the ideas, I am liking them. :)

1. I will certainly add this, great idea, thanks.

2. This one could work, but I use 1 global variable to adjust all the lights, which makes them all flicker and whatnot together. So if you were to set the frequency it would adjust all the lights. I don't mind doing that, and I suppose it could be useful, just not very flexable. And remember, you can always create your own effects using the light_set_ligh() function.

3. I think I will pass on this one, if you want more intense lights instead of having the .gex have to do all the extra math and draw multiple lights in one spot, you can do that easily. :medieval: (In fact, it should be faster if you were to do it instead of me placing a whole bunch of if's or switch statements I think)

4. I have been pondering this one for some time actually, I am trying to think of a purpose for it though. Why would you need it? I will think it over though.

Thanks for the complement by the way, I am currently trying to figure out how to make a function to delete lights. (Which is much harder than you would think, though I think I have finally found a solution.) Once I get that finished I will start working on the rest of the updates which shouldn't take that long. :D

EDIT: LARGE UPDATE!

Hi guys, I have finished and released version 4 of my lighting .gex! This is what is new:
-Added new effect, lt_colorflicker.
-Added 5 new functions! A few to set some effect properties, but mostly functions to get information like if a light is on etc.
-Added the ability to delete lights! I have finally finished it, and tested it and it works great!

I hope you guys like the update!

Edited by Scyler_27, 16 January 2009 - 11:25 PM.

  • 0

#113 A saurus1

A saurus1

    GMC Member

  • Sandbox Moderators
  • 1591 posts
  • Version:GM8.1

Posted 17 January 2009 - 12:11 PM

4. I have been pondering this one for some time actually, I am trying to think of a purpose for it though. Why would you need it? I will think it over though.


So you could draw things like HUD's and Healthbars over the lighting.

Also, what are you using for your lighting system that makes it so hard to delete them.

Edit: Does light_set_effect() have any effect on lt_color flicker. If not, it should control the flickering speed, so that the alpha values can fade into each other. I.E. the light picks its next alpha value x steps ahead, and then fades towards that. Once it reaches it, the light picks its next one, and fades towards that one. And on and on and on...
That would be really cool.

Edited by A saurus1, 17 January 2009 - 01:14 PM.

  • 0

#114 tablekorner

tablekorner

    GMC Member

  • GMC Member
  • 118 posts

Posted 19 January 2009 - 05:54 PM

every time i try and open example it says cant find lighting gex?
  • 0

#115 Scyler_27

Scyler_27

    -Insane Kid-

  • GMC Member
  • 2745 posts
  • Version:GM:Studio

Posted 20 January 2009 - 05:40 AM

@A saurus1: You can have a hud, draw it at depth -100001 I think it is. Though, I will try to come up with a work around for that. I would prefer not to have the user define the light's depth, but I need to think of a better way to draw things on top. As for the light_set_effect, it changes the max amount of alpha value that will be changed while flickering. If you want any further effects for your lights, you can create them yourself. It is actually quite easy. I wasn't even planning on having effects, but I did it so people wouldn't have to re-program basic effects every time, sorta like how I have the built in circle light. It is just there to save time, if it isn't to your exact liking, make it custom.

@tablekorner: That is because you need to install the included .gex file. Go here for instructions on doing so. Once you do that everything should work fine. :D
  • 0

#116 bocochoco

bocochoco

    GMC Member

  • New Member
  • 140 posts

Posted 21 January 2009 - 07:44 AM

nice update scyler. i love this gex
  • 0

#117 TheMyst

TheMyst

    GMC Member

  • New Member
  • 166 posts

Posted 21 January 2009 - 06:18 PM

This will add some nice effects to my games scenery. Thanks!
  • 0

#118 Galious

Galious

    GMC Member

  • New Member
  • 8 posts

Posted 24 January 2009 - 12:09 AM

Hi there! I've been using your gex for a while and it is really great. The problem is that I don't know how, it suddenly rendered everything wrong, like in negatve


Please take a look... this should be all dark, with a torch and little glowing monsters
Posted Image


Do you know what happened? I've tried to reinstall the gex, Game Maker ... and it still is the same. The weirdest thing is that it works in my other computer.

Edited by Galious, 24 January 2009 - 12:11 AM.

  • 0

#119 Romano

Romano

    GMC Member

  • New Member
  • 675 posts

Posted 24 January 2009 - 01:31 AM

Looks amazing, too bad its not possible in lite :\
  • 0

#120 bocochoco

bocochoco

    GMC Member

  • New Member
  • 140 posts

Posted 24 January 2009 - 01:52 AM

Hey Scyler, any chance of getting a function to determine how much light is being drawn in a particular spot? A value between 0 and 1 would be enough.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users