Finished Number Wizard with a Few Extra Capabilities

Check out my Number Wizard game, Savant.

I noticed opportunity for a few additions to the original Number Wizard game from the tutorial video.

I added a “Guesses Remaining” display to keep up with how many more tries the computer has to guess the player’s number.

I also added some code so that if you click higher or lower and the computer’s guess number doesn’t change, those clicks won’t decrease the number of guesses the computer has left.

A screenshot of my code is below. I’m not sure if I need the awake function in addition to a start function but I used awake to make sure the initial “guess” value is already on screen when the game begins.

I also decided to leave out the Quit option since this is a web build.

Please let me know if you have any feedback on how I could reduce the lines of code in the program, if you run into any errors/glitches, and what you think about giving the computer 15 attempts to guess the number.

Another idea I had is to add sound effects on button click but I haven’t learned how to do that yet and didn’t feel it was worth the time currently to try to learn it myself when I’m pretty sure Ben will be teaching me later. :smiley:

Also note, I decided not to put a ton of time into aesthetics because I am ready to move on to the next project in the course!

I had a lot of fun working on the UI for this game!

1 Like

Nicely done! For some reason the right 1/10 of play screen was cut off during play. I guess that screen sizing is a more advanced topic.

Thanks for playing and leaving feedback! If I ever step back into this project and make updates, I can address the display issue.

Hey, Corey Great Job with Number Wizard I was trying to figure out how to track computer guess and put it on the screen also. I am very new to C# and Unity are you experienced with C++ or C# or are you using any other resources?

The other thing I was trying to do was once you guessed 840 was to high you can’t go above 840.

Anyways well done man

Hi, Corey. I like the dialog feel of it. the instructions page at the begging is quite helpful. It is actually amazing to see how others may solve the same problem in 1000 different ways. This is my game. please let me know what you think I’ve added some overkill graphics :slight_smile:

dude it’s awesome. can you share your process with us?

hello,
Just a few words of encouragement. I liked the changes you made to the script- did the same ‘count remaining’ with mine. The if (guess !=guessPrevious) is in my opinion a wonderful, and simple solution to a repetitive integer (I’ve already compiled mine but I’m definitely keeping it in mind for the future; I always forget how powerful the != Equality Operator is and this was a good reminder to me).
OOOkay, now I’m rambling…

Keep up the good coding,

E~

Privacy & Terms