## Search found 1655 matches

Sun Mar 27, 2011 12:58 pm
Forum: Support and Development
Replies: 4
Views: 2121

Can somebody please explain me such behaviour? Sometimes Box2D doesn't update non-moving (sleeping) bodies so that they don't slow down the physics simulation. You might want to look up the 'wakeUp' function in Box2D. Second of all, your code could be simplified considerably if you used 'ApplyForce...
Sat Mar 26, 2011 6:46 am
Forum: Support and Development
Topic: Some coding help!
Replies: 8
Views: 1266

### Re: Some coding help!

Hey Alecal. I think you need to clarify what behavior you are trying to program for the enemies. If you want the enemy to move towards the player (at a constant speed) then the code should look something like: local dx = (x - enx) local dy = (y - eny) local dist = math.sqrt ( dx * dx + dy * dy ) -- ...
Thu Dec 09, 2010 3:10 pm
Forum: General
Topic: Ludum dare
Replies: 7
Views: 883

### Ludum dare

Anybody here plan on entering the next Ludum dare compo:
http://www.ludumdare.com/compo/
I'll try to enter although I don't know if I can actually complete a playable game in 72 hrs or whatever the deadline. It should be an interesting experience though.
Thu Dec 09, 2010 11:25 am
Forum: General
Topic: Lua - the cat
Replies: 12
Views: 2533

### Re: Lua - the cat

Sun Nov 28, 2010 6:26 pm
Forum: Support and Development
Topic: Help designing my game
Replies: 6
Views: 1283

### Re: Help designing my game

I really don't see how you'd use box2D to accomplish that I think it might work using distance joints where anchor1 could be the origin and anchor2 could be the end of the tentacle. You should be able to specify the equilibrium length between the two anchors upon creating the distance joint. I don'...
Sun Nov 28, 2010 1:09 pm
Forum: Support and Development
Topic: Help designing my game
Replies: 6
Views: 1283

### Re: Help designing my game

you have to pull and drag it around the levels by projecting tentacles out of it that can connect to the environment. Originally I was going to use Love's Physics engine to simulate this (thinking it could work on similar lines to World of Goo) but having fiddled with it a bit I think there are a c...
Mon Oct 11, 2010 6:15 pm
Forum: Support and Development
Topic: Transferring physics bodies to new worlds
Replies: 1
Views: 424

### Re: Transferring physics bodies to new worlds

Happy Thanksgiving. :) Is it possible to transfer a physics body from its original world to a new world without destroying and recreating it, like for transferring the player character's body to the new level world? No. You have to manually recreate the body along with all of its associated shapes (...
Sat Oct 09, 2010 10:04 am
Forum: Support and Development
Topic: Trigonometry Help
Replies: 6
Views: 944

### Re: Trigonometry Help

Hi. I don't really understand your question but I might have some useful suggestions. If I remember correctly, in Asteroids, you can rotate your ship in any direction without affecting the direction of its movement. That is, I don't think it would be enough to represent its velocity as a number. How...
Tue Oct 05, 2010 3:16 pm
Forum: Libraries and Tools
Topic: Fizzlib, OO Physics (Contacts Fixed!)
Replies: 6
Views: 2308

### Re: Fizzlib, OO Physics (Contacts Fixed!)

And this, may be a possible reason why it was crashing in the first place, although i am unsure. What would be the best way? reuse the old table and remove the expired contacts? You might find useful what I did in my own project: Each body has a 'contacts' table which buffers its number of contact ...
Tue Oct 05, 2010 12:38 pm
Forum: Support and Development
Topic: Finding the distance between two points
Replies: 15
Views: 11266

### Re: Finding the distance between two points

zac352 wrote:

Code: Select all

(p1-p2).magnitude
Look how easy it is with vectors.
How would that work? Lua doesn't have operator overloading although might be libs for it I think.