Search found 23 matches
- Fri Aug 21, 2015 9:50 am
- Forum: Support and Development
- Topic: [Solved] Problem with collision with mutliple objects.
- Replies: 2
- Views: 1713
Re: Problem with collision with mutliple objects.
If you collide with 2 objects during the same frame you will trigger player.velocity = -player.velocity 2 times. Try to add something like this: Added player.collide to your code ... player = { x = 0, y = 0, rotation = 0, velocity = 0, speed = 200, maxVelocity = 1.0, collide = false } ... for i, v i...
- Mon Aug 10, 2015 1:36 pm
- Forum: Support and Development
- Topic: how to create collision between two entities.
- Replies: 2
- Views: 1978
Re: how to create collision between two entities.
Here is a simple collision detection function: -- Collision detection function. -- Returns true if two boxes overlap, false if they don't -- x1,y1 are the left-top coords of the first box, while w1,h1 are its width and height -- x2,y2,w2 & h2 are the same, but for the second box function CheckCo...
- Sat Aug 08, 2015 1:56 pm
- Forum: Support and Development
- Topic: Fog of war
- Replies: 3
- Views: 2738
Fog of war
Hi. I'm working on a top down strategy game and need some help with fog of war. Right now i have a working basic fog of war that light up the things around the player in a circle. But the problem is that i see thru walls. Anyone have any tips how to solve this? I have tried to loop thru all my tiles...