3D Console Game interface

  • (6 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • Last »

85 Replies - 2465 Views - Last Post: 02 June 2017 - 02:18 PM

#16 s23bog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 79
  • Joined: 02-May 17

Re: 3D Console Game interface

Posted 07 May 2017 - 12:39 PM

When actually writing code, it is probably easier to just use numbers. Though being able to reverse strings could be useful for displaying corners other than 000. For now, in the planning stages, I think humans benefit from looking at uniq identifiers. I actually tried using Caps, lower case, and numbers in my first attempt at arranging coordinates in drive notepad. I didn't like it. I prefer the lower case letters.

Anyhow, going to a single character identifier for each space, on a 3x3x3 cube again, and highlighting for parity odd spaces, we wind up with this:

3x3x3 cube with inverse

It just seems like this is worth looking into.

This post has been edited by s23bog: 07 May 2017 - 12:41 PM

Was This Post Helpful? 0
  • +
  • -

#17 s23bog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 79
  • Joined: 02-May 17

Re: 3D Console Game interface

Posted 07 May 2017 - 12:46 PM

PS Did you notice what the last space on the 7x7x7 cube is numbered, when using letters a-g, h-n, and o-u?
Of course, that would be 666 if using 0-6 for each axis, and 777 if using 1-7 for each axis.
Was This Post Helpful? 0
  • +
  • -

#18 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 5830
  • View blog
  • Posts: 19,870
  • Joined: 05-May 12

Re: 3D Console Game interface

Posted 07 May 2017 - 01:49 PM

The last time I had to deal with trying to represent a 3D space on a console UI was to do 3D tic-tac-toe. At that time I labels all the spaces A-Z+0, but instead of trying to present some kind of odd isometric view, I presented 3 orthographic views or each plane depending an the particular plane of view. This was back when the first VGA cards were being introduced for the PC, and monochrome Hercules cards were still the standard video card.

Obviously, 3x3 for tic-tac-toe is much easier to try to display as well as give the player half a chance of understanding what is being shown to them.

My thoughts on this is that given modern technology, for 3D chess, go straight for a GUI presentation. Use a track ball UI metaphor where the user grabs and drags to rotate the board (like SketchUp in Rotate mode).
Was This Post Helpful? 0
  • +
  • -

#19 s23bog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 79
  • Joined: 02-May 17

Re: 3D Console Game interface

Posted 07 May 2017 - 03:03 PM

I want to reserve the uppercase letters for the pieces.

ABCDFEG // playerZ pieces
Z       // playerZ pawns

HIJKLMN // playerY pieces
Y       // playerY pawns

OPQRSTU // playerX pieces
X       // playerX pawns

// Type of piece starting on each of the corresponding letters to be determined randomly, as in the demo 

playerZ {
    pieces @ {    aho, bho, cho, dho, eho, fho, gho }
    pawns @ {                   
                  ahp, bhp, chp, dhp, ehp, fhp, ghp 
                  aio, bio, cio, dio, eio, fio, gio
                  aip, bip, cip, dip, eip, fip, gip
             }
        };

playerY {
    pieces @ {    ghu, giu, gju, gku, glu, gmu, gnu }
    pawns @ {
                  fht, fit, fjt, fkt, flt, fmt, fnt
                  fhu, fiu, fju, fku, flu, fmu, fnu
                  ght, git, gjt, gkt, glt, gmt, gnt
            }   
        };  

playerX {
    pieces @ {    ano, anp, anq, anr, ans, ant, anu }
    pawns @ {
                  amo, amp, amq, amr, ams, amt, amu
                  bmo, bmp, bmq, bmr, bms, bmt, bmu
                  bno, bnp, bnq, bnr, bns, bnt, bnu

             }
         };


Was This Post Helpful? 0
  • +
  • -

#20 s23bog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 79
  • Joined: 02-May 17

Re: 3D Console Game interface

Posted 07 May 2017 - 03:33 PM

Using an odd number sized board allows the the center point to be addressable. It is dkr.
The primary directions from that point are:
[a-z]
rookMoves -> acegikmnprtvx
bishopMoves -> bdfhjloqsu

The ZERO is between m and n, and represents idle

There are secondary directions, as well ... like how there is NNW, and ESE. Just they are in 3 dimensions, not 2.

Alternatively, the angular measures could be determined for each direction, and those numbers could be used. It just seems like it makes more sense to me to use the alphabet for that, too.

Sorry, secondary, and tertiary directions, with the winged piece that moves in a 1x2x3 pattern. (In addition to capturing or moving like the knight in a 0x1x2 direction).
Was This Post Helpful? 0
  • +
  • -

#21 s23bog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 79
  • Joined: 02-May 17

Re: 3D Console Game interface

Posted 07 May 2017 - 03:44 PM

The six cardinal directions, would be (like north, south, east, west, up, down)
e,k,m,n,p,v
Then the directions towards the corners would be:
a,c,g,i,r,t,x,z

I may kind of be overloading the single letter a bit.
Was This Post Helpful? 0
  • +
  • -

#22 s23bog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 79
  • Joined: 02-May 17

Re: 3D Console Game interface

Posted 07 May 2017 - 05:24 PM

Another way of expressing the directions would be to make the data order dependent (i.e. aho <> aoh), and then you could use a 3 digit number to express direction. Base 3 would be good for the primary directions (the ones the kings/queens travel in). Then, there are 72 secondary directions.
Was This Post Helpful? 0
  • +
  • -

#23 s23bog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 79
  • Joined: 02-May 17

Re: 3D Console Game interface

Posted 07 May 2017 - 06:08 PM

Using signed numbers might be best.

-1, 0, 0
0,-1,-1
0,-1, 0
0, 0,-1
0, 0, 0
0, 0, 1
0, 1, 0
0, 1, 1
1, 0, 0

et cetera

I don't know. That seems a bit clumsy.

dirA = (-1,-1,-1)
dirB = (-1,-1, 0)
dirC = (-1,-1,+1)
dirD = (-1, 0,-1)
dirE = (-1, 0, 0)
dirF = (-1, 0,+1)
dirG = (-1,+1,-1)
dirH = (-1,+1, 0)
dirI = (-1,+1,+1)
dirJ = ( 0,-1,-1)
dirK = ( 0,-1, 0)
dirL = ( 0,-1,+1)
dirM = ( 0, 0,-1)
dir0 = ( 0, 0, 0)
dirN = ( 0, 0,+1)
dirO = ( 0,+1,-1)
dirP = ( 0,+1, 0)
dirQ = ( 0,+1,+1)
dirR = (+1,-1,-1)
dirS = (+1,-1, 0)
dirT = (+1,-1,+1)
dirU = (+1, 0,-1)
dirV = (+1, 0, 0)
dirW = (+1, 0,+1)
dirX = (+1,+1,-1)
dirY = (+1,+1, 0)
dirZ = (+1,+1,+1)
Was This Post Helpful? 0
  • +
  • -

#24 s23bog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 79
  • Joined: 02-May 17

Re: 3D Console Game interface

Posted 07 May 2017 - 06:20 PM

It shouldn't matter which coordinate comes first. The space aho should be the same as aoh,hoa,hao,oha,oha.
Was This Post Helpful? 0
  • +
  • -

#25 s23bog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 79
  • Joined: 02-May 17

Re: 3D Console Game interface

Posted 07 May 2017 - 06:39 PM

The secondary directions would be:
2*dirA = (-2,-2,-2)
-2,-2,-1
-2,-2, 0
-2,-2,+1
-2,-2,+2
-2,-1,-2
-2,-1,-1
-2,-1, 0
-2,-1,+1
-2,-1,+2
-2, 0,-2
-2, 0,-1
-2, 0, 0
-2, 0,+1
-2, 0,+2
-2,+1,-2
-2,+1,-1
-2,+1, 0
-2,+1,+1
-2,+1,+2
-2,+2,-2
-2,+2,-1
-2,+2, 0
-2,+2,+1
-2,+2,+2
-2,-2,-2
-2,-2,-1
-2,-2, 0
-2,-2,+1
-2,-2,+2
-2,-1,-2
-2,-1,-1
-2,-1, 0
-2,-1,+1
-2,-1,+2
-1, 0,-2
-1, 0,-1
-1, 0, 0
-1, 0,+1
-1, 0,+2
-1,+1,-2
-1,+1,-1
-1,+1, 0
-1,+1,+1
-1,+1,+2
-1,+2,-2
-1,+2,-1
-1,+2, 0
-1,+2,+1
-1,+2,+2
0,-2,-2
0,-2,-1
0,-2, 0
0,-2,+1
0,-2,+2
0,-1,-2
0,-1,-1
0,-1, 0
0,-1,+1
0,-1,+2
0, 0,-2
0, 0,-1
0, 0, 0
0, 0,+1
0, 0,+2
0,+1,-2
0,+1,-1
0,+1, 0
0,+1,+1
0,+1,+2
0,+2,-2
0,+2,-1
0,+2, 0
0,+2,+1
0,+2,+2
+1,-2,-2
+1,-2,-1
+1,-2, 0
+1,-2,+1
+1,-2,+2
+1,-1,-2
+1,-1,-1
+1,-1, 0
+1,-1,+1
+1,-1,+2
+1, 0,-2
+1, 0,-1
+1, 0, 0
+1, 0,+1
+1, 0,+2
+1,+1,-2
+1,+1,-1
+1,+1, 0
+1,+1,+1
+1,+1,+2
+1,+2,-2
+1,+2,-1
+1,+2, 0
+1,+2,+1
+1,+2,+2
+2,-2,-2
+2,-2,-1
+2,-2, 0
+2,-2,+1
+2,-2,+2
+2,-1,-2
+2,-1,-1
+2,-1, 0
+2,-1,+1
+2,-1,+2
+2, 0,-2
+2, 0,-1
+2, 0, 0
+2, 0,+1
+2, 0,+2
+2,+1,-2
+2,+1,-1
+2,+1, 0
+2,+1,+1
+2,+1,+2
+2,+2,-2
+2,+2,-1
+2,+2, 0
+2,+2,+1
+2,+2,+2

I have no idea how to label those directions. It may be enough to just name the knight directions for these, and the winged piece directions for the tertiary directions (of which there are 218).

At least ... in regards to this silly little game.
Was This Post Helpful? 0
  • +
  • -

#26 s23bog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 79
  • Joined: 02-May 17

Re: 3D Console Game interface

Posted 14 May 2017 - 06:45 PM

View PostSkydiver, on 07 May 2017 - 12:17 PM, said:

If the distinction between the planes is so important, why not X be lowercase letters, the Y be numbers, and Z be uppercase letters.

My main concern is that it is relatively hard to tell the relative distances just looking at purely letters. Is the difference between a and e the same as the difference between h and n?


It is irrelevant what is used to represent the coordinates of the spaces. They can be written out one by one, using whatever base numbering system you want. And, they don't have to necessarily be in any particular order, though sequentially is often thought to be best. I am proposing different orders to be used, instead of sequential.

Using polar opposites for the different eyes is merely a recommended starting point, when advancing to using two eyes. I would probably start in "cyclops" mode. Using one big "eye" to represent the whole cube.

I am kind of envisioning possible ways that this could have applications to camera control and processing.

If, instead of thinking of the center as an input device like a camera, it is more of a projecting device, I can see how it could be used for hologram projectors.
Was This Post Helpful? 0
  • +
  • -

#27 s23bog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 79
  • Joined: 02-May 17

Re: 3D Console Game interface

Posted 14 May 2017 - 07:08 PM

Perhaps it would be ideal to use a character set big enough to include a unique identifier for each of the 343 spaces, and 22 of the different possible occupants of each of the spaces. But, one of the first declarations I made when I thought of listing constants was to declare z for the first dimension, y for the second dimension, x for the third dimension, and I reserved w for the forth dimension.

I left V and v undeclared (though was thinking of using that for "vacant").

abcdefg for the z planes
hijklmn for the y planes
opqrstu for the x planes

ABCDEFG for the "Z" pieces
HIJKLMN for the "Y" pieces
OPQRSTU for the "X" pieces

Z for the "Z" pawns
Y for the "Y" pawns
X for the "X" pawns

For the numbers, I am not sure.

Probably best to let numbers represent something quantitative. There are possible uses for the number of steps, and identifiers for direction. There are 26 different directions. To keep parity correct, it probably is best to use sequential characters for the ascii table.

Just noticed that "primitive" ascii was 7-bit instead of 8-bit. That sounds useful.
Was This Post Helpful? 0
  • +
  • -

#28 s23bog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 79
  • Joined: 02-May 17

Re: 3D Console Game interface

Posted 14 May 2017 - 07:35 PM

The different order I proposed is because of the 2 dimensional limitations of a monitor. Memory addresses are sequentially numbered. Just rambling.

The following ASCII characters could be used for moves ... 0 for idle, and the miscellaneous punctuation characters for steps ....

010 1010 052 42 2A *
010 1011 053 43 2B +
010 1100 054 44 2C ,
010 1101 055 45 2D -
010 1110 056 46 2E .
010 1111 057 47 2F /
011 0000 060 48 30 0
011 0001 061 49 31 1
011 0010 062 50 32 2
011 0011 063 51 33 3
011 0100 064 52 34 4
011 0101 065 53 35 5
011 0110 066 54 36 6

Numbers for positive steps.

Now, for the different directions ... that would mean that I should pick 27 sequentially numbered ASCII codes for the different directions. I know that means having two "zeros". One zero when declaring an idle "speed" and another zero at the idle "direction". Als, there would be negative steps, and negative directions. It seems redundant, but perhaps there could be uses for having the two different 0's. I just want to keep parity correct. There are 14 rook moves in parity odd directions, and 12 bishop moves in parity even directions.

Two zeros ... left eye, right eye. Speed ... direction ... a vector. A beam ... direction and amplitude.
Was This Post Helpful? 0
  • +
  • -

#29 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 5830
  • View blog
  • Posts: 19,870
  • Joined: 05-May 12

Re: 3D Console Game interface

Posted 15 May 2017 - 01:33 AM

What value are you getting from using a console UI instead of a GUI?
Was This Post Helpful? 0
  • +
  • -

#30 s23bog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 79
  • Joined: 02-May 17

Re: 3D Console Game interface

Posted 15 May 2017 - 06:59 AM

Nothing as far as I can tell, but I know nothing about programming for a GUI. I don't see the actual display as being that crucial, though. I would rather wrk on the logic of the core than make it look pretty.

To be honest, I was actually thinking of playing the first game using just the raw data, and manually moving the binary values of the pieces to the various addresses, but it is tough to find someone to play with when using that kind of "interface". The construct of the game requires me finding at least two other people interested.

However, I would also like to work on the logic for having a computer play at least one of the sets. Randomly choosing moves for one of the sets is certainly an option, but perhaps one of the most useful pieces of information to be used in selecting moves is the number of legal moves for each player in resulting positions.
Was This Post Helpful? 0
  • +
  • -

  • (6 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • Last »