New Cube Timer for Nintendo DS

Looks great!
Do you mind if I write a function or two for you?
I'll just PM you the updated source or something and you can approve or deny whatever I do.

EDIT: BTW, I'm liking your source code

EDIT2: I made a few updates to the source (not a function, but whatever)
I added an inspection period before the timer starts (but it counts up to 15, instead of counting down).
After the first 15 seconds it starts like it normally does.
I also changed the CheckKeys function so that the timer starts on release (as requested), hopefully Zarxar liked what I did, but you all will have to wait until he posts it just in case he doesn't...
 
Last edited:
Wow, that was fast. I want to add in an option on the bottom screen to enable or disable the inspection period, and a sound effect for when its up. Also maybe it would be better to count down instead of up? Do you want to make those changes or shall I?
Making touch interface options is sort of a pain, but I've done it in another app before, so I have something to copy from. I'm really slow though.
 
The reason it was fast was because I didn't do anything too major...
I don't really know how to make it count down, so if you have any ideas - and as I was typing this I think I just figured it out.
I'm pretty much garbage at designing graphics and menus and what not. I probably could do the touch-screen button pressing (which is annoying I know), but I cannot design the graphics for it.

Also, during the week I have practically no free time, so don't expect me to work on it (although I might), but I definitely would like to work on it.

I've never done anything with sounds in PAlib, but it shouldn't be too hard to figure out.

Just tell me what you want me to do, and I'll do it.

Oh, and I think we should eventually work on creating a way to save recent times (and delete them) and show them somewhere on the bottom screen, so if you design a touch menu make sure to leave room for those times. If you are bad at graphic design too, then maybe someone else can draw up a menu for us.

EDIT: Made the inspection timer countdown (except it starts at 14.99 and it blinks at 0, but I think it works pretty well) check your PM box!
 
Last edited:
I'm also interested in collaborating,

I can add graphics, saving of times, support (scrambles etc) for multiple puzzles, touch screen interaction etc.

Will work on some stuff later and post if I make something nice :)

Thanks for the source.

Using the Touch Screen Stackmat Timer Style - will add graphics later
Note: works best with one hand to start/stop


Add TextInit to main
Code:
 // Initilize simple text on both screens
PA_InitText(0,1);
PA_InitText(1,1);

New CheckKeys function
Code:
// Function: CheckKeys
bool CheckKeys(bool timer_running)
{
   if (Pad.Held.Anykey || Stylus.Held)
   {
                       
   if (timer_running==true)
      {
      	PA_VBLCounterPause(0); 
      }  	
      else
      {
      PA_OutputSimpleText(0,0,0,"Ready...");
      } 
                       
   }
     
   if (Pad.Released.Anykey || Stylus.Released)
   {
      if (timer_running==true)
      {
      PA_VBLCounterPause(0);
      return false;
      }  	
      else
      { 
      PA_OutputSimpleText(0,0,0,"        "); 
      PA_Clear8bitBg(1);
      Scramble();
      PA_VBLCounterStart(0); 
      return true;
      } 
   }
}
 
Last edited:
Bounb: thanks but I don't think using touch screen will work great for many reasons already stated, most importantly of which is that we need the screen for options and stuff.

I'm going to work on a menu on bottom screen today, so maybe you can do either saving times, or multiple puzzle support (it will have to be set up to save different times for separate puzzles)?
 
Yeah, after testing the touch screen support for a while I find it works much better using the buttons as opposed to touch screen, but only if you use the touch screen with a hand/fingers (ie. a stylus works fine). This is because the low resolution nature of your finger gives false starts etc. The same effect happens if you use two buttons at once to start - sometimes it won't start.
Obviously a stylus is out of the question - however I think the stackmat style button hold, ready message and release to start the timer should remain.

Anyway - I'll have a go at multipuzzle/time saving. I'm not sure how it will display the saved times when you have lots of them.
 
Last edited:
I have a stackmat-style button hold implemented in my dev build right now which is working well.

As for displaying times, here is what I had in mind, but it's just an idea:
Display important times on the top screen, such as best time, average, 10of12, etc.
Then on the bottom screen, there will be various options, so I was thinking there can be a button which opens up a "time editor" menu, where you can view all of your times, and selectively delete them if one was a mistake.
 
Eventually I think there could be an option to show an algorithm that you are trying to learn. For example: we touch the button that says pll algorithms, then the touch screen menu changes and lists all of the algs by name, and if you touch one, it would show a picture of the pll and list the turns to solve it.

That probably shouldn't be implemented until after saving times and displaying them, though.

I think someone(or me) should start a google code page, so that we can be looking at the same source code at all times (I think it automatically updates when changed, but maybe it doesn't, I'm not sure)
 
Ok I have posted version 0.2 of the program, and a link to the new google code repository, back in the first post.
 
Last edited:
I tried to add support to NxNxN sized cubes, but now the timer doesn't work 20ish% of the time, so...
It probably has to do with the fact that I tried to not use a global variable for the size of the cube, and I suck at pointers (though I don't know how that would affect the timer?)
I'll see if I can work out the bugs...
 
I'm not sure how to download the latest revision from Google Code. Time saving is coming along...
 
I'm not sure how to download the latest revision from Google Code. Time saving is coming along...
If you give me a gmail email address i can give you access to it. Then you can use an svn client like turtlesvn to access it.

Can I use a global?
I can't deal with pointers...
How bad are a few global variables?

I don't have a huge problem with globals myself, except that I have always heard everyone say how evil they are. I dont really know what the problem is, honestly. Just write code however you need to to accomplish something, and if its bad maybe it can be changed around.
 
just wanted to chime in i think this is a great idea. Have to dig my card reader out (off to bed now but will def do this tomorrow) but am looking forward to seeing how this is coming along. :)
 
Back
Top