Author |
Message |
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 07 Nov 2007 01:00:00 am Post subject: |
|
|
As my first real attempt at assembly, I'd like to present this as-yet-unfinished Rubik's cube program. (You may have seen me announce my plans for it on my blog, in not as many words)
Here's a screenshot of it in action -
[attachment=1997:attachment]
Right now all the actual workings of the cube are finished - it's for the MirageOS and saves your state when you exit. I plan to add more features later, and also optimize the code to a (hopefully, much) better size than it is right now.
For people who want to try it, and I urge you to because I want feedback, the program is attached. The controls are as follows: CLEAR exits, arrow keys rotate the cube, and pressing three number keys such as 1,2,3 in order (which I hope can be done by brushing your finger against the keyboard) rotates a layer of the cube in the intuitive way - imagine that the number pad is the front face of the cube. I hope this isn't a disgusting method of controlling the cube, because I had fun coming up with it.
Please try it and tell me what I can improve on (in every aspect - graphics, user interface, speed, anything). Also, I haven't tested it on an actual calculator, only on PindurTI, so I may have missed things.
Edit: fixed a typo which caused the calculator to cheat and switch stickers.
Edit: additional controls: holding down MODE for a couple seconds resets the cube, while holding down XTΘn for a couple of seconds scrambles it.
Last edited by Guest on 09 Nov 2007 12:01:31 am; edited 1 time in total |
|
Back to top |
|
|
tr1p1ea
Elite
Joined: 03 Aug 2003 Posts: 870
|
Posted: 07 Nov 2007 02:19:19 am Post subject: |
|
|
Looks pretty sweet DarkerLine, top job i say . How are you handling the cube, with sprite sections or some other approach? |
|
Back to top |
|
|
Harrierfalcon The Raptor of Calcs
Super Elite (Last Title)
Joined: 25 Oct 2006 Posts: 2535
|
Posted: 07 Nov 2007 07:32:54 am Post subject: |
|
|
This should be interesting . Looks good so far, DarkerLine!
Any chance of grayscale? |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 07 Nov 2007 11:52:38 am Post subject: |
|
|
tr1p1ea wrote: Looks pretty sweet DarkerLine, top job i say . How are you handling the cube, with sprite sections or some other approach?
[post="115598"]<{POST_SNAPBACK}>[/post] I had sprites for each of the colors (maybe textures would be a better word) and masks for each of the locations the colors could go.
Harrierfalcon wrote: This should be interesting . Looks good so far, DarkerLine!
Any chance of grayscale?
[post="115601"]<{POST_SNAPBACK}>[/post] It's certainly feasible considering I'm just waiting for a keypress most of the time, but I worry about how it will look. If all six colors are different shades of gray, they may be difficult to tell apart, and if I use a combination of grayscale and texture, I think that would be ugly.
Would it be worthwhile to make it Ion compatible? It nearly is, anyway.
Edit: after playing around with it, I came to the conclusion that the arrow keys should be reversed (should you download the program and try it, let me know if you feel this way too, or not). Unfortunately, I can't switch that right now, since I'm halfway done solving the cube on the emulator and don't want to overwrite that with a new program.
Edit: I've solved my first virtual cube! The program is updated, too (check the first post again). I'm not sure if I should leave it how it is (just a virtual cube) or add options like resetting it and scrambling it.
Edit: After some optimizing the program is now somewhere around 2/3 of what it was initially.
Edit: I added a reset function - holding down MODE for several seconds resets the cube. This made the .8xp file exactly 2000 bytes, making me loath to add any more unnecessary features. I'll probably upload it places Sunday or so, giving anyone who wants time to tell me what still sucks.
Last edited by Guest on 08 Nov 2007 04:59:05 pm; edited 1 time in total |
|
Back to top |
|
|
Liazon title goes here
Bandwidth Hog
Joined: 01 Nov 2005 Posts: 2007
|
Posted: 08 Nov 2007 07:00:15 pm Post subject: |
|
|
Harrierfalcon wrote: This should be interesting . Looks good so far, DarkerLine!
Any chance of grayscale?
[post="115601"]<{POST_SNAPBACK}>[/post]
o.o geez, I must be blind cuz I thought it was gs. The dithering's good |
|
Back to top |
|
|
justusdude
Advanced Member
Joined: 24 May 2006 Posts: 265
|
Posted: 08 Nov 2007 11:25:19 pm Post subject: |
|
|
I would suggest adding in scrambling. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 09 Nov 2007 12:01:45 am Post subject: |
|
|
Done |
|
Back to top |
|
|
elfprince13 Retired
Super Elite (Last Title)
Joined: 11 Apr 2005 Posts: 3500
|
Posted: 09 Nov 2007 11:05:12 am Post subject: |
|
|
DarkerLine wrote: Would it be worthwhile to make it Ion compatible? It nearly is, anyway.
yes. it is.
also, 2 things I'd like to see are the ability to save cubes to an external file that you can then load onto another calculator (and perhaps for the cube to remember its original state as well, so people can "trade" cubes), as well as perhaps a built in solver. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 09 Nov 2007 11:46:29 am Post subject: |
|
|
elfprince13 wrote: DarkerLine wrote: Would it be worthwhile to make it Ion compatible? It nearly is, anyway.
yes. it is.
also, 2 things I'd like to see are the ability to save cubes to an external file that you can then load onto another calculator (and perhaps for the cube to remember its original state as well, so people can "trade" cubes), as well as perhaps a built in solver.
[post="115733"]<{POST_SNAPBACK}>[/post]
Those last two are rather complicated - I'm not sure I even know how to write a cube-solving algorithm. And I don't quite follow the point of trading cubes. Right now the cube is stored internally so you could just send the program to someone else.
But I think I've got the Ion compatibility down - I've made a version for MirageOS and a version for Ion. In fact, I should probably be able to compile the Ion version for the TI-83 as well, but that will take some time as right now I'm using Justin W's UTI-SDK which only seems to work for the 83+.
Last edited by Guest on 09 Nov 2007 12:07:16 pm; edited 1 time in total |
|
Back to top |
|
|
luby I want to go back to Philmont!!
Calc Guru
Joined: 23 Apr 2006 Posts: 1477
|
Posted: 09 Nov 2007 09:37:35 pm Post subject: |
|
|
would this help? |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 09 Nov 2007 11:01:27 pm Post subject: |
|
|
Possibly, but what I'm considering is a form of cheating. It seems wasteful to write an algorithm that will solve each position independently. Instead, the algorithm could maintain a solution sequence, and update it with each new move. I don't know if this will be any better than the other way, but it's worth looking at. |
|
Back to top |
|
|
magicdanw pcGuru()
Calc Guru
Joined: 14 Feb 2007 Posts: 1110
|
Posted: 10 Nov 2007 12:28:03 pm Post subject: |
|
|
That would work, but imagine someone solves it correctly up until the last few steps that they can't remember, so they click solve to see how it's done. The cube would then proceed to re-scramble itself before unscrambling in an atypical fashion. I think that would be very annoying to the person who wanted to learn how to solve it themselves. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 10 Nov 2007 12:30:50 pm Post subject: |
|
|
magicdanw wrote: That would work, but imagine someone solves it correctly up until the last few steps that they can't remember, so they click solve to see how it's done. The cube would then proceed to re-scramble itself before unscrambling in an atypical fashion. I think that would be very annoying to the person who wanted to learn how to solve it themselves.
[post="115783"]<{POST_SNAPBACK}>[/post] Obviously I wouldn't do that. What I want to do is to learn to simplify the sequence in some way, so that at every point the sequence is the shortest possible, or at least fairly efficient. This is pure fantasy of course but I want to see if it can be done. |
|
Back to top |
|
|
AaroneusTheGreat
Advanced Member
Joined: 01 May 2007 Posts: 290
|
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 10 Nov 2007 03:42:22 pm Post subject: |
|
|
Well, obviously it's possible to solve the Rubik's cube. That is not what I am curious about. I want to know if it's possible to find a shortcut to figuring out how to solve it, using the method I outlined... |
|
Back to top |
|
|
simplethinker snjwffl
Active Member
Joined: 25 Jul 2006 Posts: 700
|
Posted: 10 Nov 2007 06:41:29 pm Post subject: |
|
|
Are you talking about something like God's algorithm? If the computer is powerful enough, I think it would be possible for it to come up with a few (hundred-thousand, maybe more) ways to do it (based on some pre-programmed strategy) and then test to see which ones were the shortest, so you would get practically the best way to solve it, but it would take a while to test them all. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 10 Nov 2007 09:19:54 pm Post subject: |
|
|
Of course, I could just implement a conventional algorithm, but that would be no fun.
I mean, I'm probably not going to implement any sort of Rubik's cube solving at first, that will have to wait for a new version.
Last edited by Guest on 10 Nov 2007 09:24:08 pm; edited 1 time in total |
|
Back to top |
|
|
elfprince13 Retired
Super Elite (Last Title)
Joined: 11 Apr 2005 Posts: 3500
|
Posted: 11 Nov 2007 01:05:51 am Post subject: |
|
|
a student in one of my dad's classes a few years ago wrote an interesting applet that does it step by step, which actually got picked up by the Rubiks company, and is available somewhere on their website....he's also one of the worlds fastest rubiks cube solvers. anyhow, I doubt the source is publicly available, but there are some fairly effective java decompilers available. |
|
Back to top |
|
|
|