Jump to content


Photo

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


  • Please log in to reply
465 replies to this topic

#81 bocochoco

bocochoco

    GMC Member

  • New Member
  • 140 posts

Posted 09 December 2008 - 04:40 AM

I've uninstalled 3.1 and all previous versions. light_draw() is a recognized function in 3.7 and without it, there are no lights; the room is full bright.

doesnt surface_reset_target() after you draw what you need fix that? If you need to, I can send you my gmk.

edit: damn scyler, you reply fast. Are you constantly refreshing the page or something?

Edited by bocochoco, 09 December 2008 - 04:41 AM.

  • 0

#82 Scyler_27

Scyler_27

    -Insane Kid-

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

Posted 09 December 2008 - 04:47 AM

Hah, I dnow, probably just coincidence. By the way, if you didn't catch my last message, I think I uploaded a bad version cause it worked for me till I tried re-installing the .gex with the downloaded version. Also, v3.7 should NOT have light_draw() so this almost guarantees that I messed something up. (Also, that should be the problem for the weird positioned hud.)

EDIT: Ok! Try re-downloading it! It WAS a bad version, I noticed the file size was 50kb instead of 63kb like it was supposed to be! It should work now. :)

Edited by Scyler_27, 09 December 2008 - 04:50 AM.

  • 0

#83 bocochoco

bocochoco

    GMC Member

  • New Member
  • 140 posts

Posted 09 December 2008 - 04:52 AM

You sure you fixed the link? It's the same file as before (same md5) and same filesize 50kb...

Edited by bocochoco, 09 December 2008 - 04:53 AM.

  • 0

#84 Scyler_27

Scyler_27

    -Insane Kid-

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

Posted 09 December 2008 - 04:55 AM

What the hell? Huh, even the host said that it was 63kb. Ok I uploaded it with a different file name this time, checked, 63kb, this MUST be the fixed version! :)

EDIT: Yay! Thanks, glad it works now. :)

Edited by Scyler_27, 09 December 2008 - 05:05 AM.

  • 0

#85 bocochoco

bocochoco

    GMC Member

  • New Member
  • 140 posts

Posted 09 December 2008 - 04:59 AM

yay works. bugs fixed. Colored lights look sooo much better now

Keep updating scyler! This is amazing
  • 0

#86 frog

frog

    GMC Member

  • New Member
  • 228 posts

Posted 09 December 2008 - 01:47 PM

Woot !!
new update.. this extension is awsome... keep improving it when you can :)
i realy love this extension...
  • 0

#87 Krisando

Krisando

    GMC Member

  • New Member
  • 1351 posts

Posted 09 December 2008 - 08:50 PM

I think Ill stick with old version maybe, I like parts of the lighter lighting but it can be too bright for some things =/
Maybe have an option for Intensity, some things look nicer and some things look horrible. Good update though
  • 0

#88 Scyler_27

Scyler_27

    -Insane Kid-

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

Posted 09 December 2008 - 11:31 PM

I do have an option, it is called alpha. :lol: You can change the alpha value when setting the color to make it less bright. Also, when designing your lights, don't use so much white, use more grays to get a duller light. With this version, there is a way to tone it down. But with the old version, there was no way to get it brighter. Thanks for the feedback though.
  • 0

#89 Krisando

Krisando

    GMC Member

  • New Member
  • 1351 posts

Posted 10 December 2008 - 08:40 AM

I do have an option, it is called alpha. :lol: You can change the alpha value when setting the color to make it less bright. Also, when designing your lights, don't use so much white, use more grays to get a duller light. With this version, there is a way to tone it down. But with the old version, there was no way to get it brighter. Thanks for the feedback though.

Oh gray will do the trick, It looks like hdr lighting is on lol which looks wiked
  • 0

#90 Scyler_27

Scyler_27

    -Insane Kid-

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

Posted 12 December 2008 - 01:56 AM

A very slight, but important update today! I have removed the light_init() bug! It no longer has to be placed with the first object in the room, you can call it whenever you want! (Though it is still best to call it first) Though now, I have changed things with the light_end() command, so unless you want bugs and glitches, you will place it at room end of every room that is using this .gex. That is the only update, but it was certainly needed. :)
  • 0

#91 Krisando

Krisando

    GMC Member

  • New Member
  • 1351 posts

Posted 13 December 2008 - 08:46 PM

I wish light_init(); returned 1 if successfully executed just incase for any reason it didn't
-_- Good extension can't think of anything more useful which is really necessary.. Seems like you've finished your brilliant gm extension xP
Can't wait to see your next project :) This was very simple to use.
  • 0

#92 jobro

jobro

    GMC Member

  • New Member
  • 1247 posts
  • Version:GM8

Posted 16 December 2008 - 05:59 PM

Useful for GM pro's, useless for GM beginners which I am, now do us beginners a huge favour and create a drag&drop library and include it. I could see me using it, but not now.
  • 0

#93 Scyler_27

Scyler_27

    -Insane Kid-

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

Posted 17 December 2008 - 11:54 PM

I have actually been thinking of making a library for it. The only problem is the number of arguments needed, and the number of arguments provided for D&D. If I DO make a library, it will probably be used differently so that the GML won't go smoothly and you will have to use one or the other. I will have to think about it. I have been on a trip for the past week though, get home late tomorow, so I can't work on anything probably till friday or saturday.

Anyway, glad you guys like my extension, it isn't QUITE finished, still need to find some improvements for certain areas if possible and I will be able to finish it all up. :D

EDIT: I have fixed one of the things bugging me. You no longer have a light_init() or light_end() function! It is automatically done now (after some serious code alterations) so the only way to turn lights on and off is with light_main_set() of which I added another argument.

