Try My unique text game

http://gamebucket.io/game/4f1e1ede-773a-43cb-ab45-c330e630a493 hey just finshed my first game and would really likeome feedback so please try it out, play it a few times as it is randomly different everytime.

Hey man,
Good job using buttons instead of key bindings. I have plans on going back and adding that to mine (since I know how to now!). I also love the trivia element to your game. You should add more of a story as well. Maybe each choice forces you to answer trivia or remember something that was previously mentioned in the story to succeed?
I also like how you added background images instead of keeping the mono color theme.

Overall great work, just add some more meat to the game and I will gladly play through it for you and offer feedback!

thanks for the feedback the game was just a start but dont know if you noticed that the button that has the right answer is different for each question which was tricky to code because of that i decided to use scenes instead of scripting the text i then had to figure out how to take variable values to different scenes .

yea, that is a tricky concept that I was dealing with when making the Brick Breaker game. Did you end up creating a new manager object and used DontDestroyOnLoad, or did you dabble with PlayerPrefs?

no i just made all the variables static i think thats the best way here so i can use them in other scripts

yea, I’m using statics as well, but everytime the player moved to the next scene (level), the score and life variables would reset. I fixed the issue by creating a new object which stored all that data and used the same don’t destroy method that they taught us for the sound manager. That resolved the issue and allowed me to continue using the variables in other scripts.

I didn’t have to do that send me your source code and I will tell you where you went wrong I am assuming you declared your vars in the start method or you didn’t call them by the script name ie
Scriptname.playerkey = 5;

I can send them once I get home. basically when you start a new scene, all your variables reset because the objects go through their start function again, so the problem was that they would either reset every level, or never go back to 0 once you lost and restarted. So I simply added that don’t destroy function on the statmanager and that resolved the issue.

the don’t destroy on load route works because I’m thinking that when you start a new level, every asset becomes a new instance of the same prefab, so the values revert back to their starting values regardless of where you initialize them. I’m still learning, so I could be wrong.

Right but if you declare them outside the start function they won’t reset unless you have that same funtion running in your new scene .

hmm, I can try that. It’s functioning perfectly right now, but that is good to know for future reference as well. Thanks!

There are advantages to both methods the donotdestroy method is good for things like the music in block breaker but my method is good when you want to manipulate variables in others scripts making your code and functions very reusable and also it’s easier to understand wants going on in your on program.

Privacy & Terms