• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 40,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

New Cube Timer for Nintendo DS

Zarxrax

Member
Joined
Jan 7, 2009
Messages
1,282
Location
North Carolina
I just tossed together a very very basic timer for nintendo ds.
I am no longer developing this, but the code is available if anyone else wants to.

Features:
- stackmat-style start/stop
- displays the last 12 times (no averages though)
- screen can be flipped
- "algorithm viewer" for helping you practice and learn your algorithms. Requires you to supply your own images

Of course the main advantage of this application is that the nintendo ds is very portable, so you can time yourself wherever you go.

In order to use this, you just need a flash cart.

Download CuTiDS v0.5: http://amvhell.com/stuff/ds/CuTiDS-0.5.zip
Code Repository: http://code.google.com/p/cutids/
 
Last edited:

Zarxrax

Member
Joined
Jan 7, 2009
Messages
1,282
Location
North Carolina
I've updated it to use 25.

Yea, time records are something that I'm thinking of possibly implementing, but it's difficult. And that would probably come later after I make it look a bit more pretty.

Other features I'm thinking of are an inspection time, and a "stackmat mode", where you have to hold buttons on both sides of the ds, then the timer starts when you let go.
 

36duong

Member
Joined
Mar 24, 2008
Messages
147
Location
Australia
WCA
2009DUON01
few questions before i try it,

does it calculate averages of 5 and 12?

