Feeling bored that I didn't have a snake game on my phone, I wrote one for it. It just took me a day to write it and another day to polish and refactor code. There's nothing great about the features. It's just a simple snake game like the onez you 'used' to get in nokia 3310 phones, which is almost extinct nowadays.
However on the technology side,
there are two things i could accomplish.
1] I wrote a double buffering mechanism without utilizing any libraries or using DirectX. Yes!, This sample runs on plain and elegant 'winforms'. I've also used a separate mechanism to control the frame rate of the game / render loop () :-).
2] I used Asynchronous programming to smoothly fire off a pseudo-random generator , while the render loop continues in the same thread.
snake - 'beta' (simply because there aren't any great features and i don't intend to put any, unless i find myself awake on a summer night at 3am and completely jobless)
No comments:
Post a Comment