views:

143

answers:

3

Hi, I'd like to create a game with some kind of a Roulette Wheel with C#.

I have no relevant experience in GUI.

The first thing that comes to my mind when I want to develop such Roulette Wheel, is silver light but I prefer to implement it in a winform (unless you think otherwise).

If you can give me some ideas were to start... 1. How can I create the wheel 2. How can I make the ball go over it (don't want 3D grapics with bouncing and other fantastic ideas)

And please, as simple and basic as possible

Thanks Asaf

+1  A: 

You can create a gif of a spinning wheel the slowly slows down. Then you can plot the known relative co-ordinates of each of the balls finishing positions.

For example 00 might be at the top when the animation has finished. In your page generate a random number (pseduo random is fine for a roulette wheel where no real money is being staked!), and have a ball gif. Use javascript to 'spin' the ball in the opposite direction of the wheel gif and slowly come to a stop the same time as the wheel animation, finishing at your plotted known co-ordinates.

Hope this gives you some ideas. There are several ways to do this!

Tom Gullen
+4  A: 

Microsoft released a great framework for 2D and 3D game developemnt - XNA. You can easily add sounds and keyboard events to your game. There is also possibility to put your game onto a windows Forms. Here is a blog post about this by Roy Triesscheijn:

http://royalexander.wordpress.com/2008/10/09/xna-30-and-winforms-the-easy-way/

I've learned XNA 2D basics in one day so you shuld check it out.

Check out also this tutorial, it's really nice and for absolute beginner:

http://creators.xna.com/en-US/education/gettingstarted/bg2d/chapter1

Andrzej Nosal
+1 Thank you so much I feel like a kid that got his first toy, I didn't know this exist - you showed me a new wonder world- a lot to explore :) Thanks.
Asaf
+3  A: 

Windows Forms has this amazing feature called nonrectangular forms wherein you can create "shaped" forms like polygons etc. Perhaps that can help you create the wheel.

http://msdn.microsoft.com/en-us/library/6k15y9et.aspx

Child controls placed on that form can act like the wedges on the wedges. Again, these "child controls" themselves could be nonrectangular forms.

I think it would be way easier if you opt for WPF for this instead of Winforms. WPF offers a wide range of controls and features that seem tailormade for such applications.

Mamta Dalal