[HELP] Falling "sand" timer
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
[HELP] Falling "sand" timer
So I have a timer that counts down and every second it "drops" a pixel, I have it stop at the bottom of the screen minus one pixel, but how do I have it interact like falling sand? I've looked at physics in the game but I dont get it. Ive also tried looking at others falling sand games and that doesn't help either.
- Attachments
-
- main.love
- Ignore the numbers in the corner
- (572 Bytes) Downloaded 159 times
Re: [HELP] Falling "sand" timer
Your code has no physics at all, sure your using a rectangle to draw on screen in the Y but your not telling love, Hey! these rectangles are physical objects treat them as such.
Use this tutorial below and change your code accordingly.
http://www.love2d.org/wiki/Tutorial:Physics
Use this tutorial below and change your code accordingly.
http://www.love2d.org/wiki/Tutorial:Physics
Re: [HELP] Falling "sand" timer
You can also implement your own gravity, collision detection, and things like that as well if you like. You could do something like for each sand grain check what the positions and velocities of the neighbouring sand grains are and update accordingly.
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests