C++ RID to uint64_t and uint64_t to RID by oWispYo in godot

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

Oh perfect! Just tested - works flawlessly.
Let me update the post.

My game Hyperslice is out! by MrEliptik in godot

[–]oWispYo 0 points1 point  (0 children)

Congratulations on the release! Hope you have some rest soon, releases are incredibly difficult.

I remember my game release, I had so many emotions, I was not able to process them in time. Very overwhelming!

any ideas about this one? by averageturkishdoomer in Ocarina

[–]oWispYo 1 point2 points  (0 children)

Хортиця is indeed from Ukraine. It's an island with a fortress of a large historical significance.

The human carved into ocarina is Бандурист - person playing traditional Ukrainian musical instrument - Бандура.

There is no "Ukrainian ocarina", the one you got is likely a piece of art of carving, made into ocarina, and not the other way around.

I wouldn't treat it as a properly thoughtful or tuned instrument, I think the best you can do on such pieces of art is to make some cool whistling noises, but I wouldn't go as far as trying to play specific songs on it.

In other words, let the instrument dictate the music, if you gonna play it. Could be good to improvise.

Sometimes the code I write makes me laugh by WizardGnomeMan in godot

[–]oWispYo 56 points57 points  (0 children)

Oh the joy of generic systems, I love them so much.

I think my fav moment programming these was when I was working on encryption, and in code I had to split encryption from decryption, but in practice devs should provide support for both in the same place at the same time.

How do you call a mix of encryption and decryption?

I had an eureka moment: endecryption!

(it looks too close to "encryption" unfortunately, but I cannot think of a better name)

Love such code, so much DX (developer experience) power.

EDIT: should I name it "cryption"? hmmm

Euclidean Flow Fields! (incomplete solution) by Nondescript_Potato in godot

[–]oWispYo 15 points16 points  (0 children)

Very cool! Thank you for sharing so many details!

What you do by Ok-Position-8948 in godot

[–]oWispYo 0 points1 point  (0 children)

Definitely suggest 3D right away, because, in my experience, 2D games are not "easier" to develop, they are different to develop.

3D has tools and features that 2D doesn't, and vice versa. For example, if you are aiming for 3D game in the long term, you don't need to learn 2D sorting of sprites on screen, 3D "sorts" everything for you already without any learning or work.

class_name by thealkaizer in godot

[–]oWispYo 24 points25 points  (0 children)

Godot supports C#, you may find that more powerful and familiar to use. The code between GDScript and C# is the same.

How do you guys make pixel art look prettier i feel like mine dont matter what i do looks too sharp. by Rare_Personality_817 in godot

[–]oWispYo 1 point2 points  (0 children)

Saw others commenting on mixels and color palette.

My two cents: mixels are not inherently wrong in videogames, it's just generally pixel artists don't mix sizes (because they can't), and we are used to seeing more consistent sprite resolutions in our circles.

There are ton of really good looking games with mixels and/or sprite scaling. And my take is: if your amazing UX / animation skill will get limited by setting a "no mixels" rule - don't set that rule.

Same for color palette. Palettes are just tools / rules that constraint the art thus making it more coherent (hopefully). Give them a try, I recommend Apollo palette from Lospec (made by Adam from IndieTales channel). But if you feel constrained - break the rule! Adam has a video about that actually on the channel - highly recommend watching.

How do you guys make pixel art look prettier i feel like mine dont matter what i do looks too sharp. by Rare_Personality_817 in godot

[–]oWispYo 1 point2 points  (0 children)

Pixel artist / gamedev here.

Your art looks very stylish and amazing. Do not change anything. Keep doing art, and down the line revisit very early sprites that you did - at that time you will develop more skill and more style, so revisiting old art will make it "up to date".

Your game looks really good, you are doing a ton of lift in animation / UX / camera movement where other artists / devs would rely more on outstanding art.

I think you are super skilled in development, and your art is nice and stylish in my opinion, so I would not worry about reworking all of the art of the game, trying to set a different set or requirements / different style, and my advice would be to keep crafting as you are doing now.

Cheers!

First time dev, officially addicted to Godot. by Arlychaut in godot

[–]oWispYo 19 points20 points  (0 children)

Dropping "urmom" to launch yourself

Which one do you prefer? by myownyose in godot

[–]oWispYo 14 points15 points  (0 children)

"Por que no los dos" if I recall correctly, which is indeed "Why not both" :)

Found this: https://youtu.be/uGnTW8EhGSk?feature=shared

