Jump to content


Photo

Tlighting[2.4] Gm: Studio


  • Please log in to reply
209 replies to this topic

#1 tizzio

tizzio

    GMC Member

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

Posted 30 May 2012 - 09:57 PM

ENGINE DISCONTINUED :(

 

working on Glare engine -> http://gmc.yoyogames...howtopic=618482

 

 

 

 

logo2.png

Made in  ITALY  cool.gif

sep_features.png
 
New 2.4 Features

  • Fixed flickering shadows bug
  • Light quality & system quality (new argument in tl_init(...,...,...,quality))
  • New Hybrid system (that autoselect the mesh/sprite based rendering, according to the convenience)
  • tl_update & tl_draw now returns 0 if there is a surface error.
  • New shadowsprite Rendering : with many instances does not slow down as before
  • Added tl_mesh_hybrid(id)
  • Added tl_light_quality(light id)
  • Added tl_light_destroy_all() & tl_mesh_destroy_all()
  • Added tl_active(id, true or false) & tl_get_active(id)
  • Added tl_set_view([0..7])Possibility to choose the view index
  • Fixed tl_get_lighting(x,y)

Other features

  • GML knowledge required
  • Pc, Mac, Android, iOS. (not yet HTML5)
  • Static light stored in vram for gain speed!(use tl_light_delete(light id) for free memory)
  • Static & Dynamic Shadows from sprites
  • Static & Dynamic Shadows from meshes (with vertices)
  • Automatic creation of ordinary meshes (square, circle)
  • Lights color selection
  • Lights Auto-deactivation
  • Automatic Shadows Backface culling
  • Automatic meshes deactivation
  • Complete vertices control
  • Light intensity regolation
  • Glimmers of light on shapes
  • Choosing the shape of light through a mask in black and white
  • Get the lighting/shadowness value at (x,y)

DOCUMENTATION (work in progress)
http://tizsoft.alter...a.org/Tlighting


screen0.png

sep_download.png

 ---  To download on altervista, click the orange link ---

  • GM:Studio Project (.gmz) + GM8.x Project (.gmk) + Extension (.gex) + Executable (.exe)

Link cooming soon

  • Extension (.gex) only

http://tizsoft.alter...Tlighting24.gex

sep_tutorials.png

  • GM8.x - first demo

http://tizsoft.alter.../Tlighting2.gmk

  • GM8.x tutorial 0 - basics

http://tizsoft.alter...g_tutorial0.gmk

  • GM8.x tutorial 1 - hidden the player

http://tizsoft.alter...g_tutorial1.gmk

  • GM:Studio tutorial 0 - basics

http://tizsoft.alter...ial0_STUDIO.gmz

  • GM:Studio - first demo

http://tizsoft.alter...ting_studio.gmz


The gex was programmed and tested on a Netbook, so performance is optimized at best, to work in any device.

Thanks to jak for rendering method with 2 blend modes and backface culling formula.


Edited by tizzio, 20 May 2014 - 08:29 AM.

  • 10

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#2 enick11

enick11

    GMC Member

  • GMC Member
  • 7 posts
  • Version:Unknown

Posted 30 May 2012 - 10:12 PM

O MY GOD ! very nice man! the best light engine ever!

-30/30 fps with a lot of light and meshes!
FANTASTIC ::lmao::

Edited by enick11, 30 May 2012 - 10:22 PM.

  • 0
[GMOGRE3D WIP]LEGGENDA: the last man on the earth , 3d topdown survival
Posted Image

#3 Drara

Drara

    GMC Member

  • GMC Member
  • 325 posts

Posted 31 May 2012 - 03:30 AM

Very neat!
I've a question though: Is your example compiled in Game Maker Studio? o: Because it works a lot faster than when I'm compiling it myself in GM 8.1
  • 0

#4 enick11

enick11

    GMC Member

  • GMC Member
  • 7 posts
  • Version:Unknown

Posted 31 May 2012 - 10:09 AM

Very neat!
I've a question though: Is your example compiled in Game Maker Studio? o: Because it works a lot faster than when I'm compiling it myself in GM 8.1


I believe he used GM 8.0
  • 0
[GMOGRE3D WIP]LEGGENDA: the last man on the earth , 3d topdown survival
Posted Image

#5 tizzio

tizzio

    GMC Member

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

Posted 31 May 2012 - 12:50 PM

Very neat!
I've a question though: Is your example compiled in Game Maker Studio? o: Because it works a lot faster than when I'm compiling it myself in GM 8.1

I use GM 8.0
  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#6 Drara

Drara

    GMC Member

  • GMC Member
  • 325 posts

Posted 31 May 2012 - 05:30 PM

I use GM 8.0

Oh o: Can it really be that GM 8.1 is slower than 8.0? o-o
  • 0

#7 Pancratius

Pancratius

    GMC Member

  • GMC:Member
  • 55 posts
  • Version:GM8

Posted 31 May 2012 - 06:18 PM

I'm sorry, maybe its because I'm new to game maker coding, but I had a look at the coding in your example, and couldn't get my head around it at all. Would it be possible for you to comment it please. It would make it much easier to understand.

Regards,
Pancratius

#8 enick11

enick11

    GMC Member

  • GMC Member
  • 7 posts
  • Version:Unknown

Posted 31 May 2012 - 07:18 PM

I use GM 8.0

Oh o: Can it really be that GM 8.1 is slower than 8.0? o-o


oh yes :confused:
  • 0
[GMOGRE3D WIP]LEGGENDA: the last man on the earth , 3d topdown survival
Posted Image

#9 tizzio

tizzio

    GMC Member

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

Posted 31 May 2012 - 10:29 PM

I'm preparing some tutorials ;)


If you also want to post some examples, or if you create some games using this gex
Send me a PM! I will provide to include them in the OpenPost

Edited by tizzio, 10 July 2014 - 06:31 PM.

  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#10 Pancratius

Pancratius

    GMC Member

  • GMC:Member
  • 55 posts
  • Version:GM8

Posted 01 June 2012 - 04:51 PM

That tutorial is quite helpful, but doesn't seem to work. It gives an error when I right click the lights to remove them.

This is the error:

___________________________________________
ERROR in
action number 1
of Destroy Event
for object obj_light:

Error in code at line 2:
   tl_light_delete(l);
                   ^
at position 18: Unknown variable l

To fix this I created a variable using the D&D method called my_light, before the code in the create event of the obj_light. I then changed the line causing the problem to:

tl_light_delete(my_light);

and this problem did not occur again.

Also, I am working on a game which is using this extension. However I am attempting to make the game at a resolution larger than 640x480. The problem is the ambient lighting does not extend to the size of the room. Here is an image which illustrates what I mean:

Posted Image

Uploaded with ImageShack.us
How might I extend the ambient lighting to the extents of the room?

Edited by Pancratius, 01 June 2012 - 04:52 PM.


#11 tizzio

tizzio

    GMC Member

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

Posted 02 June 2012 - 01:49 AM

Thank you, for testing ;)

