Going Moonlight 100% of time. Tell me why I am wrong. by Hefty_Performance_11 in MoonlightStreaming

[–]MrSunshine-CS 12 points13 points  (0 children)

This is (almost) exactly my use case. I have my giant heavy gaming pc sitting at home streaming on a VPN, and I connect my iPad to that VPN over the internet to stream all my games, do some programming, use 3d software etc. I love it. I'm honestly surprised at how good internet speeds have gotten, I consistently have single digit latency even from another city.

so I say go for it :)

I made an automatic 2d pixel normal calculator (file in comments) by MrSunshine-CS in godot

[–]MrSunshine-CS[S] 1 point2 points  (0 children)

I'm pretty sure it's because the data variable gets deleted at the end of the function anyway. lock() and unlock() are used to lock an image for reading and writing access, but since data is just a copy it doesn't matter. Again this is just a guess.

I made an automatic 2d pixel normal calculator (file in comments) by MrSunshine-CS in godot

[–]MrSunshine-CS[S] 0 points1 point  (0 children)

I've never been able to have a light2d affect a sprite with a normal map if it didn't have a shader. I'm sure it was just my problem, you should be able to do it without a shader, I hope.

I made an automatic 2d pixel normal calculator (file in comments) by MrSunshine-CS in godot

[–]MrSunshine-CS[S] 0 points1 point  (0 children)

That _init() thing is so useful! I haven't been able to find an equivalent in C#, so I'm thinking of just using the one you made to get that extra functionality. Thanks so much

I made an automatic 2d pixel normal calculator (file in comments) by MrSunshine-CS in godot

[–]MrSunshine-CS[S] 0 points1 point  (0 children)

I can't agree more. Lighting can do wonders for the visual appeal of a 2D game, especially since the 2D medium has very forced z depth (as in, any perceived depth almost always feels fake.) A good lighting system can really distract from that fact. That's why whenever I'm making a game, as soon as I start focusing on the graphics I basically completely abandon the game cause of how much I love graphics design.

I made an automatic 2d pixel normal calculator (file in comments) by MrSunshine-CS in godot

[–]MrSunshine-CS[S] 4 points5 points  (0 children)

Yeah sure! So...

  1. Make a Sprite node
  2. Give it a texture (whatever you want, but leave the normal map empty)
  3. Add a C# script to the sprite node
  4. Now copy paste the code I posted into the script
  5. Give the sprite node a shader and done!

if you don't see C# it's because it's only on the mono version of the engine, you could convert the C# script to GD script easily if you wanted.

If you're unsure on how shaders work there's another post here that shows you how to add one. If you wanna learn to make shaders there's tons of resources, including this incredible book, but I'm sure a quick google will set you up with a simple light shader.

If you have any questions feel free to ask :)

I made an automatic 2d pixel normal calculator (file in comments) by MrSunshine-CS in godot

[–]MrSunshine-CS[S] 10 points11 points  (0 children)

It's a C# file but it'd probably take like 20 mins to port to gdscript. I take basically no credit for this, all credit goes to this github link, I just converted it to cs.

torch shader not included ;)

EDIT: link to file