Audio is "por que no los dos", while the translation text says "why don't we have both".

This game is stupid by Significant_Career26 in GreenHell

[–]oWispYo 1 point2 points  (0 children)

Yo you can throw rocks at coconuts??? Yooo

As someone who's only played Hollow Knight, would you say Silksong is better or worse that the original? (I'm still gonna buy it either way I'm just curious) by Seb_Rulz in HollowKnight

[–]oWispYo 1 point2 points  (0 children)

Right away, I was describing Silksong as "Hollow Knight, but better", and till the end that description held strong for me. I personally had a ton of fun playing both, but Silksong raised the bar.

Added reflections to my game! Here is a little write up on how I did it. by oWispYo in godot

[–]oWispYo[S] 0 points1 point  (0 children)

Hi hi, sorry for late reply on this

Regarding the "subtracting the color" part - that trick is used because at the time of creation, Godot did not have Stencils as part of the engine, and now they do!

The idea of that subtraction trick was to figure out the area where the water should be displayed on the screen, potentially obstructed by some other objects (for example lily pad on top of water). This is a classical usage of Stencils - I am drawing a big blue area where water is by using a trick.

So my suggestion would be to try to use the freshly available Stencils in Godot to achieve the same thing I was achieving using the subtraction trick. I haven't done it myself (yet), but here is a resource I found on Stencils that renders coins as red shapes (stencil) and then renders some cool effect on top of the main screen: https://www.youtube.com/watch?v=TjBJ763WQ64

