Search found 280 matches

by RNavega
Fri May 31, 2024 1:24 pm
Forum: Support and Development
Topic: Directional collision rules
Replies: 7
Views: 392

Re: Directional collision rules

(To clarify, if the player is closer to that orange horizontal limit instead of the blue vertical limit, then you can consider the collision as vertical, since the player is already pretty close to the infinite vertical extrusion of the enemy, the condition for them to land on top of the enemy. In t...
by RNavega
Fri May 31, 2024 12:57 pm
Forum: General
Topic: Help with calculating trajectory
Replies: 12
Views: 494

Re: Help with calculating trajectory

The double radius ball is in fact what is called the Minkowski addition, in this case of two circles. It's a technique often used to calculate and resolve complex collisions, because it turns the collision between two bodies into the collision between a point and a body. The point turns into a line...
by RNavega
Fri May 31, 2024 12:53 am
Forum: General
Topic: Help with calculating trajectory
Replies: 12
Views: 494

Re: Help with calculating trajectory

Do you think the way I did is going to work? Like im not getting the normal from the ball itself, im getting from a invisible ball that has the double radius of the red ball. Knorke's point that Box2D might cause things to behave in a way that differs from your vector prediction is important. Some ...
by RNavega
Thu May 30, 2024 8:44 pm
Forum: General
Topic: Help with calculating trajectory
Replies: 12
Views: 494

Re: Help with calculating trajectory

See if you can work with ChatGPT for it to explain vector reflection for you. You have the incoming vector and it's being reflected on the normal of a surface (like the surface of a ball, or the surface of the boundaries of the table). To find the reflected vector, you flip the direction of the inco...
by RNavega
Thu May 30, 2024 8:32 pm
Forum: Support and Development
Topic: Directional collision rules
Replies: 7
Views: 392

Re: Directional collision rules

Hi macromint, welcome. I think this can be done from the information that you have in that context, mainly the positions of both rectangles on the current frame when a collision happened and on the frame before that. In these images the player is the red box and the enemy is the white box, and imagi...
by RNavega
Thu May 30, 2024 5:31 pm
Forum: Support and Development
Topic: Why fonts look different on LOVE than on web browser?
Replies: 10
Views: 2850

Re: Why fonts look different on LOVE than on web browser?

Before a definitive solution is found, have you tried using Text objects? They let you define static text, so it should be faster than multiple graphics.print() calls depending on the size of the texts you're trying to print. The two key functions being: https://love2d.org/wiki/love.graphics.newText...
by RNavega
Tue May 28, 2024 1:53 pm
Forum: General
Topic: Noita Lines In Love2D??
Replies: 4
Views: 280

Re: Noita Lines In Love2D??

That's particles. You draw particles that are 1-pixel wide on screen, and animate them in your code by simulating physical forces like "magnetism" etc. so the points converge to the shapes that you're trying to form. The fastest way to draw point particles in LÖVE is with a custom Mesh obj...
by RNavega
Sun May 26, 2024 2:36 pm
Forum: General
Topic: Please can someone help me write a shader/function
Replies: 5
Views: 257

Re: Please can someone help me write a shader/function

By the way, Delaunay is related to Voronoi, you can get it by connecting the centers of neighboring Voronoi cells.
Delaunay-triangulation-solid-lines-and-Voronoi-diagram-dashed-lines-for-20-points.png
Delaunay-triangulation-solid-lines-and-Voronoi-diagram-dashed-lines-for-20-points.png (90.55 KiB) Viewed 201 times
by RNavega
Sun May 26, 2024 2:10 pm
Forum: General
Topic: Please can someone help me write a shader/function
Replies: 5
Views: 257

Re: Please can someone help me write a shader/function

Hi. Try a 2D Delaunay triangulation. 1) Besides the 4 initial points of the image rectangle (its 4 corners), also add a bit of random points on the 4 edges of the rectangle, and a bit of points randomly inside the rectangle. All of these points then are your point cloud. 2) Triangulate the point clo...
by RNavega
Sat May 25, 2024 10:26 am
Forum: General
Topic: [solved] Help with my pool(billiards) game
Replies: 4
Views: 229

Re: Help with my pool(billiards) game

Get the angle between the mouse cursor and the ball with math.atan(mouseY - ballY, mouseX - ballX). The pool cue is 180 degrees (1 pi radians) in the other direction.
temp.png
temp.png (51.67 KiB) Viewed 136 times