does it store time? (i wouldn't imagine creating a .sav file would be hard)

are any other cube sizes going to be added in the new future? (eg. 2x2x2 wouldn't be hard, just make the code to use R, F and U)

I would try it, except I am currently in the United States for SFO 09, and don't have a micro sd card reader.
 

Musturd

Member
Joined
Mar 3, 2008
Messages
247
WCA
2009KASE01
YouTube
Visit Channel
Please continue working on it!
Maybe add a function to touch the touch-screen to start/stop the timer\
Also adding a background picture would be nice

If you need help with PAlib, I have some experience with it but not much...
 

Zarxrax

Member
Joined
Jan 7, 2009
Messages
1,282
Location
North Carolina
does it calculate averages of 5 and 12?
does it store time? (i wouldn't imagine creating a .sav file would be hard)
It only does what I said in the first post, so no. Simply saving times isn't necessarily hard in itself, but theres a lot of other little stuff that goes along with it. For instance, if it saves times, then you probably want to view some of the previous times as well. This requires creating some sort of interface for viewing times. Then there are questions such as how many times should it store? All times? Should it keep a database so you can look at your times from a year ago and see how you progressed? It's suddenly turned into a very complex problem.

are any other cube sizes going to be added in the new future? (eg. 2x2x2 wouldn't be hard, just make the code to use R, F and U)
I hadn't thought of it, but its a possibility. This complicates the previous issue of storing times, though.

Please continue working on it!
Maybe add a function to touch the touch-screen to start/stop the timer\
Also adding a background picture would be nice

If you need help with PAlib, I have some experience with it but not much...

I had thought of using the touch screen, but it doesn't always register a touch if you slap at the screen, which I imagine most people would do, so it's probably better to just leave the bottom screen open for selecting options and such. If you want to help, its definitely welcome, because I *suuuuck* at programming.
 

julesv

Member
Joined
Jan 7, 2009
Messages
82
Location
London, England
This is OK. I emulated it on my mac and it works fine. Could have better graphics. The Font is good. I would also make longer scrambles. I have a question... Did you use the DS developer kit to make this if not what?
 
Joined
Aug 11, 2008
Messages
55
Location
Calgary, Alberta
I am very interested by this. Maybe it could do averages of 5 and 12 (or just a running average and you can stop whenever you want) and it would save a maximum of say, 5-10 solves depending on whether you want to save the session or not.
The DS would be viable for the touchpad type deal since buttons are located on opposite sides of the DS.

Saving times wouldn't even be a priority, I think as long as it generates good scrambles and allows handy start/stop functions then it will already be a very good cube timer. I bring my DS around with me anyway, so this would actually be pretty useful.
It is better than that cube scrambler on my phone which only provides scrambles and doesn't record time.
 

Bounb

Member
Joined
Jan 29, 2008
Messages
99
Cool, I started making one a while ago but never finished it.
Would you mind disclosing your source code?
 
Last edited:

Musturd

Member
Joined
Mar 3, 2008
Messages
247
WCA
2009KASE01
YouTube
Visit Channel
Yes, open your source please!
(or just PM it to me :) )

Back in the summer, I noticed that someone was developing a homebrew game that I was really interested in, so I asked if I could work on it. When he sent me the source code, though, this is what it looked like:

Code:
while (1)
	{			
		MyCounter++;
		Move10--;
		Move11--;
		Move12--;
		Move13--;
		Move14--;
		Move15--;
		Move16--;
		Move17--;
		...
		hit10++;
		hit11++;
		hit12++;
		hit13++;
		hit14++;
		hit15++;
		hit16++;
		hit17++;
		hit18++;
		hit19++;
		hit20++;
		hit21++;
		hit22++;
		hit23++;
		hit24++;
		hit25++;
		hit26++;
		hit27++;
		hit28++;
		hit29++;
		hit30++;
		hit31++;
		...
		hit51++;
		hit52++;
		hit53++;
                ...
                if (MyCounter == 1){ note = 10; Move10 = 270; hit10 = 0; PA_SetSpriteY(1,10,6);}//g
		if (MyCounter == 2){ note = 22; Move22 = 270; hit22 = 0; PA_SetSpriteY(1,22,53);}//r
		if (MyCounter == 22){ note = 11; Move11 = 270; hit11 = 0; PA_SetSpriteY(1,11,6);}//g
		if (MyCounter == 23){ note = 23; Move23 = 270; hit23 = 0; PA_SetSpriteY(1,23,53);}//r
		if (MyCounter == 30){ note = 12; Move12 = 270; hit12 = 0; PA_SetSpriteY(1,12,6);}//g
                ...
                if (MyCounter == 15630){ note = 28; Move28 = 270; hit28 = 0; PA_SetSpriteY(1,28,53);}//r
		if (MyCounter == 15631){ note = 38; Move38 = 270; hit38 = 0; PA_SetSpriteY(1,38,101);}//y
		if (MyCounter == 15650){ note = 29; Move29 = 270; hit29 = 0; PA_SetSpriteY(1,29,53);}//r
		if (MyCounter == 15651){ note = 39; Move39 = 270; hit39 = 0; PA_SetSpriteY(1,39,101);}//y

This code was so terrible I basically started over... and ended up not finishing, but that's beside the point. If you are new to programming, you need to get in the habit of organizing your code. Obviously you shouldn't have that much code right now because the app is pretty basic, but just so you know...

Anyway, I'd love to have a look at your source and work on your app with you.

Did you use the DS developer kit to make this if not what?
He used PAlib which is a wrapper for a library in the unofficial DS development kit, devkitPro, called libnds. PAlib is 1000x easier to understand if you are not experienced with low level programming (and I am not). I tried to develop without PAlib for a few weeks, but there are not many tutorials for libnds out there. PAlib is very well documented and has very good tutorials.
Hopefully this makes sense...
 
Last edited:

panyan

Member
Joined
Dec 16, 2008
Messages
892
Location
London, England
a few ideas:
1) use touchpad and have two areas that you need to touch with your hands like a stackmat
2) saves your best three solves
3) more cubes/puzzles
4) official scramble length
5) logs your solves and gives statistics about them
 
Last edited:

*LukeMayn*

Member
Joined
Apr 11, 2008
Messages
1,081
Location
New Zealand, Auckland
WCA
2009MAYN01
YouTube
Visit Channel
a few ideas:
1) use touchpad and have two areas that you need to touch with your hands like a stackmat
2) saves your best three solves
3) more cubes/puzzles
4) official scramble length
5) logs your solves and gives statistics about them

1. no he shouldn't cos you might damage the screen slamming your hands down
2. no opinion
3. for sure
4. it is :/
5. this is a MUST
I think you should have the timer bigger to... like the whole top screen and then have the scramble on the bottom screen.
I also think that you should be able to hold down a button and when you RELEASE it, the timer starts.
 

Zarxrax

Member
Joined
Jan 7, 2009
Messages
1,282
Location
North Carolina
Ok I have posted a new version (ill call this v0.1), with larger, better fonts. It's rather sad that it took me the entire day today to figure out how to do that :\
Source code is also up now.
 
Top