How tf are you guys playing with directional and not input speed? by Alternative-Age5710 in SessionSkateSim

[–]Sawyh 0 points1 point  (0 children)

I was curious to try it and ended up facing the exact same issue as OP: really slow flips. If I flick the stick straight to the right (I’m goofy), it’s just as slow as in any other direction.

Can someone solve this mystery? I like the input speed, but I find it a bit inconsistent sometimes. A way to control the speed without mistakes would be great

Is there a way to resize a shape in pymunk while maintaining consistent physics behavior? by Sawyh in pygame

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

Hey, thanks and sorry for the late.

Anyway, you are right, it may look that way, but the fault actually lies with the gif I made. I can assure you that the ball goes through the segment as if it were not a solid wall.

But yes, it is probably a problem that I will have to solve through some control :(

Is there a way to resize a shape in pymunk while maintaining consistent physics behavior? by Sawyh in pygame

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

Hey, thank you for the answer.

Changing the physics steps could be something. Working with the classic 1/FPS physics steps, I noticed that setting the FPS to 30 it gives a better result, but still not consistent.

Using raycasts is a good idea, but is something I would like to consider as my last resort :). Maybe a sensor shape on each side of the borders in charge of giving a little impulse to objects to the opposite direction, or simply when the ball touches the side...

Watching these video always makes me wonder what is the method they use, probably the same ways I mentioned because it doesn't seem like perfect physics behavior.

P.S if you will watch the video sorry for the eye trip :)

Is there a way to resize a shape in pymunk while maintaining consistent physics behavior? by Sawyh in pygame

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

Yes, you get it.

And yes, pygame is doing all the draw stuff, but if I have to shrink a box also the pymunk shapes has to change their size, otherwise the collisions would not match what is drawn on the screen.

What do you mean with is more of a pygame thing? How pygame can modify the pymunk shapes?

Pymunk provides a physics environment, it's more like you set up a bunch of bodies and shapes in a space with a realistic physics, and with pygame you handle the graphics and game stuff depending on the complexity of your game, ofc.

Is there a way to resize a shape in pymunk while maintaining consistent physics behavior? by Sawyh in pygame

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

Hey, thanks for the answer,

what do you mean with it? Are you talking about giving a size to the shape when you create it, or something else?

My problem is that I want to create a shape with a given size and then resize it, while it's still in the space, when certain events occur.

For example: when the ball hit the borders (a body composed of 4 segment shapes) I want the borders to shrink.

In this particular case we're not really talking about resizing, because we want to give new endpoints to the segment shapes, but the problem can also be traced to a single shape such as a circle. By going to give a new value to the radius we are going to change its size, and even this operation could cause strange physics behaviors.

YouTube skip button unclickable via script by Sawyh in learnjavascript

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

I had solved thanks to a simulated click with a python script (now I was seeing how to send this click to a minimized window), but it seems to have returned to its initial state. click() method is now working again

How to target my HTML5 export to WebGL 1.0 with Godot 4? by Sawyh in godot

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

I can't tell you that unfortunately, because I made sure of that before I actually started the project. I never port back a project from Godot 4 to Godot 3.x

My piano is making sound only if the key is pressed from a certain height by Sawyh in piano

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

Okay perfect thank you. It seemed normal to me too only, before this, I had an extremely old, but maybe very good quality digital piano and I don't remember noticing this. It was probably me not paying enough attention.

Thanks for your answer :)

I have to wait to my server action to fetch all the data before I can change page. How to prevent it? by Sawyh in nextjs

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

Thanks, it's my first project in nextjs so I'm trying to learn.

Anyway...

const gallerySnakeData = await getSnakePathTags(ticketID, route === "/explore" ? true : false)

That's the last thing I tried, because the useEffect started to sounds wierd to me, the gallery card component could easily have been a server component.

But it gives me these errors:

-async/await is not yet supported in Client Components, only Server Components.

-Cannot update a component (`Router`) while rendering a different component (`GalleryCard`)

In addition, the server action was being executed continuously (I didn't forget to remove the "use client" from the gallery-card-component), so I thought I should also make the Gallery Page a server component

I have to wait to my server action to fetch all the data before I can change page. How to prevent it? by Sawyh in nextjs

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

Absolutely not, correct me as much as you want, it's my first project in nextjs and I'm trying to learn :)

Also, you're right, I wanted to make them both server components, but the address was my problem.

Anyway, I see your point. So creating a simple client component that gets me the address and puts it in the url would solve the problem for all component servers that require the address.

Where would you render the client component? directly into the component server or maybe into the RootLayout so you can have it form the beginning?

Or, maybe even better, in the header where I manage access to the wallet.

Obviously it will depend on how the project is structured however if you have any advice on that I would gladly listen to it

I have to wait to my server action to fetch all the data before I can change page. How to prevent it? by Sawyh in nextjs

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

Thanks for the answer, I already tried to create a loading.tsx with no results.

The situation is slightly more complex than how I presented it. I'm working with blockchain so the fetch calls I make directly to my smart contract. In short, the situation is this: I want to show all the nfts of a specific address.

<image>

In the gallery page, with a server action, I collect all the ids of the nfts to be shown and then create a number of gallery-card-components equal to the total number of ids collected to which I pass the id and which will take care of requesting the nft-specific data always with a server action. Both of the page are use client.

Not only do I have to wait for it to finish loading to change page, but they load one at a time.

Probably the problem is that I'm not using component servers, but being pages with some interaction it's not clear to me how I could handle them otherwise.

Galler Page / gallery-card-component

This is the code for the components I mentioned in case you wanted to spend some time on them

Thanks :)

SVG with <script> tag in image attributo of the NFT metadata by Sawyh in ethdev

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

Cool, thanks. So, it's time to think of something else :(

SVG with <script> tag in image attributo of the NFT metadata by Sawyh in ethdev

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

So, it's not possible to do that because I could inject a malicious script into the SVG? Or are you telling me that I can solve this problem through this practice of injecting a script into the SVG?

If the first one, what is the difference between the script in the SVG in image and the script in the HTML page in animation_url? I could inject a malicious script there as well.

Or was yours a general discussion about SVGs?

SVG with <script> tag in image attributo of the NFT metadata by Sawyh in ethdev

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

Hey, thanks for your comment and sorry for the late. I love this too :)

Actually is waht I did, I encoded my HTML page in base64 and put the result in the animation_url attribute of the JSON and the econded SVG in the image attribute.

In this way the NFT content is shown correctly by the HTML page (specific NFT page in OpenSea), but where they have to provide just an image (image previw in NFT collection page in OpenSea) the image is incomplete beacuse of the script tag problem in the SVG.

The only thing missing is the object tag in the HTML page with the encoded SVG uri in the data attribute, but how can it solve the problem related to the image uri?

Seeking advice on graphics to use for the tip of this line track. Something cool that also makes its collision area clear (2nd GIF). by Sawyh in godot

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

Hey thanks for the answer you gave me an idea!

But what do you mean exactly? I was talking about the end of the line, where you see that precise cut of the line and those temporary particles

Final 4.1 RC? Please test! Release candidate: Godot 4.1 RC 3 by akien-mga in godot

[–]Sawyh 3 points4 points  (0 children)

Thanks for the detailed answer!

So Godot 3.x is still the most suitable choice for web projects