Keeping track of dice numbers

Posted By: Darkmatters

Keeping track of dice numbers - 04/29/10 11:11

I am looking for a routine to keep track of a dice, for instance, so I could tell what face,numbered 1-6 is face down.

Thanx for any help as always.

F.
Posted By: Anonymous

Re: Keeping track of dice numbers - 04/29/10 11:49

I used a dice (cube) model and added an extra vertex to the center of each of the 6 faces.
Then (after the dice was thrown) I checked the extra vertix z-position.
The one with the highest position represents the upper face.

(-> vec_for_vertex)
Posted By: Quad

Re: Keeping track of dice numbers - 04/29/10 11:56

you can also determine the number facing up from the pan/tilt/roll angles.
Posted By: EvilSOB

Re: Keeping track of dice numbers - 04/29/10 12:56

If you know which face is UP, then you know the one that is down.

DOWN = 7 - UP and conversly UP = 7 - DOWN
(on MOST 6 sided dice anyways, more statistically random)


Posted By: Darkmatters

Re: Keeping track of dice numbers - 04/29/10 21:45

Well obviously I know what the top face is, as I know what all the other faces are..... but I want the PROGRAM to know what face it is!!!!!
Thats the problem.....
Posted By: Uhrwerk

Re: Keeping track of dice numbers - 04/29/10 22:50

Quadraxas and mercuryus told you how to do it...
Posted By: Damocles_

Re: Keeping track of dice numbers - 04/29/10 23:48

Darkmatters, first state your problem propperly
(eg, using physics, using just a normal model with random numbers etc) and
in which part you cant progress,
before asking people to write and test sourcecode for you.

or..dont make a dicegame if you cant even handle such trivial
tasks.
Posted By: Darkmatters

Re: Keeping track of dice numbers - 04/30/10 09:21

Firtly, I DID state the problem, also, I am NOT asking anyone to write source code for me, just a pointer would do, thirdly, its not a dice game, that was used purely as a descriptive itemisation of the problem at hand.

I have used the methods Quadraxas and mercuryus suggested, but they dont return the parameters required.

Thought you guys liked a challenge, I know I do.....
Posted By: Quad

Re: Keeping track of dice numbers - 04/30/10 09:38

I do not know how can we give more pointers without writing the code.

this is no challenge. it's a very small task that i am sure posters above you can write the code for that in minutes.

"but they dont return the parameters required" , then you did it wrong. Can you please show us how did you tried the methods?
Posted By: Pappenheimer

Re: Keeping track of dice numbers - 04/30/10 09:39

Originally Posted By: Darkmatters
I have used the methods Quadraxas and mercuryus suggested, but they dont return the parameters required.

And you don't give a single description of the way you did it.

To get help, you have to describe what you already tried, in detail, not an 'I already tried that', because that isn't sufficient.

There is no challenge to someone in writing something that he has already written. It is only boring unpaid work, then. That's it.(I can assure you that the thing with the applied vertices that you test with vec_for_vertex works like charm.)
Posted By: Darkmatters

Re: Keeping track of dice numbers - 04/30/10 10:50

You are of course absolutley correct, the error was all mine, thanks to those who helped, apologies to any I may have offended, it was, as you say a simple task, but I could not see the forest for all the trees in the way.
I am not too big to admit my error, once again, thanks to all.

F.
Posted By: Amanda_Dearheart

Re: Keeping track of dice numbers - 04/30/10 18:46

What is wrong with EvilSob suggestion?
I stumbled upon this method when I waas writing a dice game for Blitz3D.
I used a modeling software (TrueSpace if you need to know) to model a die, and I wanted the numbers to be mapped correctly by face. When I've done that, I found out that if you take the numbers on opposite sides, and add them together, you get seven. Ex. 1 + 6 = 7, 2 + 5 = 7, 3 + 4 = 7.

If you have a die handy, look at it?

BTW physics fans, does anyone know the meaning of GOD DOES NOT PLAY DICE, and where does it come from? Someone who hired me wanted me to write a game based on that method, and I also came across it in a pc game DEAD CHAOS?
Posted By: Darkmatters

Re: Keeping track of dice numbers - 04/30/10 19:00

Yes I was well aware that all sides added up to 7, but it was not the solution I was looking for, any way problem solved now... as for you other question....

God does not play dice is really a quote attributed to Einstein in reference to the randomness inherent in quantum mechanics. Einstein believed that quantum theory could not be true, simply because it implied there was a limit to how much a scientist could know about a particle. Everything else, therefore, appeared random to an observer (see Uncertainty Principle, Schrodinger's Cat.)

Einstein struggled through the last half of his life to eliminate this uncertainty, but he never could (no one else could eliminate it either, and since Einstein we have only realized more things that we can't know. see neutrino). Some say (read: Hawking, who is very hung up on comparing himself to Einstein, btw) that never conceding this fact was Einstein's greatest mistake.

All of this is quite ironic considering Einstein never believed in a science that he helped to found.
© 2024 lite-C Forums