Search found 11 matches

by oscaradalid
Mon Jan 01, 2024 12:36 pm
Forum: General
Topic: the graphics disappear ??
Replies: 0
Views: 66104

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: 2295

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: 12352

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: 12352

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: 6299

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.
by oscaradalid
Mon Dec 06, 2021 11:02 am
Forum: Support and Development
Topic: help imagedate:getPixel for love 11.3
Replies: 8
Views: 6299

Re: help imagedate:getPixel for love 11.3

True, I want to do multiple get _pixel of a map. One way would be to save the map in an array and manipulate it from there, but I have no idea how to do it in this language. I'm learning lua and I want to pass this illustrative example from pico to love2d. .. cls(7) -- seed the agar for start=0,25,1...
by oscaradalid
Sun Dec 05, 2021 10:09 pm
Forum: Support and Development
Topic: help imagedate:getPixel for love 11.3
Replies: 8
Views: 6299

help imagedate:getPixel for love 11.3

Sorry for my bad English. I'm trying to learn love2d and I don't know how to get a pixel from a map or canvas. if I run the example that comes with love2d from imageDate by default: getPixel shows this error. main.lua: 40 attempt to index global canvas (a nill value). I have searched the internet an...
by oscaradalid
Mon May 21, 2018 5:16 pm
Forum: Support and Development
Topic: Ayuda,dibujar primitivas pegadas en un mapa,capa.
Replies: 5
Views: 5287

Re: Ayuda,dibujar primitivas pegadas en un mapa,capa.

Hola, gracias por el ejemplo, El mirado de intentar que las líneas que se dibujan en el lienzo cuando se interseccionan vaya sumando o incrementando su opacidad hasta tener alfa=1 y de ese modo volverse completamente blanco, opaco, pero no lo consigo. Se agregó dos cuadrados que se interseccionan y ...
by oscaradalid
Sun May 20, 2018 6:40 pm
Forum: Support and Development
Topic: Ayuda,dibujar primitivas pegadas en un mapa,capa.
Replies: 5
Views: 5287

Re: Ayuda,dibujar primitivas pegadas en un mapa,capa.

Thanks, but how do you draw the graphic primitives then without using love.draw ()? what I want is to draw them on a map, in other programs it would be a type of function called map_put_draw_line (FILE, x0, y0, x1, y0) ... I understand how the system works, each frame erases the screen and paints ag...
by oscaradalid
Sun May 20, 2018 4:08 pm
Forum: Support and Development
Topic: Ayuda,dibujar primitivas pegadas en un mapa,capa.
Replies: 5
Views: 5287

Ayuda,dibujar primitivas pegadas en un mapa,capa.

Antes de nada disculpad por expresarme en español,pues el ingles no es mi lengua materna y estoy aprendiendo love,aunque hay una serie de conceptos básicos que no logro de comprender,pues he programado en otro lenguaje y difiere su mecánica. 1.¿ Cómo puedo dibujar líneas en un mapa o capa que he cre...