The problem with the king (who is just a cyliner) seems to be that DBP culls part of it and then does not put it back. When I turn off culling, the king renders fine.
Quote: "I looked it up in Wikipedia and read there's a lot of debate on just how it's played. Are you going to pick one rule set and use that or let the user choose which play style they like? This seems more complicated than chess but that may be because I know for sure how to play chess."
I bought a set with just one set of rules in so I think I will start with those. However once thats up and running, it might be quite a nice excersize to allow users to select a rules set. Nice idea!
The version I'm starting with is most like the Tawlbwrdd varient described on Wiki except without the calling and with the king having to be surrounded by 4, not just 2, foes.
Quote: "Buy, yes, to help - model yourself the pieces rather than rely on DBPro's primitives - you'll be better off in the long run!"
I'm sure your right and I may create pieces in an exteral program but for the moment, these are the easiest because I can easily made them the right size for the squares. Once the program is working, I may put some effort into creating nice pieces though.
Seeing how you have been so helpful so far, I think I may put another glitch to you. This is nothing to do with 3D graphics but is from the same game. The following code seems to be causing an infinite loop but I cannot understand why.
for c = 101 TO 124
position object nPieceNumber,object position x(c),object position y(c) + (object size y(nPieceNumber,1) / 2) + (object size y(c,1) / 2),object position z(c) ` This places attacking pieces over attaker squares
nRow = FindSquare(c,"Row")
nColumn = FindSquare(c,"Column")
atBoard(nColumn,nRow).nPieceID = nPieceNumber
nPieceNumber = nPieceNumber + 1
next c
nPieceNumber = 601
for c = 201 TO 212
position object nPieceNumber,object position x(c),object position y(c) + (object size y(nPieceNumber,1) / 2) + (object size y(c,1) / 2),object position z(c) ` This places defending pieces over defeder squares
nRow = FindSquare(c,"Row")
nColumn = FindSquare(c,"Column")
atBoard(nColumn,nRow).nPieceID = nPieceNumber
nPieceNumber = nPieceNumber + 1
next c
function FindSquare(nSquare as integer,sFlag as string)
bFound as boolean
nColumns as integer
nRows as integer
nOutput as integer
bFound = 0
nColumns = 0
nRows = 1
repeat
nColumns = nColumns + 1
nRows = 1
repeat
if atBoard(nColumns,nRows).nSquareID = nSquare
bFound = 1
if sFlag = "Column"
nOutput = nColumns
endif
if sFlag = "Row"
nOutput = nRows
endif
else
nRows = nRows + 1
endif
until bFound = 1 or nRows > 11
until bFound = 1 or (nRows > 11 and nColumns = 11)
endfunction nOutput
A functioning version of the code is avaliable
here. It is the smaller of the two files.
Any help with this would, as always, be greatly appreciated.