It is currently Wed Jul 06, 2011 7:22 pm

All times are UTC - 8 hours




 Page 1 of 1 [ 11 posts ] 
Author Message
 Post subject: Roguelike on a watch..
PostPosted: Thu Apr 07, 2011 7:40 pm 

Joined: Thu Apr 07, 2011 7:11 pm
Posts: 6
Hello,

Thank you very much for making this watch. I have finally achieved my dream: writing a roguelike that runs on a watch.

You can see it here: http://www.zincland.com/roguewatch/

So, questions/comments:

1) Where's the printf font stored?

2) Is code/const data shared? And "resources" packed into the same area? I was sailing along wonderfully until I realized I was down to a few hundred bytes of code.

3) Tips/tricks to keep code size down?


Offline
 Profile  
 
 Post subject: Re: Roguelike on a watch..
PostPosted: Fri Apr 08, 2011 1:29 pm 

Joined: Wed Mar 23, 2011 9:35 am
Posts: 54
That is insane. Well done!

Even tweeted about it

http://twitter.com/#!/Matt_Shea


Offline
 Profile  
 
 Post subject: Re: Roguelike on a watch..
PostPosted: Fri Apr 08, 2011 2:16 pm 

Joined: Tue Feb 15, 2011 10:35 pm
Posts: 42
Very cool game.
jlait wrote:
1) Where's the printf font stored?
The printf font is built into the OS.
jlait wrote:
2) Is code/const data shared? And "resources" packed into the same area? I was sailing along wonderfully until I realized I was down to a few hundred bytes of code.
Resources are actually stored in spiflash. Using resources instead of natively drawing an image will save on code space, but the trade off is drawing speed.


Offline
 Profile  
 
 Post subject: Re: Roguelike on a watch..
PostPosted: Fri Apr 08, 2011 4:53 pm 

Joined: Thu Apr 07, 2011 7:11 pm
Posts: 6
Ryan wrote:
Very cool game.

Thank you! Still very much a skeleton in terms of gameplay, but that takes time to build up.

Quote:
The printf font is built into the OS.


Yes, but is it stored as a bunch of bytes somewhere I can get a pointer to it? I've included an 8x8 font in my data section for the map, but would like to use the skinny printf font for messages to squeeze a few more characters in. And I don't want to include an extra font if it already is squirrelled away in the ROM somewhere.

jlait wrote:
Resources are actually stored in spiflash. Using resources instead of natively drawing an image will save on code space, but the trade off is drawing speed.


Ooh... Anyway we can get at that as arbitrary data? Like loadFromSPIFlash(destaddr, spiaddress, lengthinbytes)?

And, speaking of memory, I presume our stack starts at the end of our 8k RAM and grows down until we start overwriting our data segment. Is there anyway to monitor this other than prayer?


Offline
 Profile  
 
 Post subject: Re: Roguelike on a watch..
PostPosted: Fri Apr 08, 2011 6:21 pm 

Joined: Tue Feb 15, 2011 10:35 pm
Posts: 42
Quote:
Yes, but is it stored as a bunch of bytes somewhere I can get a pointer to it?
The SDK doesn't give access to the char table unfortunately. We may consider giving access to the font in a future release.
Quote:
Ooh... Anyway we can get at that as arbitrary data? Like loadFromSPIFlash(destaddr, spiaddress, lengthinbytes)?
Spiflash functions are also not exposed in the SDK. We are thinking of developing a system for storing lookup tables and other data in the spiflash.
Quote:
And, speaking of memory, I presume our stack starts at the end of our 8k RAM and grows down until we start overwriting our data segment. Is there anyway to monitor this other than prayer?
The stack actually starts at the end of the first 4k. I haven't looked very deeply into monitoring RAM usage. You might be able to get more info by looking into the g++ sourcery (local compiling on linux).


Offline
 Profile  
 
 Post subject: Re: Roguelike on a watch..
PostPosted: Fri Apr 08, 2011 7:08 pm 
User avatar

Joined: Fri Mar 04, 2011 8:54 pm
Posts: 82
Great use of the one button interface. I guess it's time for me to refresh on my morse code. Cool game! :)



_________________
Image
Get the most out of your watch - http://www.inpulsewatch.com
Offline
 Profile  
 
 Post subject: Re: Roguelike on a watch..
PostPosted: Sat Apr 09, 2011 10:19 am 
User avatar

Joined: Fri Mar 04, 2011 8:54 pm
Posts: 82
Posted a blog about it on our site...



_________________
Image
Get the most out of your watch - http://www.inpulsewatch.com
Offline
 Profile  
 
 Post subject: Re: Roguelike on a watch..
PostPosted: Sat Apr 09, 2011 12:30 pm 

Joined: Wed Mar 23, 2011 9:35 am
Posts: 54
Im having trouble loading apps with resources (mac OS X 10.6.7), I am trying to make a simple app to render the time centered in the screen.

What FONT can I pass into pulse_init_dynamic_text_widget() to just get the printf font?

Also, any thoughts on trouble using apps with resources? I uploaded the psycho clock and only get the colored boxes, as I suspect the font didn't make it over.

Clearly a newbie here. :)


Offline
 Profile  
 
 Post subject: Re: Roguelike on a watch..
PostPosted: Sat Apr 09, 2011 2:41 pm 

Joined: Wed Apr 06, 2011 8:53 pm
Posts: 32
So cool! Major kudos to you, sir!


Offline
 Profile  
 
 Post subject: Re: Roguelike on a watch..
PostPosted: Sat Apr 09, 2011 2:58 pm 

Joined: Sun Feb 27, 2011 8:32 pm
Posts: 139
Location: Where ever the USAF sends me.
MonkeyEnFuego wrote:
Im having trouble loading apps with resources (mac OS X 10.6.7), I am trying to make a simple app to render the time centered in the screen.

What FONT can I pass into pulse_init_dynamic_text_widget() to just get the printf font?

Also, any thoughts on trouble using apps with resources? I uploaded the psycho clock and only get the colored boxes, as I suspect the font didn't make it over.

Clearly a newbie here. :)

Try this line
python compileandload.py -d 12:34:56:78:9A:BC -r

The -r will load resources



_________________
Page ID: KTS
Offline
 Profile  
 
 Post subject: Re: Roguelike on a watch..
PostPosted: Tue Apr 12, 2011 7:58 am 

Joined: Wed Mar 23, 2011 9:35 am
Posts: 54
@Killer Turtle . Thanks. The cleared things up. I thought that was used to only refresh resources, and the base script would do everything.


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 11 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: