Search found 24 matches

by counterfactual_jones
Tue Feb 10, 2009 2:00 pm
Forum: Support and Development
Topic: Physics, applyImpulse, dt and other things
Replies: 26
Views: 21797

Re: Physics, applyImpulse, dt and other things

Great! Three minor issues and one is my fault. 1. You did a zip (rar actually, which I'm not sure but that might have to be a zip) of the folder. Lua won't find main.lua unless it's in the root of the zip (i.e. not in a folder inside the zip file) 2. Finish.png and Finish_text.png are capitalised, b...
by counterfactual_jones
Tue Feb 10, 2009 7:40 am
Forum: Support and Development
Topic: Physics, applyImpulse, dt and other things
Replies: 26
Views: 21797

Re: Physics, applyImpulse, dt and other things

You forgot

Code: Select all

   world:setCallback(handle_collision)
inside load(), without this handle_collision doesn't get called when collisions occur in the world. (Because world doesn't know that 'handle_collision' exists.)
by counterfactual_jones
Tue Feb 10, 2009 6:43 am
Forum: Support and Development
Topic: Physics, applyImpulse, dt and other things
Replies: 26
Views: 21797

Re: Physics, applyImpulse, dt and other things

Like I said, I'm extremely new to programming so you kind of lost me. I don't know what a "for loop" is and I'm not familiar with keeping things in tables. Sorry for my inexcusable noobedness. I'm new to lua as well, only it's not my first language. You might like to experiment with timer...
by counterfactual_jones
Tue Feb 10, 2009 6:22 am
Forum: Support and Development
Topic: Circle? Box?
Replies: 6
Views: 4446

Re: Circle? Box?

Tabasco wrote: This is all great information, but you might be wise to use love.draw_fill and love.draw_line enumerators instead of 0 and 1.
Aha! I knew there must be constants somewhere! Thank you, I couldn't find any in the docs for the Circle function.
by counterfactual_jones
Tue Feb 10, 2009 6:09 am
Forum: Support and Development
Topic: Physics, applyImpulse, dt and other things
Replies: 26
Views: 21797

Re: Physics, applyImpulse, dt and other things

Hmm, what are these 'pairs'? Sorry I assumed you'd alter it for your stuff. I keep lots of stuff in tables, pairs(table) used in that for loop allows you to iterate over every object in the table. Here's the code I ended up writing, it's not so clean, but I was in a hurry :) function load() local w...
by counterfactual_jones
Tue Feb 10, 2009 2:35 am
Forum: Support and Development
Topic: Circle? Box?
Replies: 6
Views: 4446

Re: Circle? Box?

Your image doesn't have any alpha - along with red green and blue, images sometimes contain an alpha channel to store information about transparency. Love doesn't (at the moment) seem to support colour keyed images - images where you pick a certain colour which then becomes transparent. However - if...
by counterfactual_jones
Tue Feb 10, 2009 2:28 am
Forum: Support and Development
Topic: Physics, applyImpulse, dt and other things
Replies: 26
Views: 21797

Re: Physics, applyImpulse, dt and other things

Set a flag when you collide and unset it when the velocity changes. All this can be done inside update(dt) and collision handling. function update(dt) for i,v in pairs(objects) do if v.velocity.y < 0 then v.isFalling = true end end end function handleCollision(a, b, contact) local cx, cy = contact:g...
by counterfactual_jones
Tue Feb 10, 2009 12:44 am
Forum: General
Topic: Game Distribution & Updating
Replies: 19
Views: 10089

Re: Game Distribution & Updating

Not entirely sure how I feel about random games hitting my internet connection. Never mind updating without my permission. No... wait... yes now I'm sure. Absolutely sure that I don't like it.

Checking when I ask, and updating is fine though.
by counterfactual_jones
Mon Feb 09, 2009 10:38 pm
Forum: General
Topic: Code for collisions
Replies: 20
Views: 19310

Re: Code for collisions

Yes, but then you need to use their physics. Which is fine for some games, but hey, mario and every other arcade game don't use them, and if you're going for that kind of feel... Opening up the collision functions would be useful, at least for some simple cases I guess.
by counterfactual_jones
Mon Feb 09, 2009 2:38 pm
Forum: General
Topic: A console thing
Replies: 26
Views: 19926

Re: A console thing

This your ConsoleTest.love modified. I'm getting lots of "bad argument #1 to pairs" when I use printv. You should detect such conditions yourself and give a slightly less jarring error message than the Love error message. Like: function Console:printv(inTable,scope) ++ if type(inTable) !=...