Search found 16 matches

by oscaradalid
Wed Aug 28, 2024 5:25 pm
Forum: General
Topic: Any way to make the slopes system more efficient?
Replies: 4
Views: 12298

Re: Any way to make the slopes system more efficient?

Gracias!!! ya he programado lo que pretendia,ahora a pulir codigo,hacerlo mas reducido y evitar unos pequeños problemas ,pero la parte complicada ya la tengo ..una forma de hacer un juego de plataformas facil XD. teclas : left right space -- Inicialización de variables point = {x = 300, y = 100, spe...
by oscaradalid
Wed Aug 28, 2024 6:11 am
Forum: General
Topic: Any way to make the slopes system more efficient?
Replies: 4
Views: 12298

Re: Any way to make the slopes system more efficient?

Thank you for the answers, I am trying to apply a simple and efficient system. I am now attempting to implement what darkfrei has suggested. If I find the solution I publish it to share it.
by oscaradalid
Mon Aug 26, 2024 7:00 pm
Forum: General
Topic: Any way to make the slopes system more efficient?
Replies: 4
Views: 12298

Any way to make the slopes system more efficient?

-- Variables para los polígonos local polygons = { -- Primer polígono { {200, 400}, {200, 250}, {560, 250}, {650, 400} }, -- Segundo polígono (un triángulo) { {0, 400}, {200, 250}, {400, 500} } } local playerDirection = 1 -- Inicialmente se mueve hacia la derecha local playerVerticalDirection = 0 -...
by oscaradalid
Mon Jul 22, 2024 4:42 pm
Forum: General
Topic: fading trail effect
Replies: 6
Views: 7251

fading trail effect

I'm trying to make this "fading trail effect".. I draw a rectangle and in each frame, I create another rectangle in the previous position with a lower opacity. I do so continuously and each time I diminish somewhat the opacity of the "rectangles created children". My question is:...
by oscaradalid
Thu Jun 13, 2024 9:54 am
Forum: General
Topic: Zerobrane to scan or collapse the functions
Replies: 0
Views: 6845

Zerobrane to scan or collapse the functions

Good morning Someone can provide me with a code that allows Zerobrane to scan or collapse the functions when I press a certain key. I find it quite useful, but I can't do it. local function hasBit(x, p) return x % (p + p) >= p end package { onEditorKeyDown = function(self, editor, event) local keyCo...
by oscaradalid
Mon Jan 01, 2024 12:36 pm
Forum: General
Topic: the graphics disappear ??
Replies: 0
Views: 83640

the graphics disappear ??

Why do I move the Love2D window and the graphics disappear ? -- Lista para almacenar los planetas planetas = {} local speed = 100 local planeta_creado = 0 resolucion_x = 640 resolucion_y = 480 function love.load() -- Configurar la ventana love.window.setTitle("Planetas Móviles Aleatorios")...
by oscaradalid
Sun Dec 24, 2023 1:51 am
Forum: General
Topic: How to avoid distortion of the ball?When it moves, it deforms.
Replies: 1
Views: 3495

How to avoid distortion of the ball?When it moves, it deforms.

How to avoid distortion of the ball?When it moves, it deforms. local ball_x, ball_y, x_speed, y_speed, ball_size local canvas, escala function love.load() -- Inicializa las variables de la pelota ball_x = 64 x_speed = 0.1 ball_y = 64 y_speed = 0.1 ball_size = 6 -- Tamaño del lienzo local canvasSize ...
by oscaradalid
Sun Dec 10, 2023 9:13 pm
Forum: General
Topic: Transfer one buffered image to another.
Replies: 5
Views: 18908

Re: Transfer one buffered image to another.

I'm doing tests on how to assemble my scroll engine, maybe someone will use this piece of code that has cost me all afternoon to get it out, it's not my thing to program.Put two 800x300 background1 and background2 images in the root carpant and then two 16x16 images local fondo1 local fondo2 local f...
by oscaradalid
Sun Dec 10, 2023 10:44 am
Forum: General
Topic: Transfer one buffered image to another.
Replies: 5
Views: 18908

Transfer one buffered image to another.

Good morning, I have made this code, what I do is transfer the tile image to the background using the buffer, the problem is that I find it still quite slow. I have done it in javascript, without external libraries and it is much better applying this technique. How can I optimize the code to gain mo...
by oscaradalid
Tue Dec 07, 2021 5:02 pm
Forum: Support and Development
Topic: help imagedate:getPixel for love 11.3
Replies: 8
Views: 7788

Re: help imagedate:getPixel for love 11.3

Thank you very much for the example code, it is really good to understand the mechanics in love2d.