# My Cube Simulator



## Chrisalead (Oct 24, 2011)

Hello everybody.

I was playing with "jflySim" recently and I don't know if it's only on my machine but for any size bigger than 3x3x3, it is really slow.
So I took the decision to write my own simulator.

Here it is.

Short list of features :
- Runs under Windows XP (I don't know for Seven or other Windows versions).
- Simulate any cube size from 2x2x2 to 50x50x50.
- Everything is keyboard controlable, shortcuts for turns are (nearly) the same than in "jflySim" or "higames.net". With a few more.
- 15s inspection time.
- Full history of turns, so you have undo/redo for the whole solution.
- Replay mode.
- Solver for any cube size (from Ken Silverman and Ben Jos Walbeehm), pushes the solution to the history.
- Load/Save any cube state (with history).
- Pause solve (turns all colors to white to prevent cheating).
- Two ways to scramble the cube : randomly or paste from clipboard.
- Adjustable gap between facelets. Facelet outlining ( can be disabled).
- Possibility to change view using the mouse.

I used C++/OpenGL to make it. And I also used SFML library for conveniance (mouse + keyboard inputs, etc...).
You will also probably need to have Microsoft redistributable c++ 2008 libraries installed. You can find them here :
http://www.microsoft.com/download/en/details.aspx?id=29

IMPORTANT : I have an AZERTY keyboard, so you might have some problem using keys like A/Q, M/?, etc if you are using a QWERTY one. All you have to do is to press
the SHIFT and ALT key once together. It will toggle your keyboard between QWERTY and AZERTY, so the problem disappears.

Here is the link to download it :
http://dl.dropbox.com/u/28029645/Kube.zip

The zip includes a little "readme.txt" with minimal instructions (basically press F12 in the software to learn how to use it).


----------



## Pedro (Oct 24, 2011)

Is it possible that you release the source code so that we can modify the keys?
I don't like the rotations keys, I'm used to A/; for y axis (it is like that on jfly's).


----------



## Chrisalead (Oct 24, 2011)

They already are like in jfly's for these 2 keys. You seem to have a QWERTY keyboard. Just switch to AZERTY by pressing SHIFT + ALT simultaneously (once you are in the simulator's window). That will do it for now.
I'm planning to add an editable shortcut file.


----------



## Pedro (Oct 24, 2011)

It does nothing for me...(on the cube simulator...it changes my keyboard language, though).


----------



## vcuber13 (Oct 24, 2011)

is it changing it to azerty though?
on my computer it only cycles dvorak and qwerty


----------



## Rook (Oct 24, 2011)

Here are some problems:







Get that error every time I open the exe. The sim still works, though.

The Shift+Alt (did you mean Ctrl+Alt?) thing doesn't work if you don't have the Azerty layout in the language bar. I have Qwerty and Dvorak, so it makes it impossible to solve by doing that. I would _strongly_ recommend that you make it Qwerty by default since the large majority of us use Qwerty. This problem alone stops me from wanting to try a speedsolve on this sim since I can only do y' with letter Q and y with M.

I love the fact that you've got M slices, but I don't like the fact that they're right above the U keys. I can only moo quickly if it's M' U' or M U, and in other cases I have to reposition my middle fingers onto the M keys. If not that, I have to painstakingly go back and forth with my index fingers.

This thing has potential.


----------



## Chrisalead (Oct 24, 2011)

Ok ok, I knew that my AZERTY keyboard would cause some trouble ^^. I thought that the AZERTY mode was on every PC but it seems I was wrong !
I will add a shortcut definition file tomorrow and reupload the new version. And I will also set all shortcuts to QWERTY by default.
Any idea for better M/M' shortcuts ? In fact I don't like them neither.

Edit : I will also set antialiasing to 0 by default instead of 4.


----------



## Chrisalead (Oct 24, 2011)

Ok. I have uploaded a new version (same link). Now the keys are set for QWERTY keyboards (let me know if there is still something wrong) and default antialiasing is set to 0.


----------



## collinbxyz (Oct 24, 2011)

When I try to open the .exe, it brings up two windows (not sure if this is supposed to happen or not), and then it automatically says, "Kube.exe has stopped working"... I'll add pic in a sec.

EDIT:


----------



## aaronb (Oct 24, 2011)

collinbxyz said:


> When I try to open the .exe, it brings up two windows (not sure if this is supposed to happen or not), and then it automatically says, "Kube.exe has stopped working"... I'll add pic in a sec.
> 
> EDIT:
> *picture of problem*



Same thing happened to me, and I even downloaded C++ Redistributable 2008 thing, from the link at the top. Any suggestion, anyone?


----------



## Chrisalead (Oct 24, 2011)

The "2 windows" is ok, it's a console application so you have a DOS windos in addition to the Simulator window.

collinbxyz, it seems that you are under Windows Seven. I will get back another PC on Thirsday with Seven on it. If the problem is Windows Seven then I should be able to fix it.
Have you tried the compatibility mode of Seven (to launch an app as if you where running Windows XP) ?


----------



## aaronb (Oct 24, 2011)

Chrisalead said:


> The "2 windows" is ok, it's a console application so you have a DOS windos in addition to the Simulator window.
> 
> collinbxyz, it seems that you are under Windows Seven. I will get back another PC on Thirsday with Seven on it. If the problem is Windows Seven then I should be able to fix it.
> Have you tried the compatibility mode of Seven (to launch an app as if you where running Windows XP) ?


 
Compatibility mode worked like a charm. Thank you, I'll be glad to try out the sim.


----------



## Chrisalead (Oct 25, 2011)

I compiled statically to see if it works better under Windows Seven (after some reading on SFML and Seven). You can use the same link to download it.
Anyway, I am tired (it's 1 AM here ^^) and I work tomorrow so good night folks !


----------



## PandaCuber (Oct 25, 2011)

Anybody else get this?


----------



## vcuber13 (Oct 25, 2011)

put all of the files into a snigle area and run it from there, its because it cant find the necessary files to run the exe.


----------



## Chrisalead (Oct 25, 2011)

Ok I've uploaded a new version with a shortcut definition file. I have also included an AZERTY definition file for, well french users like me ? ^^. Anyway the default file is for QWERTY users.

Thanks for the feedback !


----------



## Pedro (Oct 25, 2011)

It used to work under Seven here in the first place.

Only now I realised you replaced the Rw with M'. I think I like Rw better...also, C and M should be Lw and Rw'.

F3 is not working for me (it should play the replay, right?)


----------



## collinbxyz (Oct 25, 2011)

The F12 wasn't working for me either... but I haven't and can't try the new version right now, since I gtg soon.


----------



## Pedro (Oct 25, 2011)

Also, are you considering making it calculate averages and such? It would be really nice.


----------



## Chrisalead (Oct 25, 2011)

Rw can be done with SHIFT + R keys. But I could add shortcuts for wide L and R turns I think.
For the replay, note that it replays from the current state (so if you just did your solve it will do nothing). First press "home" to undo all moves. Then press F3 to launch the replay.

I will add the statistics computation (in fact it's already done for another app I done to compute advanced stats from my CCT logs), but the text display part of my code is really ugly now, i have to do something better before I add more text ^^.


----------



## Chrisalead (Oct 25, 2011)

Ok I just added wide R and L turns shortcuts (by default the same that Pedro gave me except Lw which is V instead of C, but you can change it ^^).
I have put M turn on '1' and M' turn on '=' so you can reach them with the pinky.

You can find this version at the same place than the others (I juste overwrite the zip file each time).


----------



## ben1996123 (Oct 25, 2011)

I like it, just got my first sub 10 with it.


----------



## Chrisalead (Oct 25, 2011)

One thing I forgot to tell : Once you have solved the cube you immediately enter the replay state. You can navigate through the replay without activating the real time replay by using the undo/redo functions. Note that in that case, the time displayed is the time at the end of the move. Thus you can see how much time you took to do cross, F2L, etc...

This evening I will add a command line option to choose a shortcut file (for those who want to test different combinations without rewriting the file every time).

Edit : Nice one ben1996123 ! I never did better than 17.44 (and saved the replay ^^), and usually average between 25 and 30 with simulators. I'm definitely not as good with sims as with real cubes !

I will be glad to get some save file of sub-10 solves !
You just have to use the Save function (F1) right after your solve, it will save the entire history of that solve.


----------



## Pedro (Oct 25, 2011)

I'm going to try M turns on X and . keys, since I do M' with my right ring finger.

Edit:

Erm...how do I put the .? Dot?

Edit:

Never mind, I'm dumb...Period it is. And I actually use my left ring finger for M'.


----------



## ben1996123 (Oct 25, 2011)




----------



## Chrisalead (Oct 25, 2011)

Great but instead of a youtube video with a low framerate I would have prefered a .ksv file from my application ^^.


----------



## Chrisalead (Oct 25, 2011)

New version uploaded.

- You can now use any shortcut definition file you want with the command line option "-shortcut file.txt".
- When replaying, TPS is adjusted to avoid "cube cut", if you solve faster than the TPS used during solving (10 by default but you can easily be faster on a well known "keyboard PLL"). This really makes replays more nice.
- You cannot edit the Past Scramble From Clipboard shortcut anymore, it's CTRL+V as in any application ^^.


----------



## Chrisalead (Oct 27, 2011)

Another new version uploaded.

- You can now undo/redo by steps of 10/100/1000 using shift, control, shift+control key modifiers.
- You can modify the solver TPS (usefull because it is also used for the fluidify option described below).
- You can "fluidify" your solve (I mean the replay of course) : it does the same solution by with the solver tps, thus eliminating pauses plus it removes useless cube rotation (ex : x then x').
So once you did it with let's sasy 5 tps, nothing stops you to change the solver tps value and re-fluidify your solve.
- Added the TPS next to the number of turns at the bottom-left of the screen.
- Added some info text display at the top-left of the screen when you modify an option (to have a visual info) : displayed for now : tps, solver tps, cube size.

new / modified shortcuts :
TPS dec/reset/inc : 1, 2, 3
Solver TPS dec/reset/inc : numpad 4, 5, 6.
Gap between facelets dec/reset/inc : 7, 8, 9
Fluidify Solve : F8

Of course you can change them with the shortcut definition file.

Have fun !

I would really enjoy to get some of your solves as .ksv files ! Especially fast solves and big cubes fast solves too.


----------



## Chrisalead (Nov 20, 2011)

I finally found some time to work on the simulator again.

- Colors can be adjusted through the shortcut definition file (which is now an option file in fact).
- "-shortcut" command line renamed : "-options".
- Current Avg5 and Avg12 displayed at the top left corner.
- Screen displaying detailed Avg5 and Avg12 (new shortcut : F9 by default).
- Last Layer Trainer (to switch scramble mode press the new shortcut : / of the numpad by default).
- A few minor bugs removed.

Same link as before : http://dl.dropbox.com/u/28029645/Kube.zip


----------



## Hermanio (Dec 15, 2012)

Thanks for this simulator, I guess it will hold me over until I find something else. I haven't had the time to mess around with it, but does this have the option to turn the "invisibleness" off so that I could not see what's in the back and bottom layers?

Edit: already found it out, staying with this excellent simulator!


----------



## wassekaran (Jul 21, 2015)

Really rice cube simulator


----------



## 4th dimension (time) (Jan 14, 2017)

I've been using this program for a long time a really love it. However, it seems to not work anymore with Windows 10 64bit systems after a recent update to Visual C++  Could you fix this?


----------

