Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Ethereums

12
Posts
1
Topics
A member registered Jan 04, 2021

Recent community posts

I'd be happy to pay for it when it's released!

Unfortunately this seems to be a lot of extra work at this point just to get my sprites to look normal under this lighting engine.

At this point I don't know if it's worth it to go forward with this lighting engine. It is way more complex than I thought it was going to be. My main goal was just to have lights at certain depths in an isometric environment but now I need to download materials, normals, etc. and I can't even get that to work.

Our game is going to consist of a lot of different sprites and if I have to generate different images for every single sprite I want to look normal under the lights then I'm not sure this is a good idea.

I don't know why but on the PBR Packer program, pressing "Save" sometimes doesn't do anything, nothing gets created on my file system.


(1 edit)

Yes!! Setting the shadow depth works! Thank you! And yeah regarding the PBR packer, I watched your video on it but I'm confused.

My character for example is a large sprite sheet with over 200 frames. The sprite sheet is 1384 x 384px I dragged it into the clip window. I then clicked on normal but it's showing a 64x64 image. Same with material.

I'm honestly really new to normals and maps/etc. but basically I just want my players to not be so white when the lights are shining on them. Same with my buildings. When I have the le_day_night_cycle object in, once morning hits, the building and players are completely illuminated with pure whiteness. I just want my sprites to look like they originally do when light gets shined on them: I'm not sure what normals I'm supposed to be downloading. I tried using the online one you suggested in your video and created a normals sprite sheet from my player's sprite sheet and when I imported it into the game and set it as the normal map on my player object: the pure whiteness when the light shined on the players was still there.

Thank you for your patience with me. Turning up roughness and down metallic didn't seem to do much unfortunately. I'll try using the PBR packer and see if it changes anything.

Regarding setting the depth, the only one I found in the guide was set_depth(_depth) (0..1) which I am already doing but the light is not going behind my buildings when the y value goes below the building's y value. I am updating the depth of my buildings using update_depth() as well. I couldn't find anywhere in the guide for setting depth other than that function and increment_depth(_increment). The light always appears to be going over everything no matter where its position is.

//Layers depth setup

layer_depth("Instances", -1);
layer_depth("Light_Layer", 100);
layer_depth("Background", room_height + 100);

//Building / Solid Object Step Event
depth = room_height - y + 100;
update_depth();

//Light Step Event
x = mouse_x; y = mouse_y;
d = y / room_height;
set_depth(d);

(4 edits)

I did but it's a very complicated system honestly at first glance. I'm very sorry I'm trying to understand it. I don't know what objects need to inherit from what to get depth working properly, I understand depth is a recent addition you added?

I now have my player and my building objects inheriting from __le_game. I think things are starting to work a bit better.

I now have two small issues though:

- Light is emitting very strong whiteness against my players and objects that are inheriting from __le_game. I was just hoping it could brighten up the scene the way it would be drawn if there was no darkness. It's lighting up the background layer perfectly fine but the player/solid objects are turning white
--

- The light is not going behind my building now, it's always above it
--

But I'm guessing this is because I need to somehow get the le_light_spot object to inherit from __le_game as well so I can call update_depth? It's already inheriting from _le_light_cull which inherits from __light. So I tried making __light inherit from __le_game but now I get this error:
"
Variable le_light_spot.normal(101661, -2147483648) not set before reading it.

 at gml_Object___le_game_Other_25 (line 3) - draw_sprite_ext(normal_map, image_index, x, y, image_xscale, image_yscale, image_angle, normal, LE_NORMAL_ANGLE);
"

(2 edits)

I've set the origin of my sprites at the lowest isometric point so I don't have to use bbox_bottom I don't think.


I watched the video, I'm normalizing the depths now (in my player and solid objects):

Function calculate_depth():
depth = room_height - y + 100;

Controller Create Event
layer_depth("Instances", -1);
layer_depth("Light_Layer", 100);
layer_depth("Background", room_height + 100);

Solid Objects Step Event:
calculate_depth();

Player Create Event:
light = instance_create_layer(x, y,"Light_Layer", le_light_spot);


Player Step Event:
calculate_depth();
with(light) {
    x = other.x; y = other.y + 1;

    set_depth(y / room_height);
}

My player and the light objects unfortunately don't have the function "update_depth()"

--
I still don't understand what I'm doing wrong. I'm using set_depth() now but the light is still going under my player and above the background. The light is going under everything except the background.

