Search found 287 matches
- Tue Dec 13, 2022 10:53 pm
- Forum: Support and Development
- Topic: I want to create a swing traps like pendulum in platformer games. But can't code properly?
- Replies: 5
- Views: 1404
Re: I want to create a swing traps like pendulum in platformer games. But can't code properly?
I shouldn't have but it kept me busy coding a bit, something like that? https://love2d.org/imgmirrur/20qHglc.gif If this is the case for collisions you can use Kikito's bump library , but as you also want some "physical" effects you can use love.physics with or a higher level API like wind...
- Tue Dec 13, 2022 4:25 pm
- Forum: Support and Development
- Topic: Best way to render a slanted grid in 2D
- Replies: 1
- Views: 737
Best way to render a slanted grid in 2D
Hello everybody ! I'm trying to find documentation or examples (SDL or LÖVE) on how to display a slanted grid in 2D and if possible animated, something like this: https://miro.medium.com/max/1400/1*pa0Fd21qxlyrLJkfW1MlpA.gif I've tried several ways but can't come up with anything very convincing, I ...
- Sun Dec 11, 2022 2:54 pm
- Forum: Support and Development
- Topic: [Solved] Problem with graphics.getDimensions on Android
- Replies: 3
- Views: 797
Re: Problem with graphics.getDimensions on Android
Call function setMode twice : https://love2d.org/wiki/love.window.setMode love.window.setMode( width, height, flags ) love.window.setMode( width, height, flags ) Don't forget the safe area: https://love2d.org/wiki/love.window.getSafeArea Oh yeeeah, thank you very much for this quick answer, it work...
- Sun Dec 11, 2022 2:34 pm
- Forum: Support and Development
- Topic: [Solved] Problem with graphics.getDimensions on Android
- Replies: 3
- Views: 797
[Solved] Problem with graphics.getDimensions on Android
Hello everyone ! :D I'm facing a small problem with the love.graphics.getDimensions function on Android, I wrote myself a small script to resize the game according to the resolution which roughly looks like this: local lg = love.graphics Display = { size = { w = WIN_W, -- Where WIN_* is the original...
- Fri Nov 25, 2022 1:25 pm
- Forum: Support and Development
- Topic: Combining two polygons into one polygon
- Replies: 7
- Views: 4056
Re: Combining two polygons into one polygon
If it helps I just published a library in pure Lua for boolean operations on polygon taken from another JS library . I just performed all the tests that passed so I can share it, here it is: https://github.com/Bigfoot71/2d-polygon-boolean-lua On the other hand I have not tested what it gives on comp...
- Tue Nov 22, 2022 1:07 pm
- Forum: Support and Development
- Topic: Question about love.math.triangulate and complex polygons
- Replies: 0
- Views: 8380
Question about love.math.triangulate and complex polygons
Hello lovers :D I come to you again because I'm a bit lost with the love.math.triangulate function. If I understood correctly, to be able to triangulate a polygon with this function, the polygon must not be complex (it must not self-intersection). To prevent this I have three functions : local funct...
- Tue Nov 22, 2022 2:14 am
- Forum: Support and Development
- Topic: Cursor position at startup is always [0,0]
- Replies: 12
- Views: 1982
Re: Cursor position at startup is always [0,0]
Yes, in the worst case, tell yourself that this problem should not happen to others if you publish this project
- Mon Nov 21, 2022 9:00 pm
- Forum: Support and Development
- Topic: Physics, forces and dt
- Replies: 7
- Views: 7900
Re: Physics, forces and dt
No there is no need, you can go to this page, it can help you: https://love2d.org/wiki/Tutorial:Physics
- Mon Nov 21, 2022 7:32 pm
- Forum: Support and Development
- Topic: Cursor position at startup is always [0,0]
- Replies: 12
- Views: 1982
Re: Cursor position at startup is always [0,0]
Okay, the 'correction()' function is useless then, for me it prevents the movement of the mouse but for you it doesn't. This movement is due to the height of the window title bar. It takes the absolute position of the mouse and subtracts it from the position of the window to get the correct position...
- Mon Nov 21, 2022 6:55 pm
- Forum: Support and Development
- Topic: Cursor position at startup is always [0,0]
- Replies: 12
- Views: 1982
Re: Cursor position at startup is always [0,0]
Does this thing fix your problem by any chance ?