The light follows the size of the view.
So set the view, equal to the size of the window! :)

in Room editor
-> room width : 900
-> room height: 700

-> view wport : 900
-> view hport : 700

view sizes must be smaller (or equal) than room width !

Edited by tizzio, 02 June 2012 - 01:57 AM.

  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#12 Pancratius

Pancratius

    GMC Member

  • GMC:Member
  • 55 posts
  • Version:GM8

Posted 02 June 2012 - 10:07 AM

Thank you, for testing ;)

The light follows the size of the view.
So set the view, equal to the size of the window! :)

in Room editor
-> room width : 900
-> room height: 700

-> view wport : 900
-> view hport : 700

view sizes must be smaller (or equal) than room width !



Working perfectly now thanks for your help :).

#13 CrazyGuyGames

CrazyGuyGames

    YYGF Member

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

Posted 02 June 2012 - 03:54 PM

Amaizing, just what I need, but I don't understeand it, can you comment it or make another example, but more simple?
  • 0

AZGIWjf.png

aSzDlXB.png


#14 thatonenerd22

thatonenerd22

    GMC Member

  • New Member
  • 2 posts

Posted 02 June 2012 - 04:10 PM

Well, now I feel silly for wasting 3+ months and multiple versions making a not-quite-as-good lighting engine. :(
global.viewx = round(view_xview/gridsize)*gridsize
global.viewy = round(view_yview/gridsize)*gridsize
r = 0
g = 0 
b = 0
strength = 0
xx = global.viewx-gridsize*2
yy = global.viewy-gridsize*2
reps = 0
draw_set_color(c_white)
lines = 0
repeat((view_wview/gridsize+2)*(view_hview/gridsize+2)+view_wview)
{
with(light_parent)
{
i = collision_line(x,y,controller.xx,controller.yy,obj_solid,true,true)
if i <1
{
if (point_direction(x,y,controller.xx,controller.yy) <= maxdir and point_direction(x,y,controller.xx,controller.yy) >= mindir)
or (point_direction(x,y,controller.xx,controller.yy)-360 <= maxdir and point_direction(x,y,controller.xx,controller.yy)-360 >= mindir)
or (point_direction(x,y,controller.xx,controller.yy)+360 <= maxdir and point_direction(x,y,controller.xx,controller.yy)+360 >= mindir)
{if
point_distance(x,y,controller.xx,controller.yy) < strength
{if (x > global.viewx-strength and y > global.viewy-strength and x < global.viewx+view_wview+strength and y < global.viewy+view_hview+strength)

{
controller.strength = max(0,min(1,controller.strength,(point_distance(x,y,controller.xx,controller.yy)/strength)*intensity))
controller.r = max(controller.r,r*(1-point_distance(x,y,controller.xx,controller.yy)/strength)*cintensity)
controller.g = max(controller.g,g*(1-point_distance(x,y,controller.xx,controller.yy)/strength)*cintensity)
controller.b = max(controller.b,b*(1-point_distance(x,y,controller.xx,controller.yy)/strength)*cintensity)
controller.lines+=1
}}}}



}
draw_sprite_ext(spr_shadow,0,xx,yy,
gridsize/8,gridsize/8,0,
make_color_rgb(r,g,b),strength)
 
//draw_sprite_ext(spr_shadow,0,xx,yy,gridsize,gridsize,0,c_black,strength)
xx += gridsize
if !(xx < global.viewx+view_wview+gridsize*2)
{xx = global.viewx-gridsize*2
yy += gridsize}

r = 10*global.sunlight
g = 10*global.sunlight
b = 0
strength = global.sunlight
}

Edited by thatonenerd22, 02 June 2012 - 04:14 PM.

  • 0

#15 tizzio

tizzio

    GMC Member

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

Posted 02 June 2012 - 07:01 PM

Come on, do not demoralize!
I started this light engine 4-5 months ago, but I use game maker for the past 2 ½ years.
I am sure that you will be able to do better than me ;)

