Check out Grant Acedrex, our featured variant for April, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Latest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

Later Reverse Order EarlierEarliest
Chu Seireigi. Variant of Chu Shogi playable with drops. (12x12, Cells: 144) [All Comments] [Add Comment or Rating]
🔔Notification on Thu, Apr 25 09:40 PM UTC:

The author, A. M. DeWitt, has updated this page.


💡📝A. M. DeWitt wrote on Thu, Apr 25 08:53 PM UTC in reply to François Houdebert from 07:48 PM:

Looks like it. I have uploaded the new version to the site and have adapted them so the implementation will work properly with the CVP files.


François Houdebert wrote on Thu, Apr 25 07:48 PM UTC in reply to A. M. DeWitt from 05:39 PM:

It should be ok now


💡📝A. M. DeWitt wrote on Thu, Apr 25 05:39 PM UTC in reply to François Houdebert from 05:00 PM:

Looks good, save for a few errors:

---------------------
Setup Errors
---------------------

White Kirin and Phoenix are swapped from where they should be in the initial setup

Black King and Great Elephant are swapped from where they should be in the initial setup

---------------------
Promotion/Drop Errors
---------------------

Lance, Running Rabbit, Knight, Gold General, and Great Elephant are currently allowed to promote immediately if they are dropped into the promotion zone (this should not be the case)

Both Pawns in the hand spaces can be selected when multiple Pawns are in the hand)


François Houdebert wrote on Thu, Apr 25 05:00 PM UTC in reply to H. G. Muller from 01:47 PM:

thanks for the advice.

I have modified accordingly


H. G. Muller wrote on Thu, Apr 25 01:47 PM UTC in reply to François Houdebert from 12:40 PM:

Should I add : Should I add " ##############" before and after?

Indeed, you should, because you want the extra hand ranks to be colored black as well.


François Houdebert wrote on Thu, Apr 25 12:40 PM UTC in reply to H. G. Muller from 12:30 PM:

19 is the size of handLayout

boardLayout :
0: "##............##" ​
1: "##............##"
​2: "##............##"
​3: "##............##" ​
4: "##............##" ​
5: "##............##" ​
6: "##............##"
​7: "##............##"
​8: "##............##" ​
9: "##............##" ​
10: "##............##" ​
11: "##............##" ​
length: 12

Should I add : Should I add " ##############" before and after?


H. G. Muller wrote on Thu, Apr 25 12:30 PM UTC in reply to François Houdebert from 11:54 AM:

Strange. 13 should be a valid index for an array of length 19. That means the array should have some internal elements that are undefined. What happens if you print

console.log( this.cbView.boardLayout )?


François Houdebert wrote on Thu, Apr 25 11:54 AM UTC in reply to H. G. Muller from 11:32 AM:

the array length is 19

NBROWS-row-1,row: 13, 0


H. G. Muller wrote on Thu, Apr 25 11:32 AM UTC in reply to François Houdebert from 10:22 AM:

Uncaught TypeError: this.cbView.boardLayout[((NBROWS - row) - 1)] is undefined

This sounds like an out-of-bounds access on boardLayout. Are you sure you defined that array with sufficiently many ranks? To further diagnose the problem you could add console.log(NBROWS-row-1); just before the access to boardLayout in paintCells; then you could see in the console  what the offending value is.


François Houdebert wrote on Thu, Apr 25 10:31 AM UTC in reply to H. G. Muller from 09:37 AM:

If you'd like to make an implementation of wa shogi, here are some unused jocly-compatible sprites that might come in handy.

To be seen if useful


François Houdebert wrote on Thu, Apr 25 10:22 AM UTC in reply to H. G. Muller from 09:37 AM:

In that case : I get in 2d with pictos

Uncaught TypeError: this.cbView.boardLayout[((NBROWS - row) - 1)] is undefined
    paintCells chu-seireigi-view.js:1509
    paintChannel chu-seireigi-view.js:1530
    draw chu-seireigi-view.js:941

Would this come from using the draw function wrongly in my view : chu-seireigi-view.js ?

Note that I have the impression that with the modified version the result is satisfactory with or without extra hand ranks.

That's why I'd like your opinion on grid-board-view.js, because I thought it would be useful to transfer this modification to the pullreq branch for jocly.


H. G. Muller wrote on Thu, Apr 25 09:37 AM UTC in reply to François Houdebert from 08:41 AM:

I think that all that is needed is to make the 'row' loop run from 0 to NBROWS, and remove the -NBVHND from

this.cbView.boardLayout[NBROWS-NBVHND-row-1][col]

 And then putting the extra hand ranks in the boardLayout defined in the game's view file. I don't think there are any other games yet that use extra hand ranks. I implemented that feature with Wa Shogi in mind.

The paintCells function is not involved in drawing the grid.

I had already looked at the sources, by looking at the chu-seireigi-view.js of the compiled version. Since you build Jocly without uglification all used source files are in there unmodified.


💡📝A. M. DeWitt wrote on Thu, Apr 25 09:34 AM UTC in reply to François Houdebert from 08:41 AM:

Your current setup for this game looks way better, but I did notice a few errors were made while making the new version. I also noticed a bug in the Hectochess implementation.

---------------------
Chu Seireigi Setup Errors
---------------------

White Kirin and Phoenix are swapped from where they should be in the initial setup

Black King and Great Elephant are swapped from where they should be in the initial setup

---------------------
Chu Seireigi Promotion/Drop Errors
---------------------

Pawn, Lance, Running Rabbit, Knight, Gold General, and Great Elephant are currently allowed to promote immediately if they are dropped into the promotion zone (this should not be the case)

White Copper General is put in same place as Black Lion in hand spaces, resulting in the hand space setup looking asymmetrical (White Copper General should be placed between the Great Elephant and Running Wolf)

(Also, because of this bug, a "King" may sometimes appear in current hand space of extra White Copper Generals/Black Lions for some reason...though this thankfully doesn't affect anything)

---------------------
Hectochess Castling Error
---------------------

When attempting to castle, the Champion's starting squares (b2/b9 and i2/i9) and queenside Knight starting squares (c2/c9) are not checked to see whether a piece is occupying them or not.


François Houdebert wrote on Thu, Apr 25 08:41 AM UTC in reply to H. G. Muller from 07:02 AM:

The change in paintCells was necessary because the grid wouldn’t display. May be that a better modification is possible, but I don't think I'm in a position to make it.

After a few modifications, current result

I don't know if you'd like to have a look at sources : latest to check grid-board-view.js


H. G. Muller wrote on Thu, Apr 25 07:02 AM UTC in reply to François Houdebert from Wed Apr 24 09:15 PM:

I guess the drop model still needs some tweeking. The square painting on the hand ranks should be the same as that of the other hand squares. Now there seems to be no coloring at all, so that the rim texture shines through. I suppose the logical way to do this is that the square-painting array that has to be defined in the game's view file should include the extra ranks.

It is also not clear to me why the 'counter piece' in the lower-right corner is larger than the others.

[Edit] The array boardLayout defined in the view file is accessed in two places in grid-board-view.js, inside nested loops over rows and columns. The loop over rows was modified to skip the extra hand ranks. I suppose this was a bad idea; especially in the 'paintCells' function it should have run over all ranks, requiring the boardLayout to also specify how the cells in these extra hand ranks should be colored. There is a second routine 'paintInCoordinates' that also loops over all cells, which does more complex things and might need more subtle modification than just changing the loop limits. But it seems this function is not normally used.

The handLayout[-1] in the view file appears to have a 16 where there should be a 17, which causes misplacement of the 'counter piece' on 15 rather than 16.


François Houdebert wrote on Wed, Apr 24 09:15 PM UTC in reply to H. G. Muller from 05:59 PM:

I gave it a try here. I think It looks better this way.
@Adam: apart from the adjustments linked to the changes, what do you think?


H. G. Muller wrote on Wed, Apr 24 05:59 PM UTC in reply to François Houdebert from 04:18 PM:

No, you have to write something like

Model.Game.handLayout[1] = [0,2,4,6,8,10,12,14,30,46,62,...];

if you want the first 8 'hand squares' for white to be at the bottom, and the rest along the right edge.


François Houdebert wrote on Wed, Apr 24 04:18 PM UTC in reply to H. G. Muller from 01:51 PM:

It's good to know that you can use the bottom squares for that. Does it mean that we have to specify something like Model.Game.handLayout[1][{2:18,4:17}]; // eg : square 2, hand 18 for the white for each piecetype?


H. G. Muller wrote on Wed, Apr 24 01:51 PM UTC:

Note that it is possible to control the way the captured pieces are placed next to the board by defining arrays Model.Game.handLayout[color][handIndex]. This array should contain the square numbers where you want the first captured piece of the given color (1 or -1) and hand value to be placed. (A second piece will be placed at sqr+color, and after that counters will appear between the two shown pieces.)

Currently the default assignment is used, which places the white pieces on the first 'file' on the right of the board, the hand number equal to the rank number (which starts at 0). By defining a handLayout you could also use the ranks under or above the board to place pieces, thus requiring fewer extra ranks.

E.g. with a single extra rank (instead of the 4 you have now) you could place 6 white pieces below the board, and 14 white pieces to the right of the board.


💡📝A. M. DeWitt wrote on Tue, Apr 23 02:53 PM UTC in reply to François Houdebert from 02:50 PM:

Thanks.


François Houdebert wrote on Tue, Apr 23 02:50 PM UTC in reply to A. M. DeWitt from 02:37 PM:

here you go


💡📝A. M. DeWitt wrote on Tue, Apr 23 02:37 PM UTC in reply to François Houdebert from 02:02 PM:

Looks like everything works properly.

Can you send me the updated files for Seireigi and Chu Seireigi (I have already taken care of Hectochess)?


François Houdebert wrote on Tue, Apr 23 02:02 PM UTC in reply to A. M. DeWitt from 01:12 PM:

I hope it's ok now


💡📝A. M. DeWitt wrote on Tue, Apr 23 01:12 PM UTC in reply to François Houdebert from 12:25 PM:

Here are the errors I didn't find before or are new:

Incorrect 3d Kanji Readings (all should be colored red)

  • Promoted Lance (should say 奔虎)
  • Promoted Gold General (should say 大象)
  • Promoted Kirin (should say 角行)
  • Promoted Phoenix (should say 飛車)

 


25 comments displayed

Later Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.