Game Development Community

dev|Pro Game Development Curriculum

What Time is It?

by David Higgins · 04/30/2007 (8:32 pm) · 11 comments

Ok, the title might sound strange, but ... my 6 year old just recently got a watch as a gift and now she needs to know how to read it to tell what time it is ... immediately, I thought to myself, "What a great thing to do in TGB!". So, what did I do ... I whipped together a real quick clock in TGB so that she can experiment with things ... right now, it's extremely rough and doesn't really do much ... but with a little more time and thought put behind how to turn it into a really useful educational tool ... I'm sure it will be useful, as it is now ... I can move the hands and ask her to read the clock ... then get her feedback, etc ... no need to play with the old analog clock in the closet ... or drawing things down ...

This entire thing took about, 10 minutes ... not counting the 15 minutes I spent in Photoshop making the artwork (yes, I made all the artwork myself, no, I'm not an artist)

www.zoulcreations.com/images/stories/WhatTimeIsIt/image1.jpg

I've also created a small problem generator for her, called "It's Math", which can be found on my website:

It's Math - Download

I'm not exactly sure which version of "It's Math" is currently on my website, but the latest version that she's been playing with uses art work from ArtPakz.com (specifically, Lady Bug Run) -- It uses the fruit images as 'counter' objects and a simple t2dTextObject to display the problem ... I used some free artwork from BittBox to implement an 'on screen keyboard' of sorts ... so she can use the mouse to enter the numbers. It updates the t2dTextObject in real-time, so as she enters numbers (keyboard or mouse) the t2dTextObject is updated so it looks like she's actually typing into a 'text box' ... she seems to enjoy it, even though it's extremely basic.

Anyhow ... I figured I'd write this post so that anyone out there with kids and thinking of whether or not to pick up TGB ... has some good reasons to do so -- Educational software for kids is hard to find, especially software thats useful and actually educational ... so ... everyone should start making some, :)

I place the code and artwork to "What Time Is It" on TDN as a working example of simple game functionalities (Rotation and Mounting)... but basically, here's the simple side of things;

The clock hands, as you can see, are not the same size as the clock face, so rotating them obviously would cause a weird effect ... so what I did was create a t2dSceneObject (invisible object) and made it the size of the clock face graphic, then mounted the Small Hand to it ... and I rotate this t2dSceneObject ... to rotate the small hand around the clock ... the same logic is applied to the big hand ...

Rotating clock hands to tell the time is fairly simple too, 24 and 60 divide into 360 perfectly and you get 30 and 6 ... so, a rotational increment of 30 increases the small hand by one hour, and a rotational increment of 6 increases the big hand by 1 minute ... fairly simple, and kind of neat, eh?

The up/down buttons with the words "HOUR" and "MINUTE" are basically just attached to functions that change the rotation of the small and big hands ... there is also a function called "updateCurrentTime()" that is going to be attached to a hot-key (enter or something) so that the teacher (parent) can move the clock hands ... without actually visually displaying the digital version of the time ... and then ask the child to read the clock, when the child answers, the teacher (parent) can then hit the hot-key to let the kid see the correct answer ...

I'm thinking of adding in some game play ... where perhaps the clock randomly changes time and the child has to answer the question of "what time is it" to advance to the next question ... any idea's on how to make a "how to read an analog clock" game fun for kids, let me know.


#1
04/30/2007 (8:42 pm)
I am going to need to work out a way to use this approach to explain the birds and the bees to my niece :)

great work :)
#2
04/30/2007 (8:47 pm)
Ashley,

Neo Binedell created this really cool rag-doll like animation script, called "Poser" -- that might help illustrate things a little ... but ... I dunno if it'd be kid friendly at that point ;)


#3
05/01/2007 (12:59 am)
I like the clock one...

Telling the time seems to be something missing from my girlfriends kids school lessons... that game/app would really help them.
#4
05/01/2007 (7:33 am)
Good idea David, not bad for less then half an hours work :0)
#5
05/01/2007 (8:49 am)
uh... Isn't the small hand the hour hand... So that would not be 8:00 ... it would be 11:40 ...
#6
05/01/2007 (10:11 am)
Shh. His reality is fragil enouh as it is...
#7
05/01/2007 (10:42 am)
Hehehe David needs to learn how to tell time as well ^_^
#8
05/01/2007 (10:44 am)
see, thats the beauty of a blog ... you can say whatever you want, even if it's wrong ;)


Hrm, in my defense, I haven't read an analog clock in ages ... ;)


But yeah, I'll fix that right away ... thanks for pointing it out ... I'm impressed too, the jokes were minimal ;)
#9
05/01/2007 (6:02 pm)
Ok -- i've updated the plan and the TDN article to reflect the 'correct' hand assignments ... and WOW ... :)
#10
05/01/2007 (9:47 pm)
I've updated the program this evening, added sounds (currently not distributable -- used a TTS Demo) and a particle effect of butterflies floating around behind the clock (for flare, haha, it's amusing looking) ...


Audio Datablocks are a pain in the ass -- I think there should be an Import Sound functionality (not sure, might be in 1.5 -- not in 1.1.3)
#11
05/02/2007 (12:50 am)
Very true, audio datablocks could definitely benefit with a more intuitive way of importation. Hmm, that sentence sounds a little geeky, oh well...