Search found 2 matches
- Sun Jan 01, 2017 10:53 pm
- Forum: Support and Development
- Topic: Problem with movement of snake in planned snake game
- Replies: 16
- Views: 9515
Re: Problem with movement of snake in planned snake game
Yeah, you are right, I was contemplating editing the whole bit out, because you get a value in seconds anyway. Funny thing is, I am actually trying to learn using lua+love ("migrated" from PhaserJS/PIXI + years of Javascript), so today I decided to make a snake game, inspired by this topic...
- Sun Jan 01, 2017 2:47 pm
- Forum: Support and Development
- Topic: Problem with movement of snake in planned snake game
- Replies: 16
- Views: 9515
Re: Problem with movement of snake in planned snake game
Hi! Since you are jumping from block to block, the actual movement should only occur whenever the game "ticks", so to speak. Which means, that originally, you can make the Snake move each second. How? Well, add that DT to an accumulator variable, and whenever its contents reach its "l...