Search found 18 matches
- Wed Feb 19, 2025 10:28 pm
- Forum: Support and Development
- Topic: How to make a collision with a rotated map and with a shader?
- Replies: 1
- Views: 1582
How to make a collision with a rotated map and with a shader?
Hello, how do you manage to make a collision with the rotated map? I have tried it in many ways, but the collision always does not do it well, if I load the image, a red map detects the collision well, the problem is when I try to rotate the map. local collisionMap = love.graphics.newImage("gra...
- Thu Jan 30, 2025 5:53 pm
- Forum: General
- Topic: How to make a cyclical scroll with multiple canvases?
- Replies: 2
- Views: 2221
How to make a cyclical scroll with multiple canvases?
muestra.love local SpriteSheet = require("lib/sprite_sheet") local Mapa = require("lib/juego_mapa2") local configuracion = require("lib/configuracion") local resolucion_x, resolucion_y = 320, 240 local escalado = 3 local tile_size = 16 local ancho_canvas = 80 local alt...
- Wed Aug 28, 2024 5:25 pm
- Forum: General
- Topic: Any way to make the slopes system more efficient?
- Replies: 4
- Views: 12568
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...
- Wed Aug 28, 2024 6:11 am
- Forum: General
- Topic: Any way to make the slopes system more efficient?
- Replies: 4
- Views: 12568
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.
- Mon Aug 26, 2024 7:00 pm
- Forum: General
- Topic: Any way to make the slopes system more efficient?
- Replies: 4
- Views: 12568
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 -...
- Mon Jul 22, 2024 4:42 pm
- Forum: General
- Topic: fading trail effect
- Replies: 6
- Views: 7880
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:...
- Thu Jun 13, 2024 9:54 am
- Forum: General
- Topic: Zerobrane to scan or collapse the functions
- Replies: 0
- Views: 7834
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...
- Mon Jan 01, 2024 12:36 pm
- Forum: General
- Topic: the graphics disappear ??
- Replies: 0
- Views: 83812
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")...
- 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: 3568
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 ...
- Sun Dec 10, 2023 9:13 pm
- Forum: General
- Topic: Transfer one buffered image to another.
- Replies: 5
- Views: 19099
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...