Search found 264 matches
- Sat Sep 05, 2020 12:42 pm
- Forum: Support and Development
- Topic: how to get the compass direction between two points ?
- Replies: 11
- Views: 14332
Re: how to get the compass direction between two points ?
Hm, if it were some arbitrary float number then I would agree, but it's zero. I think it should be safe, even if either dx or dy are +0.0 or -0.0. If you remove that check, which you can do, then whenever the source and destination are at the same position the result will be whatever passes the test...
- Sat Sep 05, 2020 11:37 am
- Forum: Support and Development
- Topic: how to get the compass direction between two points ?
- Replies: 11
- Views: 14332
Re: how to get the compass direction between two points ?
For the challenge I did it a different way (comparing the tangents inside a quadrant to pick the "slice"/octant, then picking the quadrant based on the sign of dx and dy). I also changed the order of parameters in the direction function, LÖVE usually puts the position parameter first and t...
- Sat Sep 05, 2020 8:06 am
- Forum: General
- Topic: Love CPU usage
- Replies: 41
- Views: 47364
Re: Love CPU usage
I still don't see why the events processing time should not be included in the total measurement. I don't understand the confusion, timerStep() (alias for love.timer.step()) returns the time that's elapsed since the last call to it. So in that first code that I posted that we're talking about, when...
- Thu Sep 03, 2020 10:43 am
- Forum: General
- Topic: Love CPU usage
- Replies: 41
- Views: 47364
Re: Love CPU usage
The goal is getting a main loop that's as generous as possible to the CPU so you have low usage/no busy-spinning, it should do a game tick and then sleep to give all the remaining time back to the OS. The loop I posted I based on the first one in the deWiTTERS game loop article . To get my head arou...
- Wed Sep 02, 2020 1:02 pm
- Forum: Games and Creations
- Topic: Fast 2D mesh animation
- Replies: 16
- Views: 18303
Re: Fast 2D mesh animation
[Edited]
The exporter now should work with Blender 2.79+, including the 3.x series.
The exporter now should work with Blender 2.79+, including the 3.x series.
- Tue Sep 01, 2020 10:15 pm
- Forum: General
- Topic: Love CPU usage
- Replies: 41
- Views: 47364
Re: Love CPU usage
Thats important to know, thank you for the pointer. I'm personally only interested in the desktop and Android platforms. I searched and the discussion behind changing love.run() from a loop to a function is in here, pretty interesting: - https://github.com/love2d/love/issues/1273 - https://github.co...
- Tue Sep 01, 2020 1:07 pm
- Forum: Support and Development
- Topic: Waiting for user input?
- Replies: 5
- Views: 6137
Re: Waiting for user input?
I'm also getting familiar with LÖVE, so if you make any breakthroughs do share! x) Hm, I just tested here, if you paste "love.event.wait()" in the middle of your code, when the program reaches that point it halts until you do any of the unblocking events (mouse-move/mouse-press/keypress/ke...
- Tue Sep 01, 2020 6:56 am
- Forum: Support and Development
- Topic: Waiting for user input?
- Replies: 5
- Views: 6137
Re: Waiting for user input?
The logic should be similar to when doing a pause screen ("Press P to pause"): you need to set up a finite-state-machine that has a state for this. Here's the theory: - http://howtomakeanrpg.com/a/state-machines.html - https://gameprogrammingpatterns.com/state.html - https://gamedevelopmen...
- Tue Sep 01, 2020 6:21 am
- Forum: General
- Topic: Love CPU usage
- Replies: 41
- Views: 47364
Re: Love CPU usage
If you can guarantee that you won't overwrite or nillify love.draw or love.update, then you don't need to keep checking their presence at every cycle. These table lookups should be pretty fast already, but if you want to be pedantic you can cache them. This is a love.run() for v11.3: local FRAME_TIM...
- Sun Aug 30, 2020 10:47 pm
- Forum: Games and Creations
- Topic: Fast 2D mesh animation
- Replies: 16
- Views: 18303
Re: Fast 2D mesh animation
I updated the demo! The deformation algorithm is faster now, after I figured which parts could be optimized. Added a GPU-based algorithm, doing hardware-accelerated skinning. On my system it's 10x faster than the CPU method. You can go in the code and switch between these two methods. Added support ...