Edited by tizzio, 02 June 2012 - 07:02 PM.

  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#16 Pancratius

Pancratius

    GMC Member

  • GMC:Member
  • 55 posts
  • Version:GM8

Posted 09 June 2012 - 11:19 AM

Hello.

I have been trying to use this extension now for a few days, and I think I'm getting the hang of it. However I am lagging really badly when using multiple lights in my own work. However when I used your example, there were no issues. I am hoping you can help me with this. Here is a link to my GMK file.

http://www.mediafire...da90hqrrg56mbdf

Could you please point me towards where my problem could be.

Kind Regards,
Pancratius

#17 tizzio

tizzio

    GMC Member

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

Posted 11 June 2012 - 03:01 PM

ok i try and tell you
  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#18 tizzio

tizzio

    GMC Member

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

Posted 11 June 2012 - 03:05 PM

The problem is that you used 300000000000 mesh :huh:
1 mesh for each piece of wall
Use a single mesh for long pieces of wall, it will go much faster!
  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#19 JeroenV

JeroenV

    GMC Member

  • New Member
  • 15 posts

Posted 12 June 2012 - 06:58 PM

I have a problem that's mainly my faul, I just need to find how to fix it. I have a random generation code for my game wich is quite extensive, I recently wanted to try and add your lighting engine to improve the looks of the game. I'm just using all the standard codes from the example but because of my generation code (I believe) it does not work properly.