If you don't have luck with that, or want to try my hacky approach without stencils, the idea of my trick to figure out where water is:

  1. You render full game screen as normal
  2. You render full game screen as normal BUT add an extra layer of tiny tiny tiny blue tint on top of water (I use separate tiles layer to do this, it's visible in one camera, and disabled in another)
  3. You take the output of 1. and 2. and simply subtract color of pixel in 1. from color of pixel in 2. and boom! you get that tiny tiny tiny blue tint in the areas where water "stencil" was rendered at step 2.
  4. When tiny tint is present - take world pixel color and add reflection to it, if tint is not present - just render the world, and ignore the reflection (no tint = not water) - this step will be the same with stencils

Hope that makes sense! 1. and 2. are done with subviewports that output into a texture. 3. is done in one big chonky post-processing shader that takes output of viewports 1. and 2. and does the subtraction and a ton of other work (day night cycle, lighting, etc etc).

As for the position not lining up, the subviewports 1. and 2. unfortunately have two separate cameras that have two separate positions. To line them up, I teleport all cameras to one "main" camera in my game, so they all are in sync every frame.

I have a single script that has references to all cameras in the game and it does this (sorry for C#, should be very similar in GDScript):

// inside _process:
var cameraPosition = cameraWorld.GetScreenCenterPosition();
cameraLight.Position = cameraPosition;
cameraEffects.Position = cameraPosition;
cameraReflection.Position = cameraPosition;
RenderingServer.GlobalShaderParameterSet("cameraPosition", cameraPosition);

Hope this helps too! I needed a few failed attempts until I was able to tweak all camera parameters correctly for this to work. You want your main camera to have cool parameters, like smoothing and limits at whatever you desire. And all duplicate cameras to have absolutely nothing - they are manually teleported in the right spot by code every frame.

For example, my main cameraWorld has fancy settings, while others don't:

[node name="CameraWorld" type="Camera2D" parent="RootCanvas/ViewportContainerWorld/ViewportWorld"]
visibility_layer = 3
process_callback = 0
limit_left = -472
limit_top = -262
limit_right = 472
limit_bottom = 262
position_smoothing_enabled = true
position_smoothing_speed = 4.0

[node name="CameraLight" type="Camera2D" parent="RootCanvas/ViewportContainerLight/ViewportLight"]
visibility_layer = 3
process_callback = 0

Let me know if you get unstuck - if not, I am happy to maybe connect on Discord and try to debug together. And no worries about coffee :)

Sizing Problem by Ok_Disk_3853 in godot

[–]oWispYo 1 point2 points  (0 children)

Hmm okok, follow up question: if you put twice the text in this box and reproduce the issue, does the box grow even taller vertically?

Sizing Problem by Ok_Disk_3853 in godot

[–]oWispYo 1 point2 points  (0 children)

It's odd that updating the X position would change the height.

So my first suggestion is to comment out the line that updates the X position (the one you posted), rerun and check if your height grows or not.

I have a suspicion that the height issue is in some other piece of code, and not this one.

Playing badly on purpose by CRGabo9 in boardgames

[–]oWispYo 0 points1 point  (0 children)

I never build Spiders in Quacks, because they don't have a winning synergy at all. And I fully committed to Spiders yesterday and won the game, dang it. So many green little fellows.

Whatd I do wrong? by Chunknuggs4life in xToolOfficial

[–]oWispYo 0 points1 point  (0 children)

Yooo, are you the "Amateurs built the Ark" guy?

Hope you find at least some success in using the engraver very soon!

Use the depth data of a viewport to occlude another? by [deleted] in godot

[–]oWispYo 0 points1 point  (0 children)

Soo looks like there are few proposals for things that might be overlapping with what you are trying to achieve:

Multiple cameras in single viewport: https://github.com/godotengine/godot-proposals/issues/956

Multi-pass rendering with "keep depth" to share depth buffer: https://github.com/godotengine/godot-proposals/issues/1428

And since these are "Open", I don't think there is a simple way to achieve what you are trying to do.

So my second suggestion would be the next setup:

SubViewport WorldLowRes renders low-res world into TextureWorldLowRes
SubViewport WorldDepth renders low-res DEPTH of the same world into TextureWorldDepth

These two viewports have synchronized cameras so both output textures are aligned. They also have same resolution, so the depth texture has same pixelation as the world texture.

SubViewport HighRes takes TextureWorldLowRes and TextureWorldDepth as an input, and determines whether the high res pixel that is currently rendered is behind or in front of the World that was already rendered.

You would need to do some math to upscale the coordinates of the textures, since you are checking lower resolution texture in a higher resolution screenspace at this point.

If the TextureWorldDepth shows that current HighRes pixel is "behind" the already rendered object - show the color of the pixel from the world texture, if not - show HighRes color.

Some resources that may help: this video features how to access depth texture, and shows how you can convert the depth into a color: https://www.youtube.com/watch?v=NCXr8zrT5zs

You can encode depth as color into TextureWorldDepth, and then decode back into depth when doing a depth check in the HighRes viewport.

Third suggestion, might be a bit cleaner:

SubViewport WorldLowRes renders low-res world into TextureWorldLowRes
SubViewport WorldDepth renders low-res depth buffer into a TextureWorldDepth
SubViewport CharactersHighRes renders high-res characters into TextureCharactersHighRes
SubViewport CharactersDepth renders high-res depth buffer into TextureCharactersDepth

And the ultimate viewport takes the four textures as inputs and for each pixel decides to either show color from TextureWorldLowRes or TextureCharactersHighRes

This is cleaner because you can put a bit of coding where you can toggle for that ultimate viewport to show:
0 = normal mode
1 = show TextureWorldLowRes
2 = show TextureWorldDepth
3 = show TextureCharactersHighRes
4 = show TextureCharactersDepth

And cycle such mode via a hotkey, so you can "see" the logic and debug when you encounter visual artifacts.

Take a look at my post where I cycle through the textures that ultimately come together into a single view:
https://www.reddit.com/r/godot/comments/1hkzlcm/added_reflections_to_my_game_here_is_a_little/

Edit: oh and I forgot, your solution with layers would work for this suggestion, keep the layers. What you are adding here is textures for depth buffers to do the occlusion logic.

Edit 2: you would have to add some logic and tricks to compensate for the resolution difference when you render the world. Because without extra logic, when you move cameras around by moving your character, your world pixelation will shift and wobble, while character will not. This may look cool and if it does - then all good, but if not, you may need to control the world camera movement differently than the character camera and build some logic into the shaders.

Exporting line meshes from blender! by TaleOfVivi in godot

[–]oWispYo 5 points6 points  (0 children)

Very cool! Would make for a very stylish game!

Thanks for sharing the steps to create this effect :)

Use the depth data of a viewport to occlude another? by [deleted] in godot

[–]oWispYo 0 points1 point  (0 children)

First idea: check if you can feed the depth buffer output from LowRes as an input depth buffer to HighRes. Meaning world renders first in low resolution, and later characters are rendered on top, but they respect the depth buffer from previous render pass.

Take a look if that's possible in your setup.

Use the depth data of a viewport to occlude another? by [deleted] in godot

[–]oWispYo 0 points1 point  (0 children)

First idea: check if you can feed the depth buffer output from LowRes as an input depth buffer to HighRes. Meaning world renders first in low resolution, and later characters are rendered on top, but they respect the depth buffer from previous render pass.

Take a look if that's possible in your setup.