@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)
making a game
@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
pavvle, who are you saying “hey” to? Try just typing the name if the @ symbol keeps screwing up for you.
-- Tom Sloper -- sloperama.com
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>
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement