Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 1,151 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Keeping track of dice numbers #321449
04/29/10 11:11
04/29/10 11:11
Joined: Apr 2010
Posts: 47
D
Darkmatters Offline OP
Newbie
Darkmatters  Offline OP
Newbie
D

Joined: Apr 2010
Posts: 47
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.

Re: Keeping track of dice numbers [Re: Darkmatters] #321450
04/29/10 11:49
04/29/10 11:49

M
mercuryus
Unregistered
mercuryus
Unregistered
M



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)

Re: Keeping track of dice numbers [Re: ] #321451
04/29/10 11:56
04/29/10 11:56
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
you can also determine the number facing up from the pan/tilt/roll angles.


3333333333
Re: Keeping track of dice numbers [Re: Quad] #321456
04/29/10 12:56
04/29/10 12:56
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
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)




"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Keeping track of dice numbers [Re: EvilSOB] #321518
04/29/10 21:45
04/29/10 21:45
Joined: Apr 2010
Posts: 47
D
Darkmatters Offline OP
Newbie
Darkmatters  Offline OP
Newbie
D

Joined: Apr 2010
Posts: 47
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.....

Re: Keeping track of dice numbers [Re: Darkmatters] #321528
04/29/10 22:50
04/29/10 22:50
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Quadraxas and mercuryus told you how to do it...


Always learn from history, to be sure you make the same mistakes again...
Re: Keeping track of dice numbers [Re: Uhrwerk] #321531
04/29/10 23:48
04/29/10 23:48
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
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.

Re: Keeping track of dice numbers [Re: Damocles_] #321554
04/30/10 09:21
04/30/10 09:21
Joined: Apr 2010
Posts: 47
D
Darkmatters Offline OP
Newbie
Darkmatters  Offline OP
Newbie
D

Joined: Apr 2010
Posts: 47
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.....

Re: Keeping track of dice numbers [Re: Darkmatters] #321558
04/30/10 09:38
04/30/10 09:38
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
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?


3333333333
Re: Keeping track of dice numbers [Re: Darkmatters] #321559
04/30/10 09:39
04/30/10 09:39
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
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.)

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1