I created a "Light" room, with the obj_engine and then let it move on to the next room. Yet if I use room_next it will just skip the next room and if I use room_goto("Roomname") it's just a black screen.

And I believe it might be because of this code.

var o;
global.loaddone=0
o=random(100)
{

for(i=0;i<100;i+=1){
a=random(room_width)
b=random(room_height)
position_destroy(a,b) 
instance_create(a,b,obj_tree)
}



for(i=0;i<100;i+=1){
a=random(room_width)
b=random(room_height)
position_destroy(a,b) 
instance_create(a,b,obj_tree1)
}



for(i=0;i<100;i+=1){
a=random(room_width)
b=random(room_height)
position_destroy(a,b) 
instance_create(a,b,obj_tree2)
}


for(i=0;i<1;i+=1){
a=random(room_width)
b=random(room_height)
position_destroy(a,b) 
instance_create(a,b,obj_seasource)
}

for(i=0;i<5;i+=1){
a=random(room_width)
b=random(room_height)
position_destroy(a,b) 
instance_create(a,b,obj_forestsource)
}

for(i=0;i<30;i+=1){
a=random(room_width)
b=random(room_height)
instance_create(a,b,obj_stone)
}



if(o=1)
{
a=random(room_width)
b=random(room_height)
position_destroy(a,b) 
instance_create(a,b,obj_oceansource)
}

for(i=0;i<10;i+=1){
a=random(room_width)
b=random(room_height)
position_destroy(a,b) 
instance_create(a,b,obj_water)
}


}
timeline_running=true

Now, as you can see this code deletes everything beneath it to make sure there isn't more than 1 instance on the same spot. The obj_light is created after the world has generated using a 'loading' timeline. So why is my screen black, entirely?

It's quite a big project I'm working on I would love if this could work with my current setup.

Thanks.
  • 0

#20 tizzio

tizzio

    GMC Member

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

Posted 12 June 2012 - 07:38 PM

Hi, JeroenV!
Check that you have initialized the object "engine" light in the room and set this as "Persistent".
If you make a .gmk without your code, it works?

If you want, send me a Private message with an example.
I'll try to help you!




NEW VERSION 1.1
-fix for tl_light_delete

DOWNLOAD AT THE SAME LINK

Edited by tizzio, 05 October 2012 - 09:39 AM.

  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#21 ToxicArtz

ToxicArtz

    GMC Member

  • GMC Member
  • 75 posts
  • Version:GM8

Posted 19 June 2012 - 10:22 PM

Posted Image



Made in ITALY :cool:

Posted Image project (.gmk) +extension (.gex) + executable (.exe)

TUTORIALS:
- tutorial 0 - easy
http://tizsoft.alter...g_tutorial0.gmk

FEATURES

-****in' Easy to use
-Static & Dynamic Light from sprites
-Static & Dynamic Light from meshes (with vertices)
-Automatic creation of ordinary meshes (square, circle)
-Lights color selection
-Lights Auto-deactivation
-Automatic Shadows Backface culling
-Automatic meshes deactivation
-Complete vertices control
-Light intensity regolation
-Glimmers of light on shapes
-Choosing the form of light through a mask in black and white

The gex was programmed and tested on a Netbook, so performance is optimized at best, to work in any device.

Posted Image
Spoiler


Thanks to jak for rendering method with 2 blend modes and backface culling formula.



I'm new to game maker functions still. Could you explain to me how to use this engine?
  • 0

#22 DuncanBell

DuncanBell

    GMC Member

  • GMC Member
  • 163 posts

Posted 29 June 2012 - 09:05 PM

This doesn't want to run in Game Maker studio.

The exe works perfectly, and I can open the source files. As soon as I try compile it bombs out.

