8Observer8 Posted May 5, 2019 Share Posted May 5, 2019 My example shows a very simple Snake game in TypeScript and pure WebGL. And it shows how to place a TypeScript multi file example on SandBox. If you know how to improve the code let me know. Sandbox: https://plnkr.co/edit/7gjdZi2GNHZvtHQEMc4Y?p=preview RagingPixel 1 Quote Link to comment Share on other sites More sharing options...
RagingPixel Posted May 7, 2019 Share Posted May 7, 2019 Its cool that you used WebGL for this, and the code is easy to read. Nicely done. I found bug in this example. When snake length is greater than 1 and its moving right when you press up arrow and then left arrow the game resets. 8Observer8 1 Quote Link to comment Share on other sites More sharing options...
8Observer8 Posted May 7, 2019 Author Share Posted May 7, 2019 2 hours ago, RagingPixel said: and the code is easy to read. Nicely done. Thank you. Could you register on Plunker, make a fork, fix the bug and post a link on your fork? I think it will be interesting and useful for you and me. Quote Link to comment Share on other sites More sharing options...
RagingPixel Posted May 7, 2019 Share Posted May 7, 2019 I've made a fork and changed keydown handler a bit https://plnkr.co/edit/EPyxbRDmSg0tstD5Q55h let me know what you think about it. 8Observer8 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.