I haven't touched shadows and nothing is inheriting from a shadow object yet, I'm just trying to get the light to go in the proper depth (same depth as my player but above my player).

Player depth is working fine still. I just don't understand. How do I set the light's depth? What am I doing wrong?

(3 edits)

So I'm now pretty confused. I also have no idea where the depth sorting even is in the Eclipse objects. Nor do I fully understand how to set a light's depth or how I'd incorporate instance depths into it or how to incorporate light depths into my own depth sorter above.  I don't mind using a different method but I don't know how to incorporate light depth (or set light depths) into a depth sorter in general.

I've reverted back to setting the depth for my objects as per your suggestion.

Controller create event (setting layer depths):

layer_depth("Instances", -1);
layer_depth("Light_Layer", 0); // <-- light_engine object placed on this layer
layer_depth("Background", 1);

Player create event:
light = instance_create(x, y, le_light_spot);

Player/Solid Objects step event:
depth = room_height - y; // this works, my player is going under and over other objects properly and vice versa

As well in my Player step event for their light:
light.x = x; light.y = y+1; // so the light always goes over my player
light.depth = y / room_height;

light.light_depth = light.depth;

Expected Results:
If the player goes above the building  (y < building.y), the player should be drawn underneath it. The player's light should be drawn over the player, but underneath the building.
If the player goes below the building (y > building.y) the player should be drawn overtop of it. The player's light should should be drawn over the player as well as the building

Results:
Positives: The lighting system successfully goes over my background and instances layers (I will refer to this as the "darkness")
Negatives: My player's light is always under my player/all other instances but above the background. Setting the Light_Layer depth to -2 puts it over everything. Setting light.depth or light.light_depth doesn't appear to change anything. It doesn't matter where my light's y is set to, it will get drawn over all instances at all times, even if my player goes under (y < building.y) a building.

What am I doing wrong?

(4 edits)

So I'm now using a priority queue for depth sorting as per your suggestion. The other methods weren't working unfortunately.

But I'm not sure how to draw lights at certain depths now when looping through my sorted depth instance list.
I have a light of type le_light_spot created by my player and it follows my player around, but I'm not sure:

1) How to turn off its default drawing/rendering

2) How to manually render it after my player's draw event call in my depth sorting object

How do I manually render, for example, a spot light using code?

So I have an isometric game and I'm using the classic depth = -y to give a sense of "3D" space in my game.


However the entire lighting engine is being rendered under my objects in the room. Only the background layer is covered by the lighting engine.


I can't seem to get the lighting engine to go over my objects. I'm guessing this is related to the layers in the room but how do I get it to go over my instance layers?

I can't seem to test light_set_depth() because no matter what I do, the lighting engine is going underneath all objects anyways. I'm guessing it has to do with the layers in the room?

I have two layers: "Instances" and "Background"

Not sure what options to set in the light_engine object


Is there a discord or somewhere we can ask questions?


I'm unfortunately having issues just getting it to work in my game at all.

(8 edits)

So basically I've got a separate Steam installation on another folder on my Desktop, that's the one I launch with Sandboxie.

I made a shortcut to that, and ensured it runs as administrator and placed "-initbootstrap" in the target.

I then ran the shortcut:


And then after I logged into Steam (second account), I ran the second version of the game like so:


I'm also clicking "Run as UAC Administrator" for everything I'm running in Sandboxie.

Unfortunately even after all that, it's still not working. Second game client does not want to connect to Steam.

Are we sure at this point that it's not the runner/GameMaker doing something that's not allowing it to connect to Steam? Maybe it has something to do with the Steam App ID? I couldn't find out where to type it in in GMS2:


Are my game options fine?

Also my Steam SDK version:

And my GMS2 IDE/Runtime versions:


I installed Sandboxie on my PC

I ran Steam regularly and logged into my main account

I ran Steam in Sandboxie and logged into my alternate (second) account

I then ran the example from GMS2 regularly (works, can create lobbies/press shift+tab, etc)

I then copied the parameter string to my clipboard:

W://windows/Runner.exe -debug_steamapi -game X:/SteamworksGmlExample_24BF7CD3_VM\SteamworksGmlExample.win

I ran that command in my Steam Sandboxie, it spawned another game runner

However, this game runner is refusing to connect to my alternate Steam account. I can't press shift+tab to view Steam, can't create lobbies or refresh lobbies. But I can clearly see the runner and Steam are both running in the same Sandbox environment:


Any ideas on why the sandbox game isn't connecting to my second steam client?