EDIT2: I have added a new function which supports views! You can now use light_view_set(view) to make the surface follow a specific view. (If you don't set, it draws over the entire level) This is a slow function and should never be placed in the step event. If sometime later you want to stop using views, you can re-set it by using v_noview. I don't know if this will solve any lag issues or not, but it was requested so tell me if it speeds things up at all!

Edited by Scyler_27, 19 December 2008 - 11:32 PM.

  • 0

#94 Scyler_27

Scyler_27

    -Insane Kid-

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

Posted 22 December 2008 - 03:09 AM

Anyone tried using the new view-setting function? I want to know if it speeds up games at all. ;) Especially the guy mentioning the lag with his 3000x3000 room.

Remember, all feedback is appreciated, good are bad. ;)
  • 0

#95 Fira

Fira

    God Bless You All

  • GMC Member
  • 1397 posts

Posted 22 December 2008 - 03:28 AM

Easy Lighting v3.9!
Easy, yet effective.

Hi! If you are looking at this topic, you are obviously in need of a good lighting engine. After browsing the Internet for a lighting engine myself, I noticed that the few options I found were hastily thrown together and some even had errors. I decided to take it upon myself to make my own lighting engine that would be not only easy to use, but flexible. I also wanted to make sure that it ADDED something to the game, I wanted it to be worth the effort! Well, I think I have succeeded. Let me list some of the features:

-Extremely fast lighting.
-6 easy to use functions.
-Very flexible.
-Customizable surround lighting! Do you want it based at midnight? Or perhaps at dawn?
-Three built-in light shapes for quick creation and testing!
-Supports custom light shapes with no slow down.
-Rotate and color your lights!
-Intense lighting which resembles HDR lighting!
-Lights "interact" with objects and other lights, making moving lights look that much more stunning!
-View support, have the lights drawn in only one view!


If that isn't enough to get you interested, check out this screenshot taken from the provided example.gmk:
Posted Image
Lights aren't just placed on top of objects, they interact with and brighten them! Though, of course, there is the option to remove colors and blending altogether for a more simplistic look!
The download is a zipped file containing an example, and a .gex file. The example has a script labeled "Functions" which fully explains each function, but here is a quick summery:

light_main_set() - Sets the properties for the surrounding light.
light_add_light() - Creates a new light.
light_set_light() - Modifies an existing light's properties.
light_set_on() - Turns a specified light on and off.
light_color_light() - Gives a light a color and intensity value.
light_view_set() - Assigns a view the job of drawing lights.
Lights can be turned on or off at will using light_main_set() and there are many ways (some included) to easily make flashing,blinking,and moving lights!

Don't wait any longer! It is a small file-size and well worth the download!
FILE:
Download - 50kb .zip <- Download v3.9

Contains: Lighting.gex , Example.gmk
License: Free to use, also in commercial games. - Credit not required, but appreciated.


All feedback appreciated! Please tell me of the things you do and don't like, any bugs you come across, and of course any ideas you think will benefit this .gex!


Can this game/other(s) be used in unregistered Game Maker without error(s)?
  • 0

#96 Scyler_27

Scyler_27

    -Insane Kid-

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

Posted 22 December 2008 - 03:56 AM

No, because (1) you can only use .gex files with GMPro and (2) it uses surfaces and blending which are registered functions.

EDIT: For those interested, I have just finished another slight update. I have added a separate function, light_surround_setcolor() to set the surround lighting's colors. You can have up to 4 colors now! This will be good for making sun-set effects and such. You can use 0-4 arguments with that script, any undefined argument will automatically be set to black. I also removed the color option in light_main_set() because it is now unnecessary.

Edited by Scyler_27, 22 December 2008 - 04:29 AM.

  • 0

#97 frog

frog

    GMC Member

  • New Member
  • 228 posts

Posted 22 December 2008 - 04:24 PM

im the guy from the 3000x3000 room lag... i havent tried it yet, ive been very busy with my work lately...

Im gona try it later this evening and ill edit maybe tomorow...

b.t.w. Real nice extension
  • 0

#98 Scyler_27

Scyler_27

    -Insane Kid-

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

Posted 22 December 2008 - 11:48 PM

Ok awesome, I hope it helps at least a little. :unsure:

New update today! Can now download version 3.11! I have added support for animated lights, and provide a quick example. I tested with 50 animated lights over the current lights with no lag at all! There are 2 new arguments added to light_add_light() and light_set_light() to set which sub-image of a light you want to use. Use -1 for it to cycle through all the images.
  • 0

#99 spazman0

spazman0

    GMC Member

  • New Member
  • 213 posts

Posted 25 December 2008 - 10:07 AM

I am making a game using your lighting engine, but it seems to lag up after a while. I have an emitter that shoots particles (circle sprites), and each of these particles has a motion trail (another object that decreases image_alpha every step). I have a larger light on the main particle, and smaller lights on each of the motion trail objects. My main question is whether there is a way to destroy a light, not just turn it off, or, if turning it off is destroying it. The reason I think that turning them off doesn't destroy them, is because everywhere I have an instance_destroy();, I also have a light_set_on(my_light,0);.

The game runs smoothly for the first 30 secs or so, and then it starts to lag up real bad, even when the particles are getting destroyed after about 3 seconds of life.
  • 0

#100 Scyler_27

Scyler_27

    -Insane Kid-

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

Posted 26 December 2008 - 06:34 AM

There is currently no way to destroy lights I am sorry to say. Since v1.0 I have been trying to think of a way to do that, but I still haven't figured out something. I am still working on it, however, so no worries there. ^_^ But yeah, it looks like since you can't destroy them, your objects keep creating more and more lights thus causing the lag.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users