Jump to content
IGNORED

Cubiks (Rubik's Cube)


Andrew Davie

Recommended Posts

A non-black background lets me use black as a "border" colour for the cubes. This is a fairly major rework of the display, including a mask shape in the facet definitions. Much slower to draw, but the look/feel is much improved. I'll release a binary once I get the gazillion variations pixel-perfect.

 

The biggest difference here is when a layer/slice rotates, there is a "surface" on the layer/slice it is rotating on, and also the rotating layer/slice has an upper black surface too.  That's the black top-parts of the underneath layer in the video, and the top parts of the rotating layer. In previous versions this wasn't explicit; since everything was black, these surfaces were implied. Clearly I have one or two pixels to fix here and there... but that's only hours and hours and hours of work, so no biggie.

 

Tip: Right-click on the video and select "LOOP" to watch for a longer time :)

 

 

Edited by Andrew Davie
  • Like 4
Link to comment
Share on other sites

4 hours ago, orange808 said:

Does the white create any strain on your eyes? Looks like the green lines may soften the white a bit. If it's too bright, did you try one "shade" above black for the cube edges against a black background? 

 

The only actual colours here are red, green, blue, and no-colour (black).

So the white is actually just the red/green/blue on consecutive scanlines.  It does not hurt my eyes.

The only "shade" above black is one of red/green/blue, possibly the red but they're closely matched.

Given the combinations of red/green/blue there are only 8 possibilities and they form the multiple colours you seem to see here.

A cube has 6 faces, and so I need 6 of those 8 for the face colours. I could try "patterns" with multiple colours but I don't want to do that with this version.  That leaves 2 other "colours" or more to the point "combinations" that I can use.  One needs to be the cube borders, and the other has to be used for the background.  If I used red for the borders, then I couldn't really use red for a face, and so I'd have to use either black or white for the face, probably white.  I can't reduce the red intensity or change its colour because it's mixed to give the other colours, and those mixes are fairly critically chosen.  Besides, I think a coloured border mixed with the other colours on the faces would be garish and very hard on the eyes and more to the point not look much like a Rubiks cube at all.  Also, the draw system as it stands does not have the ability to draw the borders in any colour; they are actually formed by removing pixels, leaving nothing (black).  With the format of the facets being one bit per pixel, and another bit for the mask... I'd need to be changing this for using another colour for the border/mask... tricky.  So, I tried a bit of a mockup/hand-drawn look-see.

 

mockup.thumb.png.0d8643d96154ad68a2f9d19c3008e603.png

 

I'm not convinced this is going to work, but thanks for the suggestion.

 

 

Link to comment
Share on other sites

Getting the faces and slices aligned properly in the 2nd axis is super super tedious work. Video shows work-in-progress. What we're looking at here is when I rotate vertical "slices" (that's the 2nd axis). There's just one frame of rotation there (instead of 3) so it's pretty clunky. But it's correct I think as far as the actual manipulation of the cube goes. I just need to get the graphics looking good.  I'm starting to work with #defines in the code so I don't end up with lots of duplicate all-over-the-place numbers.  But it's tricky and not much fun work, so it's going slowly.  The constraints of the graphics and geometry are very tight and hard to work with.

 

The control is not locked to the draw at the moment, so the cube may be partially drawn when it switches to different axis drawing (drawing vertical slices instead of horizontal, for example).  This can cause a visual discontinuity/glitch which fixes up pretty quickly. That will be fixed once I have the three axes rotating correctly.  It's all looking very rough at the moment, but will come together nicely in the next week or so.

 

 

 

 

 

Edited by Andrew Davie
  • Like 6
Link to comment
Share on other sites

Slowly getting there. Axis 1 visuals much improved.

Controls:  up/down to change which part of the cube you're rotating.

left/right = rotate the selected part

button+left/right = crash

 

(binary in a couple minutes...)

 

Edited by Andrew Davie
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...