MSDN Archive Home
Help and FAQs
C# Games Created by Agha Khan
All Resource Updates
Change History (all pages)
Resource Page Description
This application creates an interactive, 3D model of a Rubik’s cube. It contains 26 small 3D squares which combine to form a Rubik’s cube. Colors are assigned to each side of the cube. If you look at a real Rubik’s cube, you will find every sub-cube has a gray surface with a smaller round rectangle painted on it. I wanted to produce same effect on our example.
We have to place every sub-cube in 3D space and I have named the cubes according to its starting position using the following pattern CUBEX0Y0Z0. This name tells us that the cube's unit left location is X0, the unit bottom location is at Y0 and it is Z0 units away from origin.
Because we wanted to keep the rotation in memory, we also keep the rotation transformation for each cube. Last we also want to save all information in 3 separate arrays, so we could rotate each axis. After rotating any axis we update the rest of the cubes in the array. Code is provided for rotating the cubes in both a clockwise and counter-clockwise direction.
If you have any further question, please email me.
**Delete the following note before publishing **
This resource page is currently in setup mode and only available to coordinators and developers. Once you have finished setting up your resource page you can publish it to make it available to all MSDN Code Gallery visitors.
To get your Resource Page ready to publish, you should do the following:
Make any changes to the details of your resource page
Here you can enable or disable functions of your resource page. You might want to turn on the Issue Tracker to allow users to provide feedback on your resource, or if you have a resource that does not involve a code sample, you may want to turn off the Releases tab.
Make sure your resource page description is detailed enough to let people search for your resource.
Add your code sample or other resources to the resource page
If you’re uploading code, go to the Releases tab and create a new release to house your code. Creating a release allows you to have the license properly displayed when people download your code, as well as provides a download count.
Edit your Wiki page to attach any resources you may have that are not source code.
If you want to let someone see your resource page before it is published, go to the People tab and add them to your resource page
This will let you add other team members who may be contributing to your resource, or just show it off and get feedback from someone you trust.
Tag your resource page with descriptive tags to make it easier for people to find your resources when browsing the gallery.
Publish your resource page so it becomes visible to everyone!
Additional information on starting a new resource page is available here:
Resource Page Startup Guide
Feb 29 2008 at 8:10 PM
, version 1
Mar 6 2008 at 2:29 AM
Awesome! We need more games like this! Nice Job!!
Mar 6 2008 at 10:55 PM
How refreshing !!!!, to see 3-D games like this one can be created with that speed in C#. It is an outstanding game undoubtly.
Mar 7 2008 at 10:27 PM
Great Job! I love samples like this. I just want to jump right into this new technology.
Apr 3 2010 at 11:25 AM
hey guys how to run dis code.. plzz help me.. ? m new to dis... thnks in advance... :)
Aug 10 2010 at 2:10 PM
Sign in to add a comment
Rubik’s Cube 2.1
Wed Feb 2 2011 at 8:00 AM
More Tags ...
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.