Search found 115 matches
- Thu Mar 20, 2025 6:23 pm
- Forum: Ports
- Topic: How to add https to love.js
- Replies: 5
- Views: 896
Re: How to add https to love.js
You need to use another library. The Love.js-Api-Player does what you need. It also has an example and tips for using it with Davidobot love.js fork, that makelove is using.
- Thu Jul 25, 2024 9:11 pm
- Forum: General
- Topic: How would I make an image flip over like a card
- Replies: 12
- Views: 31830
Re: How would I make an image flip over like a card
Change its scale from 1 to 0 and then display the backside with its scale changing from 0 to 1. Use the cosine function to make it more realistic. I attached a simple example.
- Thu May 30, 2024 9:43 pm
- Forum: General
- Topic: Help with calculating trajectory
- Replies: 13
- Views: 10361
Re: Help with calculating trajectory
If you don't want to do any of the math, then you can just simulate the shot. Take the table, the cue stick and the balls into an separate physics environment, do the shot there and if the white ball hits any other ball, then you have all the information you need to draw what you want: At the moment...
- Thu May 09, 2024 8:22 pm
- Forum: Support and Development
- Topic: [SOLVED] Game freezes fatally after only 20 seconds of gameplay
- Replies: 2
- Views: 1655
Re: Game freezes fatally after only 20 seconds of gameplay
The problem is, that you are loading the images thegovernment.jpg and textures/normal.png every frame. Load them once in love.load() like you do with the videos and music. This fixes the freeze for me.
- Sat May 04, 2024 10:05 pm
- Forum: Support and Development
- Topic: Bottons activating when I maintain them on touchscreen
- Replies: 3
- Views: 1637
Re: Bottons activating when I maintain them on touchscreen
Yeah but if I do that I would be able to maintain the jump button and have some sort of auto jump and I don't want that Then add a little state machine to prevent that: little_state_machine.png This could look something like this: function love.load() player.jumpingState = "isNotJumping" ...
Re: help cleaning up my code
I would suggest the opposite of BrotSagtMist: Create more functions that only contain 1-3 lines of code for better readability. As an example your function love.mousepressed() has 5 indentation levels. With some easy refactorings you can get this down to two or three and have an easier time to read ...
- Wed Dec 06, 2023 8:36 pm
- Forum: Support and Development
- Topic: Check if the web build is working every time a commit is pushed
- Replies: 2
- Views: 9238
Re: Check if the web build is working every time a commit is pushed
You can start chrome (or chromium based browsers) with debug output enabled ( source ): chromium --log-level=0 --enable-logging=stderr Then everything that is printed in the web console is also printed to the command line where chrome was started. Here an simple example javascript in a file called l...
- Tue Oct 17, 2023 8:58 pm
- Forum: Support and Development
- Topic: How to store file text into array
- Replies: 4
- Views: 5348
Re: How to store file text into array
In other words,what should I put at the ? So the condition is true when it access out of the string You need to put the following where the ? is: "" But why would you want to do that? You know that you are at the end of the string when i == #data[1] and you are "beyond" the stri...
- Sun Aug 13, 2023 8:20 pm
- Forum: Support and Development
- Topic: How would I go about making a flashlight effect in Love2D?
- Replies: 5
- Views: 1992
Re: How would I go about making a flashlight effect in Love2D?
I attached a simple example that works without shaders.
Thanks to SD.Chatane for the image (licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)).
Thanks to SD.Chatane for the image (licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)).
- Sun Jun 25, 2023 7:46 pm
- Forum: Support and Development
- Topic: Timer as Integer ?
- Replies: 9
- Views: 2064
Re: Timer as Integer ?
You want the math.floor function: print(math.floor(19.02032)) -- prints "19" If you want commercial rounding you need to add 0.5 to your number before you use math.floor : function print_rounding(number, rounded_number) print("Rounding " .. tostring(number) .. " to " .....