Welcome to MSDN Blogs Sign in | Join | Help

Zune Clock - My first XNA application

Zune Clock 1.1

Encouraged by the positive feedback I've received so far, I did my best to stay away from GTAIV during the weekend and did some more work on the Zune Clock. So, I've added a new feature: the the ability to customize the background.

IMG_2781 
    What's new in this version:
    - New feature: Background customization (you need to have a few pictures on the Zune)
    - Bug: Fixed a bug which caused the settings data to become corrupt in some cases
    - Bug: Performance improvements (application loops slower than initially - a clock doesn't need a very high refresh rate)
    - Update: Using white color for the settings (it makes the text more visible when having a custom background)
    - Update: The application version is displayed when in setting mode
    - Code fix: Fixed the sources so that they compile fine on Debug
    - Code fix: Refactored some of the settings code to make space for future settings

Zune Clock 1.0

A few days ago, I've decided to give a try to the XNA CTP which allows creating applications for the Zune. So, I've started going through the tutorials and I've decided to create a Clock application. I know, XNA is meant to be used for writing games... but I always wanted to have a clock on the Zune :). I was impressed to discover that the Zune has an internal clock, which works even when the Zune is shut down. The only issue I had was that the time was a little bit off, and there was no way to set the internal clock. So I've added the ability to "adjust" the time displayed. Basically, you define an offset which gets applied to the hardware clock. The value gets saved so that the next time when you start the application, it will still show the correct time.

Description: Simple clock which displays the date and time. It allows adjusting the date and time displayed (it doesn't modify the internal hardware clock). The value gets saved and loaded the next time you start the application.

Features:
- displays the time
- displays the date
- allows setting the date/time
- the date/time adjustment is persisted so that the next time you start it you don't have to adjust it again.

Controls:
- Back Button - exits the application
- Pause Button - enters setting mode
    * Up/Down - increments the selected setting
    * Left/Right - cycles through the different settings (hours, minutes, seconds, days)
    * Click on the Zune pad - resets the adjustment to 0 (so that you will see the hardware date/time)
    * Pause/Back - exits setting mode

IMG_2770

 

 

IMG_2771

I hope you will find this application useful.

EDITED: This article explains how to install Games on the Zune: http://www.zuneboards.com/tip-of-the-week/how-to-install-games-on-your-zune.html

Published Friday, May 09, 2008 2:17 AM by adrianvinca
Filed under: , ,

Attachment(s): ZuneClock1.1.zip

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Zune Clock - My first XNA application

Friday, May 09, 2008 10:57 AM by Ron Bokleman

Love to see an alarm feature added – would replace my alarm clock assuming you had speakers attached you could play a specific song or sound some kind of alarm or tone.  

# re: Zune Clock - My first XNA application

Friday, May 09, 2008 12:49 PM by Doug

Adrian, AWESOME Job!

Like you, I have always wanted a clock on my Zune.

So how do I get this on my Zune without having to compile the project?

Can you make the necc files that need to be installed available? And instructions on how to get this on my Zune?

I know I'm asking for a lot but I'm not ready to install the XNA stuff just to get a Zune clock. BUT I WANT ONE!

Thanks!

Dugr

# Adrian Vinca's blog : Zune Clock - My first XNA application

Friday, May 09, 2008 2:54 PM by It's my life... And I live it...

Hey here is a clock on the Zune . At least this will work until one is actually added to the device.

# re: Zune Clock - My first XNA application

Friday, May 09, 2008 4:49 PM by adrianvinca

Thank you all for the feedback. I will try to reply to each of your questions:

- Alarm clock: before I can do that, I will need to figure out how the Zune power management works (I don't know if my application is shut down when the zune goes to standby). If that's the case, it may not be technically feasible at this point.

- Installing the app: as far as I know, curretly, the only way to install a "game" in the Zune is using the XNA CTP. The following blog post explains the process: http://www.zuneboards.com/tip-of-the-week/how-to-install-games-on-your-zune.html

# re: Zune Clock - My first XNA application

Sunday, May 11, 2008 10:14 PM by Blah

Maybe have an option to set the background white, I thought I read somewhere that it uses a lot less battery power.

# re: Zune Clock - My first XNA application

Tuesday, May 13, 2008 2:01 AM by ghostz

hey the alarm feature is not a bad idea how about a lil menue when u have the clock onand ur listening to music ur able to cahnge it and the volume!? please

# re: Zune Clock - My first XNA application

Tuesday, May 13, 2008 6:18 PM by adrianvinca

Well, I did some preliminary investigation into adding an alarm feature. The problem is that after 10 minutes, the Zune goes automatically into standby and my application doesn't get executed anymore. That means that it won't be able to trigger the alarm after more than 10 minutes.

I will keep investigating, and if I find some way to deal with that, I will definitely add an alarm.

Regarding the volume, please check the latest version (1.5):

http://blogs.msdn.com/adrianvinca/archive/tags/ZuneClock/default.aspx

Thanks,

Adrian

# how to make it work

Saturday, May 17, 2008 1:33 AM by david

how do you actually get this to work?

# re: Zune Clock - My first XNA application

Tuesday, May 27, 2008 6:31 AM by hazelnewbie

so how do i install the clock to the zune???

# re: Zune Clock - My first XNA application

Tuesday, May 27, 2008 1:50 PM by adrianvinca

Currently the XNA is in its early stages and it doesn't expose any way to create an installer for the XNA applications. The only way to install such applications so far is using Visual Studio and XNA. I know, I would also like an easier setup, but there is not much I can do about it for now.

The following article explains the process:

http://www.zuneboards.com/tip-of-the-week/how-to-install-games-on-your-zune.html

# re: Zune Clock - My first XNA application

Monday, June 09, 2008 5:31 AM by radray

this is the coolest if bill gates put time on the zune he would have got 10 billion 4 it  and you did it 4 free  thx sooooooooo   much   time on!

# re: Zune Clock - My first XNA application

Wednesday, June 25, 2008 3:59 PM by kyle

I dont know why microsoft wouldnt think of this first, apperently you were smart enough to

# re: Zune Clock - Play music?

Friday, August 29, 2008 2:05 AM by paul

is there a way to play music with the clock and still have control over the music without resetting zune?

# re: Zune Clock - My first XNA application

Tuesday, September 02, 2008 12:04 AM by aaron

because  i dont have a watch so thats why i need that!!!!

# re: Zune Clock - My first XNA application

Monday, September 22, 2008 9:13 AM by David

Theyve got one on the zune now btw

# re: Zune Clock - My first XNA application

Tuesday, December 09, 2008 6:27 AM by nik

Maybe the application and games installation need to be improved to make it easier to add, verify and remove.

Nik

http://www.zuneclan.com

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker