Search found 212 matches
- Tue Jun 19, 2018 2:44 pm
- Forum: Support and Development
- Topic: Prevent freezing while working with large files?
- Replies: 28
- Views: 5017
Re: Prevent freezing while working with large files?
No, no, no. Why would you put :push into love.update. That would fill up the queue with the same messages 60 messages a second! Anyways, you'd need to return, not break. Since you have 2 loops you only break from the outer one, the inner one is still working. If you still have to do some stuff after...
- Tue Jun 19, 2018 8:05 am
- Forum: Games and Creations
- Topic: Time attack top down racer [Alpha]
- Replies: 8
- Views: 2742
Re: Time attack top down racer [Alpha]
Agree with raingloom. Also decel is too fast as well.
- Tue Jun 19, 2018 7:15 am
- Forum: Support and Development
- Topic: Could really use some help in Lua, have hit a wall and can't move forward.
- Replies: 15
- Views: 2207
Re: Could really use some help in Lua, have hit a wall and can't move forward.
Maybe try this paz: function love.update(dt) local elapsedTime = 0 elapsedTime = elapsedTime + dt --one down if elapsedTime > 0.5 every .5 seconds the loop runs and is reset at the end. if (love.keyboard.isDown("d")) then currentFrame = 2 for index,frame in ipairs(para) do frame.x = frame.x + 200 * ...
- Tue Jun 19, 2018 6:50 am
- Forum: Support and Development
- Topic: Could really use some help in Lua, have hit a wall and can't move forward.
- Replies: 15
- Views: 2207
- Mon Jun 18, 2018 6:38 pm
- Forum: Support and Development
- Topic: Prevent freezing while working with large files?
- Replies: 28
- Views: 5017
Re: Prevent freezing while working with large files?
I knew I missed something!
If you're unsure how many arguments you're gonna send, you can also do:
If you're unsure how many arguments you're gonna send, you can also do:
Code: Select all
local arg_table = {...}
print(arg_table[1], arg_table[2])
- Sun Jun 17, 2018 1:16 pm
- Forum: Support and Development
- Topic: what was there when I pressed the button?
- Replies: 4
- Views: 1060
Re: what was there when I pressed the button?
Are your images rectangular? Than it's easy as: function love.mousepressed(x, y, button, istouch) if button == 1 then -- Left mouse button pressed for index, image in ipairs(image_table) do if x > image.x and y > image.y and x < image.x + image.width and y < image.y + image.height then image.selecte...
- Sun Jun 17, 2018 11:01 am
- Forum: Support and Development
- Topic: Prevent freezing while working with large files?
- Replies: 28
- Views: 5017
Re: Prevent freezing while working with large files?
You're welcome. One more side note - I dunno if the thread dies properly, but I just read that the thread is killed when it returns. So just add return true or something at the end of the thread code in threadRead.
- Sun Jun 17, 2018 10:20 am
- Forum: Support and Development
- Topic: Prevent freezing while working with large files?
- Replies: 28
- Views: 5017
Re: Prevent freezing while working with large files?
Ok, here the zip file. I didn't make a .love but you can run this the normal way. Also side note, the conf file is for 0.10.2 so if you're on 11 go ahead and copy the conf from here: https://love2d.org/wiki/Config_Files And change console = true (if you're on windows), and vsync = true just to limit...
- Sun Jun 17, 2018 1:36 am
- Forum: Support and Development
- Topic: Prevent freezing while working with large files?
- Replies: 28
- Views: 5017
Re: Prevent freezing while working with large files?
Threads are the way to go, but it's a bit complicated. I'm on mobile now but maybe I can help later.
- Tue Jun 12, 2018 7:52 am
- Forum: Support and Development
- Topic: Creating the world
- Replies: 7
- Views: 1437
Re: Creating the world
I think I understand, you mean whether you should draw your world and put it in a whole image, and draw that in the game, or do it the one of the ways zorg described.
Generally it's done with a spritebatch and an atlas.
Generally it's done with a spritebatch and an atlas.