Skip to content

W4 With Stars


2016-10-10 JoQuiz Stars.png

This is a upgrade of a quiz game I made this summer and have been adding content to for the last months.

This week I added stars. And a incentive for repetition; when a quiz are completed the player gets a star and the quiz is locked for one day. If the player completes the quiz another time, s/he gets another star and the quiz is locked for three days, and then for six days. On mobile the player gets a notification when a quiz is unlocked.

Unfortunately I have no test quiz. The current content are made for a university course, and hard if you haven’t attended the corresponding classes. So no playable build this week.


Programming Issues – Its a lot more time consuming to work in unity then in construct. I spent some time in the beginning by just updating the software and downloading a new version of Java SDK, because the notification plug in needed the latest updates(to put it in perspective, as much time as I spent in the last project to make the first playable version). I also spent a lot of time of finding a solution to a null reference exception in a array. I have done a fair amount of these in my days as a programmer, but the problem here was that I had a class (A) with a array of another class (B). When I initiate class A I get the error when I try to access the array objects. The problem was because I expected the Start() function to work as the first thing that happens when a object is created. It usually does. The problem lies in that, I think, it only activates Start() when a script is attached to a object in the unity editor. So the line in class A which initiates objects of class B never run.

Hard to play test – I also couldn’t play test the game, because of how hard the questions are. I mean I could play test it but it wasn’t something I would do “for fun”. In the other projects most of the moments when I would sit down with the games was because I wanted to play them, and when I played I wanted to tweak something, or add something. And suddenly two hours later… :) It didn’t work like that in this project. Also it actually was just at the last moment when everything came together, so I couldn’t have play tested it before. Its kind of a miracle that the game came together at all… :)

Date and time data – It was nice to work with storage of date and time, and compare it to the current time (System.DateTime.Now). I expected it to be complicated, but worked well. I have some ideas for other games, like changing some content depending on what day of the week you play, or like what season it is.

Saving – For some reason I have not included saving in any of the other games projects I have worked on. In a way its because most of them are pretty short and don’t really need it. But in another way its because I expected it to be complected to implement, and not worth the extra time. Anyway, now I know how to implement it in unity, and will probably use it in other projects (I used the singleton control object, in all scenes which store the data in runtime and saves it to a binary file when needed. Heres the tutorial: Unity persistence).

Notifications – Local notifications are implemented. Its pretty cool, but I didn’t have the time to explore different alternatives. Also I used local notification which don’t require internet connections, the only problem is that the notification will reset when the device is turned off. Most people don’t do it that often, but it happens fairly often when the battery runs out. Also theres no equivalent to notifications for pc. Maybe mail, bu that that require a different technical solution.

Anyway, I am glad that I manage to complete this project and I will start to feed it with questions this week for a upcoming exam. P.S. it takes a lot more time to write questions then what you would expect.



From → All

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s