Search found 721 matches

by Plu
Wed Aug 27, 2014 4:07 pm
Forum: Support and Development
Topic: [SOLVED]Conf.lua being ignored even with "required"
Replies: 11
Views: 9225

Re: Conf.lua being ignored even with "required"

You have a typo in your function name, so it's never called:

Code: Select all

function love.cof(t)
by Plu
Wed Aug 27, 2014 6:09 am
Forum: Support and Development
Topic: Am I Too Stupid?
Replies: 3
Views: 3441

Re: Am I Too Stupid?

You're probably just new to the whole thing. It's complicated at first.

Just keep trying.
by Plu
Fri Aug 22, 2014 4:24 pm
Forum: Support and Development
Topic: Can't use functions properly
Replies: 3
Views: 2476

Re: Can't use functions properly

The "love.graphics.newImage("Images/mainMenu/botoJugar/V2/botoJugar2.png");" on line 23 doesn't do anything, you should remove it. It constantly loads a file from disk and then discards it, which is bad for your overal performance. Other than that I'm not really sure what is goin...
by Plu
Fri Aug 22, 2014 2:26 pm
Forum: General
Topic: running a function only once
Replies: 12
Views: 6958

Re: running a function only once

It should automatically seed the randomiser and generate a different one each time.
by Plu
Fri Aug 22, 2014 2:12 pm
Forum: General
Topic: running a function only once
Replies: 12
Views: 6958

Re: running a function only once

The most straightforward example possible. (You can probably do this much cleaner.) On loading; make the line/fill variables and stuff them in a table. When drawing, reload the line/fill from the table and use it to draw each block. If you don't understand what is happening, let me know I'll explain...
by Plu
Fri Aug 22, 2014 2:07 pm
Forum: Support and Development
Topic: Where i must put this in code?
Replies: 2
Views: 1890

Re: Where i must put this in code?

Depends on what the behaviour should be. I'm guessing it should be run once , when you set the value to used? In that case, it should go in update but you should add an extra line that removes the used value again so that it doesn't run indefinately. if item[1] == used then min_items = min_items + 1...
by Plu
Fri Aug 22, 2014 12:23 pm
Forum: Support and Development
Topic: lag using love.physics
Replies: 6
Views: 2510

Re: lag using love.physics

Create the bodies, shapes and fixtures only once (probably in love.load or some other loading function) and then keep using those.

The same way you'd do it with images and sounds and the like; store the return value from the creator function and keep using it.
by Plu
Fri Aug 22, 2014 8:10 am
Forum: Support and Development
Topic: Change all quads in table x position relative to each of the
Replies: 2
Views: 1495

Re: Change all quads in table x position relative to each of

Something like this? If I understand you correctly. function addquad(quadsize) quad = love.graphics.newQuad( 50, 50, 2, quadsize/2,0.0001,0.0001) table.insert(quadtable,quad) for i,v in ipairs(quadtable) do -- pull the current values from the quad local x, y, w, h = v:getViewport() -- reinsert the n...
by Plu
Fri Aug 22, 2014 7:00 am
Forum: Support and Development
Topic: Moving bird.
Replies: 4
Views: 3567

Re: Moving bird.

Sidenote: the bird is currently moving at 300 pixels per second, not frame. This is probably a better idea because 300pixels per frame would be impossible to follow as well as differ heavily from machine to machine depending on how many frames per second it can handle.
by Plu
Fri Aug 22, 2014 6:56 am
Forum: Support and Development
Topic: Limit updates per second?
Replies: 4
Views: 3607

Re: Limit updates per second?

If you want to do it the minecraft way, like Wojak says, you can't just limit how often the update function runs, because that would mean that while you have lots of frames, nothing would actually happen in the extra frames, because all of the animations and such run in update, which isn't called. I...