EDIT: Any suggestion to get it working?

Edited by DuncanBell, 29 June 2012 - 09:06 PM.

  • 0

#23 Ar7ific1al

Ar7ific1al

    GMC Member

  • New Member
  • 17 posts
  • Version:GM:Studio

Posted 02 July 2012 - 07:01 AM

This doesn't want to run in Game Maker studio.

The exe works perfectly, and I can open the source files. As soon as I try compile it bombs out.

EDIT: Any suggestion to get it working?

The same happened when I tried it out. There's pretty much zero documentation, and the code isn't well commented. You'd probably be best finding something else, doing without, or creating something yourself.
  • 0

#24 creators124

creators124

    awesomeliciousmember

  • GMC Member
  • 866 posts
  • Version:GM8

Posted 02 July 2012 - 08:18 AM

This doesn't want to run in Game Maker studio.

The exe works perfectly, and I can open the source files. As soon as I try compile it bombs out.

EDIT: Any suggestion to get it working?

The same happened when I tried it out. There's pretty much zero documentation, and the code isn't well commented. You'd probably be best finding something else, doing without, or creating something yourself.

*sigh*
that is true.
even though the examples look amazing, I get a message saying "surface error" when I put 1 more light in the room.
I don't know why. Posted Image
  • 0
Posted ImageRate this topic:0 | 1 | 2 | 3 | 4 | 5

#25 tizzio

tizzio

    GMC Member

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

Posted 03 July 2012 - 09:33 AM

Sorry, guys! There are some differences beetween GM8 and GM:Studio.
I haven't GM:Studio, so i can't try to fix the engine... :sad:
  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#26 creators124

creators124

    awesomeliciousmember

  • GMC Member
  • 866 posts
  • Version:GM8

Posted 04 July 2012 - 01:25 AM

Sorry, guys! There are some differences beetween GM8 and GM:Studio.
I haven't GM:Studio, so i can't try to fix the engine... :sad:

I get that error from putting 1 more light in any of you examples.
but I have no idea because I don't know how to use it, let alone on how to use the functions.

plus I used GM 8.1! (and studio)
  • 0
Posted ImageRate this topic:0 | 1 | 2 | 3 | 4 | 5

#27 tizzio

tizzio

    GMC Member

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

Posted 07 July 2012 - 08:24 PM

Your computer probably has a very old video card.
I created the engine on a netbook, so there hasn't so high requirement to run.



Thanks to the idea of the user Kirby, i will add the function
tl_get_lighting (x, y)
that returns the amount of illumination at the point x, y.

Edited by tizzio, 07 July 2012 - 08:25 PM.

  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#28 MonkD

MonkD

    GMC Member

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

Posted 22 July 2012 - 05:12 AM

Update: A few things I forgot to mention. It looks like maybe it's a depth issue or somehow the way things are being drawn has changed between 8.1 and studio as the debug info draws but is quickly overwritten by the scene. It never comes back up.

Anyhow, to get it running in studio just change the name of the script draw_self (there is a function in GMS called draw_self so you can't duplicate that name) to something like draw_self_2 and then change the two places that call that script. Then it will run in studio, but you'll be at full bright with no apparent lighting effects. That's as far as I've gotten so far. =) Maybe tizzio can help me figure out what else may be broken. I'd love to try this out in my studio project. Also bizarre...if you don't have the extension loaded it doesn't error out at all. I'm far too new to GMS to be of much more use, but I'm happy to help if there's something I can test.

Monk

Edited by MonkD, 22 July 2012 - 05:14 AM.

  • 0

#29 tizzio

tizzio

    GMC Member

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

Posted 28 July 2012 - 01:11 PM

Thanks for your help, Monk :thumbsup:

Edited by tizzio, 28 July 2012 - 01:12 PM.

  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#30 nikurizo

nikurizo

    GMC Member

  • GMC Member
  • 69 posts
  • Version:Unknown

Posted 11 August 2012 - 04:28 AM

