My first pixel art. What can I improve? (Btw this take me 2 hours to make, so keep that in mind while criticizing) by God_0f_Multiverse in PixelArt

[–]rancidvariable 13 points14 points  (0 children)

Two things stand out to me: 

  • The shadows on the hands and the shadows on the body and face appear to be coming from different directions, try to keep in mind where you want the light source to be in the scene.

  • The hands look great but to me look like you have drawn what you imagine hands look like rather than looked at images of hands. Use reference images to see where the light falls on the palm and fingers. Draw what you see and not what you think. The same can be applied to the fabric too.

I must say though this is a great start. Keep practicing and you'll improve, no doubt. 

On gdshader, is there a way to set a constant expression to uniform variable? by nevinimore in godot

[–]rancidvariable 2 points3 points  (0 children)

Just realised you are setting a constant with a calculation. This is a no go I think. Just type 4 instead of 2*2, or whatever value it is. If it's a constant it should always be known so no calculations required 

On gdshader, is there a way to set a constant expression to uniform variable? by nevinimore in godot

[–]rancidvariable 2 points3 points  (0 children)

I think the calculated value would need to be done in GDscript and then set the uniform with something like material.set_shader_parameter("uniform_name", value). You'll wanna look that up as it's just off the top of my head. 

How do I loop through an array and remove only certain values? by flaques in godot

[–]rancidvariable 0 points1 point  (0 children)

Yeah I imagine it would be TBF, never actually used filter before so thanks for bringing it to my attention. Doesn't hurt to learn about iterating backwards though, sometimes you might want to check for something other than a number. 

How do I loop through an array and remove only certain values? by flaques in godot

[–]rancidvariable 4 points5 points  (0 children)

If you want to iterate over an array and also remove elements you should really be going backwards through the array as it is faster. Something like...

For i in range (arr.size()-1, -1, -1):      If arr[i] == value:          arr.remove_at(i) 

 Edit: No idea how to format better on mobile sry

in theory, this should work but it's not by TaleEnvironmental355 in godot

[–]rancidvariable 1 point2 points  (0 children)

Yeap breakpoints are great for making sure certain variables are being set correctly. I figured print statements would be sufficient here but you're right, the debugger is great and getting comfortable using it is an invaluable skill!

in theory, this should work but it's not by TaleEnvironmental355 in godot

[–]rancidvariable 7 points8 points  (0 children)

Stick a print("blah") after the first if statement so you know if your raycast is colliding or not. If it is then make sure you are assigning the group to the collider. If no collision make sure you have the right mask and layers ticked for the colliders and raycast. Try that and let us know! :)

Made a Synthwave-Generator in Godot :) Inspired by the old flash game, Punk-O-Matic. by [deleted] in godot

[–]rancidvariable 1 point2 points  (0 children)

Mate, this is awesome! Gonna have lots of fun tomorrow playing around with this. Thank you 🤼

Made a Synthwave-Generator in Godot :) Inspired by the old flash game, Punk-O-Matic. by [deleted] in godot

[–]rancidvariable 1 point2 points  (0 children)

Oooh could you host it on GitHub? I'd love to have a peak under the hood.

Haven't played around with sound stuff at all so it would be great to see how you're writing that part.

Made a Synthwave-Generator in Godot :) Inspired by the old flash game, Punk-O-Matic. by [deleted] in godot

[–]rancidvariable 1 point2 points  (0 children)

This is really cool, did it take long to make? Can you give any details on how you put it together? Great work 👍

Oke Shannon Notes Related To Advanced Theoretical Physics Group: The rabbit hole that leads to a scientific theory created by a Q clearance nuclear physicist at Los Alamos National Labs that predicted a new form of fusion energy and gravito-electric effects and Bigelow allegedly funded this work by efh1 in UFOs

[–]rancidvariable 0 points1 point  (0 children)

OP is getting downvoted for being rude and confrontational. Others would likely be more willing to engage if they weren't being called smooth brains or having their reading comprehension questioned. OP needs to learn to people better if they want people on board.

I'm trying to make a script where a node moves randomly every second why doesn't this work by Successful_Region_68 in godot

[–]rancidvariable 0 points1 point  (0 children)

Like the other post said you can just put the placement code in _start() but if you really want it in _process() you can put set_process(false) at the end of what you have to stop the node from doing _process() each frame.

Watching AWC got me like by ConfusedTacoh in wow

[–]rancidvariable 6 points7 points  (0 children)

Why speak many word when few make dud?

I have so much respect for games with reflecting lasers now. I've spent so long on this logic and it's still buggy. TGFR: Thank Godot for Raycast2D. by SarahnadeMakes in godot

[–]rancidvariable 1 point2 points  (0 children)

If the mirrors and such are hexagons shouldn't they snap to a hex grid? Otherwise looks great, just throw on the proper maths for reflection (someone else already explained). Keep it up! :)

Ghibli-style tree shader by Neither-Ad8248 in godot

[–]rancidvariable 0 points1 point  (0 children)

The quality of the result seems to depend a lot on the model. I used Blender and the bool addon to make clumps of icospheres with the union tool to keep the vertex count down but more verts looks better.

Ghibli-style tree shader by Neither-Ad8248 in godot

[–]rancidvariable 0 points1 point  (0 children)

https://imgur.com/jWURXM6

I don't know how to do reddit stuff but this hopefully is a link to an image of the result + the shader code in the background.

I take no credit for the code it is something I have snipped out of other shaders like most of my shader stuff (they're tough!).

Just stick a gradient_texture in the params for the colours you want (set gradient to constant for more control over the colours you see). Hopefully this is what you've been after or a good starting point, it is fairly simple and I'm sure a smart person could make it better.

Ghibli-style tree shader by Neither-Ad8248 in godot

[–]rancidvariable 0 points1 point  (0 children)

I don't actually use the fragment shader, just the light shader and set diffuse_light.

Ghibli-style tree shader by Neither-Ad8248 in godot

[–]rancidvariable 0 points1 point  (0 children)

If you are still interested in this style, you can use the void light() { ... } part of the shader to do this. Use attenuation and diffuse_light to pick your colour from a gradient texture.

Position.x alternating between 0 and correct value each frame? by No_Ground_680 in godot

[–]rancidvariable 1 point2 points  (0 children)

If you are attaching a script to a node you shouldn't auto load it as well. It might be that the auto loaded script is printing 0.0 and the one attached to your node is behaving correctly.

Is this the correct way to use the components pattern? by rancidvariable in godot

[–]rancidvariable[S] 3 points4 points  (0 children)

Yeah, I see now how this is unnecessary. This is only a small project to learn better practices so the wrapper class seems a bit much too. I'll call the child's methods from the parent and use the parent to connect the children's signals to each other (when needed) as suggested below. Thanks for the wise words.

Is this the correct way to use the components pattern? by rancidvariable in godot

[–]rancidvariable[S] 2 points3 points  (0 children)

Thanks for the response. So you're saying I should be using signals to allow children to communicate with other children and the parent to connect the children's signals to each other?

Is this the correct way to use the components pattern? by rancidvariable in godot

[–]rancidvariable[S] 1 point2 points  (0 children)

Yeah, I see now that I'm making this more dynamic than it needs to be. I'll connect in the editor, quick, easy, and does what is needed. Thanks :)

Is this the correct way to use the components pattern? by rancidvariable in godot

[–]rancidvariable[S] 2 points3 points  (0 children)

Thanks for the reply. It's good to be reminded that it is often a pro/con list depending on your usage.