Search found 131 matches
- Sat Jan 07, 2023 9:27 am
- Forum: Support and Development
- Topic: Convert tiles to rectangles
- Replies: 8
- Views: 3167
Re: Convert tiles to rectangles
Maybe it will be enough to just group tiles horizontally then group remaining tiles vertically =) ------ But if you want ultimate minimum of rectangles then I can think of some king of genetic algorithm: For each tile assign random boolean: will it be grouped vertically or horizontally. Shuffle tile...
- Sat Jan 07, 2023 8:55 am
- Forum: Support and Development
- Topic: [Solved] Need help on a raycasting light shader
- Replies: 20
- Views: 3714
Re: Need help on a raycasting light shader
About raycasting shader performance: in this simple algorithm ray path have even, small steps. This is inefficient, but can help understand the basics. More suitable approach will be to use adaptive ray steps to minimize steps count. I can think of 2 different methods to do this: 1) raytracing and 2...
- Fri Jan 06, 2023 7:42 pm
- Forum: Support and Development
- Topic: Fullscreen Resolution incorrect when using windows scaling
- Replies: 4
- Views: 1436
Re: Fullscreen Resolution incorrect when using windows scaling
I was worried about that problem five years ago: https://love2d.org/forums/viewtopic.php?p=217166#p217166 Since then I live with scary bat file with something like that: REG ADD "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V "O:\my_love_lives_here\win64\l...
- Fri Jan 06, 2023 7:15 pm
- Forum: Support and Development
- Topic: [Solved] Need help on a raycasting light shader
- Replies: 20
- Views: 3714
Re: Need help on a raycasting light shader
Hi! Happy new year :3 There is just the shader, full example in the attachment: extern float light_radius; extern vec2 light_pos; extern float ambient; extern vec2 size; extern float wall_height; extern Image collision_mask; vec4 effect(vec4 color, Image texture, vec2 texture_coords, vec2 screen_coo...
- Sat Dec 10, 2022 10:05 am
- Forum: Support and Development
- Topic: [Solved] Max number of simultaneously active canvases
- Replies: 2
- Views: 778
Re: [Solved] Max number of simultaneously active canvases
Nice!
Thank you, exactly what I needed![Awww :3](./images/smilies/ms-three.png)
So, [Solved].
Thank you, exactly what I needed
![Awww :3](./images/smilies/ms-three.png)
So, [Solved].
- Sat Dec 10, 2022 5:09 am
- Forum: Support and Development
- Topic: [Solved] Max number of simultaneously active canvases
- Replies: 2
- Views: 778
[Solved] Max number of simultaneously active canvases
Good day :3 Since love 0.9.0 there is a way to use multiple canvases. As wiki says here love.graphics.setCanvas : If love.graphics.isSupported("multicanvas") returns true, at least 4 simultaneously active canvases are supported. Personally I used up to 3 canvases in several projects and it...
- Sun Aug 23, 2020 12:17 am
- Forum: Support and Development
- Topic: Memory Profiling?
- Replies: 30
- Views: 23923
Re: Memory Profiling?
Looks really as difficult example =)
I used some existing library https://github.com/rxi/json.lua
But if I will need to parse something on my own in Lua, I will remember your advise![Cool :cool:](./images/smilies/ms-sunglass.png)
I used some existing library https://github.com/rxi/json.lua
But if I will need to parse something on my own in Lua, I will remember your advise
![Cool :cool:](./images/smilies/ms-sunglass.png)
- Sat Aug 22, 2020 11:59 pm
- Forum: Support and Development
- Topic: Where to start?
- Replies: 3
- Views: 3003
Re: Where to start?
Hello & Welcome! Here is article about how to write hello world on Love https://love2d.org/wiki/Getting_Started Here is youtube examples https://www.youtube.com/watch?v=Zw3sbpYIh1Q https://www.youtube.com/watch?v=yrIwFflGeyA or just search Love2d on youtube... About JS: Love2d uses Lua programmi...
- Sat Aug 22, 2020 11:44 pm
- Forum: Support and Development
- Topic: Performance and quantity of classes
- Replies: 4
- Views: 4159
Re: Performance and quantity of classes
By the given info I suggest that problem is inside "inheritance" mechanism. Lua does not have embedded one, and there is some different technics to implement that. Can you share code about how you implement inheritance? Maybe it contains some copying, maybe it happens every frame by some m...
- Sat Aug 22, 2020 11:26 pm
- Forum: Support and Development
- Topic: Make my own particle system
- Replies: 3
- Views: 6452
Re: Make my own particle system
Easy way: use existing particle system along with https://love2d.org/wiki/love.graphics.translate that way you can move all particles at once when player press "a" button and particles need to be moved all at once. Laggy way: do not use any particles or batches or instances, just plain dr...