Update: A few things I forgot to mention. It looks like maybe it's a depth issue or somehow the way things are being drawn has changed between 8.1 and studio as the debug info draws but is quickly overwritten by the scene. It never comes back up.

Anyhow, to get it running in studio just change the name of the script draw_self (there is a function in GMS called draw_self so you can't duplicate that name) to something like draw_self_2 and then change the two places that call that script. Then it will run in studio, but you'll be at full bright with no apparent lighting effects. That's as far as I've gotten so far. =) Maybe tizzio can help me figure out what else may be broken. I'd love to try this out in my studio project. Also bizarre...if you don't have the extension loaded it doesn't error out at all. I'm far too new to GMS to be of much more use, but I'm happy to help if there's something I can test.

Monk

You can make the game work without the extension but it has no sense. When you install the extension and run the game, GMS give a compiler exception.

@tizzio
I am going to begin a project that will use your lighting system and I want to make a question to take advantage of it's speed.
I'll probably use a a tile based collision system (based on the mike daily one) that uses arrays to collide with, hopefully you would add support to this kind of systems, but I think that's not going to happen so I want to ask you if have extremely large walls, will be better than have walls of sizes like 128*128.
  • 0

#31 GVmakesGames

GVmakesGames

    rhythm huh?

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

Posted 22 August 2012 - 12:16 PM

OMG this is fantasic :D

PS: viva la pizza! ;)
  • 0

just another indie game developer, this time agoraphobic.

Twitter | My Blog | Youtube | Steam | GameJolt | Itch.ioIndieDB | Ask.fm | reddit | MyAnimeList | osu! | WINGverse

 

GVmG.gif twitch_emoticon___wutface_by_centaurman_

image4.png?uid=6995159&m=0


#32 tizzio

tizzio

    GMC Member

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

Posted 04 September 2012 - 10:21 AM

@tizzio
I am going to begin a project that will use your lighting system and I want to make a question to take advantage of it's speed.
I'll probably use a a tile based collision system (based on the mike daily one) that uses arrays to collide with, hopefully you would add support to this kind of systems, but I think that's not going to happen so I want to ask you if have extremely large walls, will be better than have walls of sizes like 128*128.

Yes. If you use "large" walls, the engine has less calculations and draws to do!
Use an algorithm to merge multiple "objects tiles" in one.
  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#33 tizzio

tizzio

    GMC Member

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

Posted 04 September 2012 - 12:37 PM

NEW VERSION 1.2
  • Added tl_get_light(x,y); //returns the light value (from 0 to 1), use it before tl_draw()
  • Added tl_get_surface(); //returns the main surface id

DOWNLOAD AT THE SAME LINK


NEW TUTORIAL "Hidden the player in the shadows"
(uses Tlighting 1.2)
http://tizsoft.alter...g_tutorial1.gmk

Posted Image

Edited by tizzio, 04 September 2012 - 03:15 PM.

  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#34 opalsweet

opalsweet

    GMC Member

  • GMC Member
  • 11 posts
  • Version:GM8

Posted 13 September 2012 - 09:05 AM

so wonderful !!! the Extensions :woot:
  • 0

#35 nikurizo

nikurizo

    GMC Member

  • GMC Member
  • 69 posts
  • Version:Unknown

Posted 13 September 2012 - 08:56 PM

@tizzio
I am going to begin a project that will use your lighting system and I want to make a question to take advantage of it's speed.
I'll probably use a a tile based collision system (based on the mike daily one) that uses arrays to collide with, hopefully you would add support to this kind of systems, but I think that's not going to happen so I want to ask you if have extremely large walls, will be better than have walls of sizes like 128*128.

Yes. If you use "large" walls, the engine has less calculations and draws to do!
Use an algorithm to merge multiple "objects tiles" in one.


Yes I've done a merging walls system, and now I'm using Xtreme Physics for collisions.

I don't know if you will permit this but gm:studio allow me to see the source of the system and today I found how to solve the problem with it. The only thing you have to do is delete the first line of code of "tl_draw" the "surface_reset_target()".

I don't know why but your engine runs incredibly more slow in gm:s.
  • 0

