(X) Hide this
    • Login
    • Join
      • Say No Bots Generate New Image
        By clicking 'Register' you accept the terms of use .
        Login with Facebook

The Reactive Snake for Windows Phone 7

(0 votes)
0 comments   /   posted by Silverlight Show on May 05, 2011
Tags:   reactive-extensions , gaming , windows-phone-7 , andrea-boschin
SilverlightShow Page for all Silverlight and Windows Phone 7 (WP7) things on Twitter

Continuing his experiments with Reactive Extensions, Andrea Boschin put together a small example that shows an alternative use of the library to create a little Snake game for WP7.

Source: Silverlight Playground

The core of the game is based on two separate uses of the Reactive Extensions. From one side I have a main loop that is based on a frequent timeout that in a complete version of the game could be used to change the game speed. In this version it is set to 75 milliseconds. Every time the timeout is elapsed I move forward the Snake of one position saved in two variables XDirection and YDirection. This variable can assume the values of 1 or -1 if the snake is moving along the direction and 0 if the snake is moving along the opposite direction.


Comments

No comments

Add Comment

Login to comment:
  *      *       
Login with Facebook

Our News on Twitter