00:00
00:00
Newgrounds Background Image Theme

RunicPixels just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Console-based Rubik's Cube

1,419 Views | 10 Replies
New Topic Respond to this Topic

Console-based Rubik's Cube 2010-05-31 15:10:47


Took forever, but I made one. I wanna know what you guys think of it.

https://sourceforge.net/projects/console cube/files/

That's the first time I've ever used sourceforge, so I don't know if I fucked up my project or what, but I think that link should work.
This is also pretty much the only coding project I've ever done by myself outside of school, so the code itself is pretty primitive (for nearly 1000 lines).

Anyway, tell me what you think of the program and/or coding, please.
P.S. use 'help' or you probably won't figure it out.

Console-based Rubik's Cube


BBS Signature

Response to Console-based Rubik's Cube 2010-05-31 16:40:22


What would be even better, is if you rendered a rotatable 3D cube using just colored text.


#include <stdio.h>

char*p="#include <stdio.h>%cchar*p=%c%s%c;%cmain() {printf(p,10,34,p,34,10);}";

main() {printf(p,10,34,p,34,10);}

BBS Signature

Response to Console-based Rubik's Cube 2010-05-31 18:18:57


At 5/31/10 04:40 PM, Nano256 wrote: What would be even better, is if you rendered a rotatable 3D cube using just colored text.

"Console-based"

Console-based Rubik's Cube


PHP Main :: C++ Main :: Java Main :: Vorsprung durch Technik

irc.freenode.net #ngprogramming

BBS Signature

Response to Console-based Rubik's Cube 2010-05-31 19:40:52


At 5/31/10 06:18 PM, Jon-86 wrote:
At 5/31/10 04:40 PM, Nano256 wrote: What would be even better, is if you rendered a rotatable 3D cube using just colored text.
"Console-based"

I know, that would be the challenge of my proposal! :P


#include <stdio.h>

char*p="#include <stdio.h>%cchar*p=%c%s%c;%cmain() {printf(p,10,34,p,34,10);}";

main() {printf(p,10,34,p,34,10);}

BBS Signature

Response to Console-based Rubik's Cube 2010-05-31 22:41:02


At 5/31/10 07:40 PM, Nano256 wrote:
At 5/31/10 06:18 PM, Jon-86 wrote:
At 5/31/10 04:40 PM, Nano256 wrote: What would be even better, is if you rendered a rotatable 3D cube using just colored text.
"Console-based"
I know, that would be the challenge of my proposal! :P

You want it to look 3D, but still be in the console window?


BBS Signature

Response to Console-based Rubik's Cube 2010-05-31 23:13:56


Get the picture? Oh and I'm not necessarily asking you to try such a thing, but its an interesting thought (and would be completely awesome looking). Probably something I'd try to tackle if I get around to it.

Console-based Rubik's Cube


#include <stdio.h>

char*p="#include <stdio.h>%cchar*p=%c%s%c;%cmain() {printf(p,10,34,p,34,10);}";

main() {printf(p,10,34,p,34,10);}

BBS Signature

Response to Console-based Rubik's Cube 2010-06-01 00:57:05


It wouldn't be *hard* really... but incredibly tedious. Most of the code would remain exactly how it is. I would just need to change the part that actually displays the cube.
The first step would be to learn 3D graphics, which in itself would be very tedious. I would then need to translate that into the thinking that each letter is a pixel. I'm thinking that most 3D programming/art tutorials don't think in terms of individual pixels... Actually, it would be rather hard. There would be some hellish geometric calculations going on to make it look like the cube were rotating.
Much to tedious for my efforts. You can go ahead and try that though.


BBS Signature

Response to Console-based Rubik's Cube 2010-06-01 04:35:06


At 5/31/10 11:13 PM, Nano256 wrote: Get the picture?

The console don't have that range of colours and it would be constantly flickering. If your going to do 3D you might as well not use the console and properly render something.


PHP Main :: C++ Main :: Java Main :: Vorsprung durch Technik

irc.freenode.net #ngprogramming

BBS Signature

Response to Console-based Rubik's Cube 2010-06-01 04:47:45


If you really want to do this, you could probably use libcaca to make the 3d cube.

Response to Console-based Rubik's Cube 2010-06-01 16:22:34


I'm not interested in rendering a 3D cube to extend this. It's been done in the past, and it wouldn't be a challenge at all.


BBS Signature

Response to Console-based Rubik's Cube 2010-06-01 16:25:00


At 6/1/10 04:47 AM, kiwi-kiwi wrote: If you really want to do this, you could probably use libcaca to make the 3d cube.

Oh... that's pretty neat.
But still, I'm done with the cube. Anybody else that wants to can give it a shot.


BBS Signature