#36 Sirosky

Sirosky

    GMC Member

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

Posted 13 September 2012 - 09:32 PM

None of the links work. :confused:

EDIT: Nvm, it works. Only if I knew Italian =P

Edited by Sirosky, 13 September 2012 - 09:33 PM.

  • 0

gcjRa8D.png


#37 conantbh

conantbh

    GMC Member

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

Posted 21 September 2012 - 09:29 PM

This is simply awesome. I do humbly bow in front of your work.

And and thanks to legocris for telling us how to make this compatible with gm:studio.
  • 0

#38 conantbh

conantbh

    GMC Member

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

Posted 23 September 2012 - 07:18 PM

As I stated a few days ago I am now using this exceptional gex, but I'm stuck with a little problem. I'll let the images speak for me.

What I have (actual game)
Posted Image

What I would love to have (same image, but edited with paint)
Posted Image

Anyone has some ideas? Thanks, Conan

Edited by conantbh, 23 September 2012 - 07:20 PM.

  • 0

#39 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 23 September 2012 - 08:10 PM

Change the depth of the wall?
  • 0

#40 conantbh

conantbh

    GMC Member

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

Posted 23 September 2012 - 09:39 PM

Change the depth of the wall?


thanks for the answer man,

with depht 0 I get this
Posted Image

with depht -5 I get this
Posted Image

I need to see entire wall blocks but only the ones wich are in range of the light.

EDIT: basically I'm asking how to make object cast the shadow only on the terrain, and not on themself or other objects.

Edited by conantbh, 24 September 2012 - 11:08 PM.

  • 0

#41 xXNeoREXx

xXNeoREXx

    GMC Member

  • GMC Member
  • 41 posts
  • Version:GM8.1

Posted 27 September 2012 - 10:39 PM

I seriously don't recommend using this engine because it uses a massive amount of RAM.
After placing about 50 light sources the game's RAM ran to more then 1 gb.
In the FPS and CPU section it is pretty solid although with alot of lights it does drop.

But what I can clearly recommend is the Easy Lighting engine, which remains at the same RAM whatever the amount of lights, and it's CPU is good. (although with shadows it gets to about 20% and without its 4%)
  • 0

#42 Sirosky

Sirosky

    GMC Member

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

Posted 27 September 2012 - 11:03 PM

I seriously don't recommend using this engine because it uses a massive amount of RAM.
After placing about 50 light sources the game's RAM ran to more then 1 gb.
In the FPS and CPU section it is pretty solid although with alot of lights it does drop.

But what I can clearly recommend is the Easy Lighting engine, which remains at the same RAM whatever the amount of lights, and it's CPU is good. (although with shadows it gets to about 20% and without its 4%)


This is a simple but fairly fast engine. The problem isn't the extension, it's your computer. Or, you simply need to learn how to program more efficiently =P
  • 0

gcjRa8D.png


#43 famous

famous

    GMC Member

  • GMC Member
  • 170 posts
  • Version:Unknown

Posted 28 September 2012 - 01:34 AM

Hes right. I got 100+ MB after adding 4-5 Lights.

I recommend you using FreeMemory.DLL ive written short time ago. Just call memory_clean() and i fall from 140 to 2 MB.
  • 0
An oversized signature with elements unreadable in light theme:

#44 nikurizo

nikurizo

    GMC Member

  • GMC Member
  • 69 posts
  • Version:Unknown

Posted 28 September 2012 - 06:38 AM

Maybe the engine uses a lot of ram but it runs MUCH fater in my pc than Easy lighting.

I think that the problem is caused because the engine creates and destroy one surface per light every step. Also it can be the cause of the slowdown in gm:s, not sure but I think gm:s uses hardware surfaces unlike gm8.

@Famous: Wow your extension is amazing. I don't know why gm doesn't do this manualy.

Edited by legocris, 28 September 2012 - 06:41 AM.

  • 0

#45 Sirosky

Sirosky

    GMC Member

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

Posted 28 September 2012 - 02:59 PM

