Search found 287 matches
- Tue May 09, 2023 10:59 pm
- Forum: Support and Development
- Topic: How can I make a ball bounce when it collisions
- Replies: 4
- Views: 2488
Re: How can I make a ball bounce when it collisions
For a random direction you can do (only for diagonal moves): vx = math.random() < 0 and -1 or 1 vy = math.random() < 0 and -1 or 1 Or for an entirely random direction you could also do something like this local a = math.random() * (math.pi*2) local vx = math.cos(a) local vy = math.sin(a) If you opt ...
- Thu May 04, 2023 9:56 am
- Forum: Support and Development
- Topic: Love too many
- Replies: 3
- Views: 2639
Re: Love too many
Regarding the number I did a little research in the code of love and I came across this, I don't know if really revealing:
https://github.com/love2d/love/blob/c8e ... ge.cpp#L66
https://github.com/love2d/love/blob/c8e ... ge.cpp#L66
- Wed May 03, 2023 10:39 am
- Forum: Support and Development
- Topic: Touchpad support
- Replies: 5
- Views: 2487
Re: Touchpad support
As BrotSagtMist said it is the mouse driver or the generic one of the operating system which takes care of this kind of thing and which returns for example the information of the two fingers as being the movement of the wheel. You might see love.wheelmoved to try to tinker with something. Alternativ...
- Fri Apr 28, 2023 10:52 am
- Forum: Support and Development
- Topic: android build from source
- Replies: 3
- Views: 2650
Re: android build from source
Now you don't need to modify the manifests and graddle files to change the version, package names and application name, everything happens in the gradle.properties. For the sdk target you can modify it in `app/build.graddle` but only do it if you know why, otherwise you don't need to do it. For your...
- Thu Apr 27, 2023 12:26 am
- Forum: Support and Development
- Topic: Can I add c/c++ or possibly c# to my love2d game?
- Replies: 6
- Views: 3093
Re: Can I add c/c++ or possibly c# to my love2d game?
For C# there is love2DCS but it doesn't seem to be maintained since 2020, and for C there is FFI, it can be useful for critical tasks and with JIT of course otherwise it's extremely slow. I'd be shocked if lua on luajit doesn't run as fast as compiled c#. The last time I benchmarked luajit against c...
- Thu Apr 20, 2023 3:58 pm
- Forum: General
- Topic: imgur is removing "old, unused and inactive" content
- Replies: 3
- Views: 10554
Re: imgur is removing "old, unused and inactive" content
And to think that I bothered to upload everywhere else to avoid overloading the server with all kinds of gifs, if it's an open bar after all, I feel a bit silly
- Thu Apr 20, 2023 3:27 pm
- Forum: Support and Development
- Topic: How can i draw a line in this [SOLVED]
- Replies: 3
- Views: 2334
Re: How can i draw a line in this
You can display a line with love.graphics.line For the line in the direction the square is going you can do like this: local cx, cy = game.x+20, game.y+20 -- square center love.graphics.line(cx, cy, cx+game.vx*20, cy+game.vy*20) If you want the segment to end exactly where the square will hit the ed...
- Wed Apr 19, 2023 7:27 pm
- Forum: Games and Creations
- Topic: Sine ray distortion shader
- Replies: 1
- Views: 2770
Sine ray distortion shader
Hello everyone :D Just a little thing that I had to do myself because I couldn't find anything similar elsewhere, so maybe it can help someone. I made a prototype game where a cannon levitates balls and has to throw them at targets and I wanted to find a cool effect, so I had the idea of some kind...
- Wed Apr 19, 2023 5:00 pm
- Forum: Support and Development
- Topic: How to blend light colours?
- Replies: 8
- Views: 3597
Re: How to blend light colours?
A lot of light would appear white ( though wouldn't a lot of green light still appear green?). With the additive method the sum of only two green lights will always appear green, for example: (0,1,0) + (0,1,0) = (0,2,0) -- Will always give the same green (1,0,0) + (0,1,0) = (1,1,0) -- Red color plu...
- Wed Apr 19, 2023 12:03 pm
- Forum: Games and Creations
- Topic: Block Dash - Version 1.2.0 Showcase & Changelog
- Replies: 10
- Views: 5214
Re: Block Dash - Version 1.2.0 Showcase & Changelog
That's true although we must not fall into this kind of wrong, let's put things in perspective, it's better than all the casual games that come out now