Recently I watched this video about someone who made a "2D" Rubik's Cube and figured this would be easy enough to duplicate. I re-wrote the game in java because that is what I learned in school so I could do it during classes and am now converting it to C for the TI84+CE.

I haven't gotten around to all the graphics but here's a little video of the progress I have made (I've only spent one night on it so far and all I need to add is colors and a better layout)



Game has been completed!
Download Here!
matkeller19 wrote:
Recently I watched this video about someone who made a "2D" Rubik's Cube and figured this would be easy enough to duplicate. I re-wrote the game in java because that is what I learned in school so I could do it during classes and am now converting it to C for the TI84+CE.

I haven't gotten around to all the graphics but here's a little video of the progress I have made (I've only spent one night on it so far and all I need to add is colors and a better layout)



Oh, carykh! Very Happy I watch that guys vids a TON because of his AI stuff. I didn't expect someone to port something like that to the CE, what about GOLAD? (Game of Life AND Death, it's also made by him)
I don't have much time to work on this but I finally got graphics somewhat working. The only problem is that some of the numbers in the array won't show:



The print function is

Code:
void printBoard(int pos, bool selec){
    int i, j;
    gfx_SetColor(0);
    gfx_FillRectangle(0,0,206,206);
    for(i = 0; i < BOARDY; i++){
        for(j = 0; j < BOARDX; j++){
            gfx_SetColor(colors[j][i]);
            gfx_FillRectangle(40*j+4,40*i+4,38,38);
            gfx_SetTextXY(i*40+14,14+j*40);
            gfx_PrintInt(board[j][i],2);
            gfx_SetColor(0xFF);
            if(selec){
                gfx_SetColor(0xF8);
            }
            if(!home){
                gfx_Rectangle(pos%10*40+3,pos/10*40+3,41,41);
            }
        }
    }
}


I have figured out that the problematic line is gfx_FillRectangle(40*j+4,40*i+4,38,38 ); but I can't figure out a way to fix this. Help is appreciated Very Happy
You do:

gfx_SetTextXY(i, j);

But set the rectangle with:

gfx_FillRectangle(j, i);
Quick Update. I spent the morning working on this a little bit more have finished almost everything I was planning for the game.
Things to add:
-Timer
-Move Counter
-High Score List for Time (Possibly)
-High Score List for Moves (Possibly)
-Speed everything up

The functioning part of the game is working now


P.S. Anyone have an idea for what color the selected box should be? Right now I have it outlined in pink but it doesn't stand out enough in my opinion.
matkeller19 wrote:
P.S. Anyone have an idea for what color the selected box should be? Right now I have it outlined in pink but it doesn't stand out enough in my opinion.

Maybe it should be a slightly darker shade of the color that's selected.
Also, I feel like there should be animations when you slide a tile.
Update:
I played around with the selected color and I'm not exactly set on how I want to color it (possibly just a bolder white outline OR add a symbol to the square selected such as "*"?)
Anyways, I took your advice and added sliding animations to the moves. Let me know how you think they look. I didn't want to make them too long as there will be a timer running with the game.

Anyways, let me know what you all think and what I should change/add Smile
Suggestion: Can you make the width between the boxes be 3 not 2? Then the selection box would look centered.

Keep up the good work!
A few changes have been made. By executive decision, I chose to have the row and column highlighted gold when a box is selected. Also, a move counter has been implemented with a high score (or I guess low score) app var.



I still need to add in the timer and its appvar but this is more of a weekend project although I had little homework today and was able to complete a lot.
Looks great! My only observation is that the numbers in each square might need to come down 3 or 4 pixels to be centered vertically - if you know what I mean?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
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 vote in polls in this forum

 

Advertisement