Yeah, I use Cleanmem in all my games. I find it odd that GM didn't include that as a default.
  • 0

gcjRa8D.png


#46 tizzio

tizzio

    GMC Member

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

Posted 05 October 2012 - 09:26 AM

I'm working on light quality, for increase frames per second and to reduce VRAM usage.

I seriously don't recommend using this engine because it uses a massive amount of RAM.
After placing about 50 light sources the game's RAM ran to more then 1 gb.
In the FPS and CPU section it is pretty solid although with alot of lights it does drop.

But what I can clearly recommend is the Easy Lighting engine, which remains at the same RAM whatever the amount of lights, and it's CPU is good. (although with shadows it gets to about 20% and without its 4%)



No, guys
Static lights are turned into sprites, then they should be stored in RAM.
When you destroy the lights, the ram is released, don't worry!

So, don't use cleanmem.dll because unexplained error occurs.

As I stated a few days ago I am now using this exceptional gex, but I'm stuck with a little problem. I'll let the images speak for me.

What I have (actual game)

Spoiler


What I would love to have (same image, but edited with paint)
Spoiler


Anyone has some ideas? Thanks, Conan


To do what you want, you greatly increase tl_light_intensity

If you are not satisfied, you can change the type of projection of the contact, try changing spr_shadow_mask.

I'm waiting for a stable version of gmstudio where the blend modes work as they should.

Edited by tizzio, 05 October 2012 - 10:10 AM.

  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#47 conantbh

conantbh

    GMC Member

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

Posted 05 October 2012 - 12:47 PM

As I stated a few days ago I am now using this exceptional gex, but I'm stuck with a little problem. I'll let the images speak for me.

What I have (actual game)

Spoiler


What I would love to have (same image, but edited with paint)
Spoiler


Anyone has some ideas? Thanks, Conan


To do what you want, you greatly increase tl_light_intensity

If you are not satisfied, you can change the type of projection of the contact, try changing spr_shadow_mask.


Thanks for the answer, but that wouldnt work. In any case there will be some shadow projected on the walls, and i need them to be shadow-free. To describe what i would love to have with words i can say that i need that the wall to project shadows on the ground and other objects, but not on itself and other istances of the walls.

EDIT:

if you are going to release a new version can i suggest to add a function similar to tl_light_get_intensity that checks in the point x,y if there is light or not (and doesnt care of the intensity)?

Edited by conantbh, 05 October 2012 - 01:10 PM.

  • 0

#48 tizzio

tizzio

    GMC Member

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

Posted 05 October 2012 - 06:00 PM

if you are going to release a new version can i suggest to add a function similar to tl_light_get_intensity that checks in the point x,y if there is light or not (and doesnt care of the intensity)?

exists tl_get_lighting(x,y) ;
look at the example "hide the player in the shadows"

http://tizsoft.alter...g_tutorial1.gmk

sorry but i can't add this feature, becouse it need an implement of z coordinate(layers)

Edited by tizzio, 05 October 2012 - 06:03 PM.

  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#49 Firgof

Firgof

    GMC Member

  • GMC Member
  • 54 posts

Posted 06 October 2012 - 04:41 AM

Getting this error in GM: Studio
VMError!! Occurred - Push :: Execution Error - Variable Get __OBF__12
 at gml_Script_tl_mesh_point_add (line 18) - global.__OBF__12+=1;

Is this entirely incompatible with GM:S or is there a 'safe mode' I can use for now until if/when you get it fixed?
  • 0

#50 tizzio

tizzio

    GMC Member

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

Posted 06 October 2012 - 10:44 AM

Getting this error in GM: Studio

VMError!! Occurred - Push :: Execution Error - Variable Get __OBF__12
 at gml_Script_tl_mesh_point_add (line 18) - global.__OBF__12+=1;

Is this entirely incompatible with GM:S or is there a 'safe mode' I can use for now until if/when you get it fixed?


sorry, isn't compatible with GM:Studio, that still has too many bugs to make the porting.
it only works on gm8.0 and gm8.1
  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288