🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

making a game

Started by
16 comments, last by pavvle 3 years, 7 months ago

@undefined Do can i make a program in c++ when first will be runned random number 1 or 2 and than to write like if 1 is checked and random number == 1 to go next level which is similar. Can i do that if you understand? (player will need to choose between 1 and 2 at the start)

Advertisement

@undefined can i like make a code when if player click 1 for exemple and if a random number is 1 switch tova next level which is similar. (player will need to choose between 1 and 2) @undefined

@undefined hey

pavvle, who are you saying “hey” to? Try just typing the name if the @ symbol keeps screwing up for you.

-- Tom Sloper -- sloperama.com

@undefined i was though you are gonna say smth smart.

The simplest way is to write prototype in JS and rewrite it to C++ later. I think we need a button to start the game. When we click on the button the button must be hidden. Make a fork and write some code here: https://plnkr.co/edit/u4GpiN9BrbWmbjz6?preview

<!doctype html>

<html>
  <head>
    <title>Game</title>
  </head>

  <body>
    <a href="https://www.gamedev.net/forums/topic/708546-making-a-game/">
      Topic on GameDev</a>

    <br>
    <br>

    <button id="btnStart">Click this button to start the game</button>
    
    <script>
      var btnStart = document.getElementById("btnStart");
      btnStart.onclick = function() {
        console.log("hello");
        btnStart.hidden = true;
      }
    </script>
  </body>
</html>

@undefined bro answer

This topic is closed to new replies.

Advertisement