What do you mean by this?
Thanks, this helped a ton. So it seems to be working much better now. Will it effect physical hitboxes? so the player will treat it like a full block?
Nvm, I figured it out. I wanted the light to remove the darkness so you can see in areas, but hidden areas would be blacked out until within view. But I think I got it working.
Well, everythings kinda bugged at the moment. The player has a circle around him and hardly any rays stop at the walls. Iām still trying to fix this, not sure whatās going on. I can send a link if you want to take a look at it.
A link would be helpful. Having a small circle around the player means itās hitting something because I added in a NOR gate so that when the rays hit nothing they expand a lot.
Parent objects donāt effect hitboxes. Make sure the parent object you are using doesnāt have any code, because the child will gain the code that is in the parent.
I made sure I made a new wall object so they all share it.
Itās on the fifth level, Shadow Testing.
Not sure if you want to edit your post now so other people canāt see the link to the game
So I finally have it working. But I want it to look more cleaner since itās really choppy. Not sure how I could fix that, but the general idea works now.
You need to move the Line sprite 1 pixel to the Left, this is very important, and then the Animation needs to be exactly where it is. Also to prevent the light from sometimes going through the wall you can add a Position behavior in the wall and that will prevent the Walls from combining collisions
You also canāt see the Line with Blend set to 1 because it is black, if you had the line as a different color it would work
Alright. Iām currently in school so I havenāt had time to reply sooner. Iāll work on it some more when I get home.
kk, if you need help with anything else feel free to ask.
Btw, it seems like youāre running a lot of expressions. It seems like they are only needed at the start of the game to set things up, so after everything is done those objects should be destroyed so they no longer run those expressions. (expressions take up ~10ms)
A ton of the code is used for the actual game. I took the character from the game on a new level so a lot of the expressions donāt apply on that testing level, but work on the game.
And yes, thereās a ton of code that needs to turn off after a certain period for performance, but Iāll get to that later on.
The horizontal wall tops are pretty thin and the end of each raycast stops a little short on it, causing jagged gaps around the edge of the walls.
Is there any solution to removing those? Or is it not possible for the thin walls.
Nothing can really be done about it unless ray casts outputted the correct distance. Technically you could change the expression in the line to be āA*52ā and it fixes it, but I donāt know if that could cause other problems.
If this idea doesnāt work you could still use it for something like a flashlight
Is the light supposed to be there?
No, but it canāt be stopped because rays output distance to the center
Sadly i donāt think I would be able to use this feature, mostly because it slows down performance really bad and with a lot of objects to deal with, the rays sometimes go through and I tried fixing everything to make sure it looked clean, but thereās still a lot of bugs to deal with.
Iām gonna keep the testing level up, but I donāt think Iāll be able to add it to the final game.
Understandable, good luck with the rest of your game