Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. I helped my friend make a dice game

I helped my friend make a dice game

Scheduled Pinned Locked Moved The Lounge
c++cssgame-devdata-structureslounge
12 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H honey the codewitch

    I'm on a roll! *hides* No, but seriously I did. You shake the little M5 stack and 6 dice come up with a more or less true random. And he's so happy. It put me in a good mood. He learned a little C++. Win win.

    To err is human. Fortune favors the monsters.

    P Offline
    P Offline
    PIEBALDconsult
    wrote on last edited by
    #3

    Ain't you a pip.

    1 Reply Last reply
    0
    • N Nelek

      honey the codewitch wrote:

      with a more or less true random

      care to elaborate?

      M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

      J Offline
      J Offline
      jmaida
      wrote on last edited by
      #4

      ditto

      "A little time, a little trouble, your better day" Badfinger

      1 Reply Last reply
      0
      • N Nelek

        honey the codewitch wrote:

        with a more or less true random

        care to elaborate?

        M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

        H Offline
        H Offline
        honey the codewitch
        wrote on last edited by
        #5

        I read the floating voltage from a n/c pin throuh an ADC

        To err is human. Fortune favors the monsters.

        F N 2 Replies Last reply
        0
        • H honey the codewitch

          I'm on a roll! *hides* No, but seriously I did. You shake the little M5 stack and 6 dice come up with a more or less true random. And he's so happy. It put me in a good mood. He learned a little C++. Win win.

          To err is human. Fortune favors the monsters.

          D Offline
          D Offline
          DRHuff
          wrote on last edited by
          #6

          You could have stopped at two dice but then it would have been total craps

          If you can't laugh at yourself - ask me and I will do it for you.

          P 1 Reply Last reply
          0
          • H honey the codewitch

            I'm on a roll! *hides* No, but seriously I did. You shake the little M5 stack and 6 dice come up with a more or less true random. And he's so happy. It put me in a good mood. He learned a little C++. Win win.

            To err is human. Fortune favors the monsters.

            D Offline
            D Offline
            den2k88
            wrote on last edited by
            #7

            This... this is actually beautiful. I can see it used in D&D when you have to roll 13d6 for a Fireball damage.

            GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

            1 Reply Last reply
            0
            • H honey the codewitch

              I read the floating voltage from a n/c pin throuh an ADC

              To err is human. Fortune favors the monsters.

              F Offline
              F Offline
              Fueled By Decaff
              wrote on last edited by
              #8

              That is pretty cool. I have always wanted to use the RDRAND instruction, but always been too lazy to get it working in C#

              1 Reply Last reply
              0
              • H honey the codewitch

                I read the floating voltage from a n/c pin throuh an ADC

                To err is human. Fortune favors the monsters.

                N Offline
                N Offline
                Nelek
                wrote on last edited by
                #9

                I played around for a project a while ago... I used the classical

                srand ((unsigned int)time(NULL));

                as seed but then the actual rand usage was only to initialize the three terms needed for a xorshift (George Marsaglia algorithm) of 2^96 period, was big enough for me and the fastest of what I tried (in the meanwhile I have read that 2x64 bits Xor-Shifts are faster with bigger range, but didn't test it myself yet) I liked it because I didn't need any external source and in all my tests I didn't catch a single repetition (played with it some months in my project).

                M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                H 1 Reply Last reply
                0
                • N Nelek

                  I played around for a project a while ago... I used the classical

                  srand ((unsigned int)time(NULL));

                  as seed but then the actual rand usage was only to initialize the three terms needed for a xorshift (George Marsaglia algorithm) of 2^96 period, was big enough for me and the fastest of what I tried (in the meanwhile I have read that 2x64 bits Xor-Shifts are faster with bigger range, but didn't test it myself yet) I liked it because I didn't need any external source and in all my tests I didn't catch a single repetition (played with it some months in my project).

                  M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                  H Offline
                  H Offline
                  honey the codewitch
                  wrote on last edited by
                  #10

                  It's much harder to do that if you don't have a built in clock! :)

                  To err is human. Fortune favors the monsters.

                  N 1 Reply Last reply
                  0
                  • H honey the codewitch

                    It's much harder to do that if you don't have a built in clock! :)

                    To err is human. Fortune favors the monsters.

                    N Offline
                    N Offline
                    Nelek
                    wrote on last edited by
                    #11

                    honey the codewitch wrote:

                    It's much harder to do that if you don't have a built in clock!

                    Fair enough... I didn't realize you were speaking about "Not a PC"

                    M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                    1 Reply Last reply
                    0
                    • D DRHuff

                      You could have stopped at two dice but then it would have been total craps

                      If you can't laugh at yourself - ask me and I will do it for you.

                      P Offline
                      P Offline
                      PIEBALDconsult
                      wrote on last edited by
                      #12

                      She only rolls the hard way already.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups