Search found 4 matches

by sillydino
Wed Sep 02, 2009 4:20 am
Forum: Support and Development
Topic: Lua question: Refer to a Table row by name?
Replies: 14
Views: 7026

Re: Lua question: Refer to a Table row by name?

You might want to start investing your time in hash tables instead of checking the table 1 by 1. http://en.wikipedia.org/wiki/Hash_table Expanding on TechnoCat's idea: use two hashset's, assuming you want to keep a set of tuples. The first hashset would be your keys, the second would be your values...
by sillydino
Thu Aug 27, 2009 3:15 am
Forum: Support and Development
Topic: physics vector to move 1px per update?
Replies: 5
Views: 3591

Re: physics vector to move 1px per update?

Every update also check if it is colliding, if it is colliding move it back before update(dt) is finished. That is what I was doing before integrating with the physics module. My goal in using the physics module is to inherit the collision detection. At the same time, I need to be able to track at ...
by sillydino
Thu Aug 27, 2009 2:13 am
Forum: Support and Development
Topic: physics vector to move 1px per update?
Replies: 5
Views: 3591

Re: physics vector to move 1px per update?

If you want to move it one pixel per update you could write this in update(dt) body:setX(body:getX()+1) This moves 1 pixel/update But you are more likely wanting to do it one pixel per second. This is because the update cycle frequency highly depends on the speed of the computer it is being run on....
by sillydino
Wed Aug 26, 2009 5:05 am
Forum: Support and Development
Topic: physics vector to move 1px per update?
Replies: 5
Views: 3591

physics vector to move 1px per update?

Hello all, I'm trying to right my vector so that it moves my body at 1 pixel per update cycle. If I set my vector to 1, nothing happens, if I set my vector to 50, the body moves, but skips pixels. I've read the box2d documentation and the love documentation but I can't figure out a way to compute th...