need help with 3d roulette

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
devil2k
Posts: 6
Joined: Thu Mar 24, 2005 9:32 am

need help with 3d roulette

Post by devil2k »

Hi, guys.
I've only programmed with Irrlicht a few times. Not a really experienced Irrlicht programmer. Just got a problem.

One of my client asked me to write a 3d roulette program, I suppose they're probably running an online casino or something. Anyways, that's not my concern, I just want to do my job.

I guess it wouldn't be that hard just to have a roulette spinning and put a ball down there and let it roll. And leave the collision detection to Irrlicht. The thing is, my client ask for the ability to control the result (dirty bastards). That means they want to control who wins at the end. I told them if they want to make this in real 3D, then everything is calculated at run-time, which includes where the little ball is gonna stop, too. They said they don't really care how I do it as long as I get the job done.

So, is it possible to do this? or is there any other work around?
Please give me some advice, thanks guys.
ErUs
Posts: 165
Joined: Thu Oct 07, 2004 6:13 pm

Post by ErUs »

if i tried todo this it would look way to obv :(

you could try doing it backwards or something? lol
Rambus
Posts: 96
Joined: Thu Nov 24, 2005 4:56 pm
Location: Canada
Contact:

Post by Rambus »

Perhaps have a set of animations for the ball to follow, one for each possible landing spot (or, several to make it look less rigged) A very inelegant approach to things, but It should do the trick.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

Devil, I deal with clients like this all the time.

THEY DONT WANT 'REAL' 3D. When they say 3D, they mean ONLY the graphic rendering. They are not talking about physics in any way. You could make the spin an animation and they'd be fine with it. (If you're going to deal with clients, you need to be able to understand when they use buzzwords and what those words mean to THEM and not to you.)

Your best approach is probably just that, set it as an animation where the ball bounces and rolls in its own animation space.

Then you have an animation for the wheel where it turns around then slows down to a stop.

When you put them together, it looks like the ball is spinning and bouncing and stopping on top of the wheel.

In this way you can change the orientation of the wheel before it spins so that it will stop at the place on the wheel that you want it to. (which is basically what Rambus stated)

To make things a little more elegant, you can even have several animations of the ball (with slightly different bounces) as long as the animation ends in the same place and spins as the same rate as the wheel.
a screen cap is worth 0x100000 DWORDS
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Does it have to be in 3d? Why not do it in flash with action script? there are tons of pre-designed applets for these sort of games.
AticAtac
Posts: 29
Joined: Mon Mar 22, 2004 2:46 pm
Location: Germany

Post by AticAtac »

I also think no serious online-casino will go for random numbers created from a 3d engine (+phyisc) !
They will have generated their random numbers at their own and the 3d client should show the result for a certain number.
There is nothing dirty about that !
devil2k
Posts: 6
Joined: Thu Mar 24, 2005 9:32 am

Post by devil2k »

Keless, I guess you're right.
I'll just try the animations and hopefully that'll work out well
Thanks for the advice guys.
Post Reply