ramou / chessmod Goto Github PK
View Code? Open in Web Editor NEWAdding Pippin Barr's Chesses to minecraft.
License: MIT License
Adding Pippin Barr's Chesses to minecraft.
License: MIT License
Maybe roll this together with #7
The interface for set should access the color and then allow you to draw for each piece type. The choice of set is deliberate so you can't play on a board with matching sets, and so the board knows which set goes where. If people gripe, maybe I'll make that dynamic, but I see no immediate benefit.
I will allow (and make) some custom sets, but will try to load dynamic sets via a JSON file that is consistent with existing block and texture notations:
e.g.
assets/chessmod/models/block/chesspieces/setname/pawn.json
assets/chessmod/models/block/chesspieces/setname/knight.json
assets/chessmod/models/block/chesspieces/setname/bishop.json
assets/chessmod/models/block/chesspieces/setname/rook.json
assets/chessmod/models/block/chesspieces/setname/king.json
assets/chessmod/models/block/chesspieces/setname/queen.json
assets/chessmod/textures/block/chesspieces/setname/material.png
assets/chessmod/textures/block/chesspieces/setname/material.png.mcmeta
I'll support the animation notation for the textures with the material.png.mcmeta
notation (the file is optional).
The blocks will be scaled to 3/32
but I'll examine the models and use the piece height to adjust each TileEntity's collision box. I'll support the standard JSON notation until (or unless) I find a way to dynamically interpret things using the other notations.
The basic piece implementations that I have now will be the default available and will speficy their own setname
Pieces and complete sets will be registered when found, with an optionally defined item tile for the bag 'o pieces (the complete set) and the standard tile-rendered version of pieces defined in the block subset. Recipes of pieces will live in:
data/chessmod/recipes/setname/pawn.json
but I will override that and use any single block defined in:|
data/chessmod/recipes/setname/set.json
which, instead of using the standard recipe notation will dynamically register a recipe based off of that described in #27
When playing on a ranked table, only complete games get ranked. I don't want to put in time trying to think about how a player might blow up the table to avoid a losing score. Ranking makes you stronger. If you want to be an ass, people won't play with you... if it gets bad, I'll track incomplete games with the option for both players to agree to annul. Keep classy, you chess-playing minecrafters.
Use the Elo Rating System
It turns out this isn't super clear.
So, if you have players with rating R1 and R2. They play a game and score S1 and S2, where that score is 1 point for a win, 0.5 points for a draw and nothing for a loss. Their new ratings, denoted by R'1 and R'2 would be:
R'1 = R1 + K*(S1-(10R1/T)/(10R1/T+10R2/T))
R'2 = R2 +K*(S2-(10R2/T)/(10R1/T+10R2/T))
K
and T
would be configurable in the mod and would default to 32 and 400 respectively. If people really wanted it, I'd allow for K
to scale with ratings in a way specified in the config, but this seems a reasonable starting point.
Thanks for the idea, Gina!
For the Tournament table only.
There's no noticeable issue yet, but if we can get it to fast render that would be great.
If we have to use textures as determined by #8 then we might be able to make a large sprite that is a white/black checkerboard and then use the uv so that we can just draw the pieces with one texture and get away with FastRender. We might combine this with any other vertex caching we can do.
The way all this is done is 3D geometric shapes off of 3D geometric shapes. It'd be nice if we had something that represented that. Draw your shape centered around a normal vector with the "down" being tangent to whatever you were drawing off of (or perpenducular to the normal vector at its "down" point). Then just allow for regular polyhedron primitives, with die-based face-labels where appropriate, prisms, pyramids. The also allow for the curved stuff if we get fancy, so spheroids and whatever you call cylinders and cones when the bases can be elipses and not just circles. At that point, thrown in the torus because WTF.
allow the chaining of shape drawing using a builder pattern, e.g.:
Side square = new Square (10);
Side tinySquare = new Square (5);
Vector normalVector = new Vector(0,10,0);
ShapeSpaceNode regularCuboid = shapeSpaceTree.prism(square, normalVectrr);
ShapeSpaceNode smallerIrregularCuboid = cube.face(Cuboid.UP).prism(tinySquare, tinySquare.scale(05), normalVector.scale(0.5));
ShapeSpaceNode sphere = smallerCube.face(Cuboid.EAST).spehere(1);
When we make the regularCuboid
we specified one face and the prism just projects the other end along the normal vector. Since it's straight up, we'd get a 10x10 cube whose down
face was on (0,0) of the x/z axis ('cause we're in minecraft). the smallerIrregularCuboid
would sit on top of the regularCuboid and would be 5x5 at the bottom where it touched and 2.5x2.5 at the top. Lastly, we draw a sphere
that touches the center of the east face of the smallerIrregularCuboid
and has a radius of 1. Vectors and 2D shapes can scale, the ShapeSpaceNode allows a slide with cartesian reference (0,0) x/z on the reference point with the y axis being along the tangent (or along a passed normal) or radial reference along the similarly specified tangential plane (default or specified normal vector) and we can even pick faces off the sphere with two radial arguments (off of up
and north
).
Since this builds a Tree, we can also specify names to nodes as we create them, traverse upwards and downwards (namespaces to a parent node) and otherwise have an easy go of making complex figures. We should be able to re-bind textures as needed, and at the end it should allow us to extract all the necessary vectors, grouped by texture so we can get single draws on groups and hopefully cacehable.
We should provide default implementations for the network packet management to update clients on server changes, an overrideable hasChanged so that the server-side can determine if a change has been made since the last time it updated clients and a default tick() method that overrides the abstract base class and calls a doTick that must be overridden. doTick will get called and then the superclass will check hasChanged, and notify clients that have the chunk loaded, once, if needed.
Each side is assigned total allowed time for the whole game. Passing time is a loss.
It's a bit of a jumble of chaos now. Make tickets, close what bugs me, update version number by an amount that is not entirely arbitrary, but really not fixed. There's even a bunch of stuff I don't have in the issues that should be there, like a list of the Chesses versions I'll be doing (all of them, do I need all before 1.0???). This'll be good practice anyway. Gettin' better at stuff all the time is how you stay better at all the stuff.
Thanks for the idea, Gina!
Allow the linking of two boards. First, they need to be made into ender boards
, which can be done by crafting the table with an ender pearl. Then if you right-click a board on an ender board
block in the world will link the two boards. When placed, any move played on one board will be played on the other board, and all state will be synched.
The internal namespace is my shitty canonnical name instead of chessmod
com.htmlweb.chessmod should just be the package structure above... I don't know how I misunderstood the naming convention that much!
Niche Duck did a video about this mod, which is amazing:
https://www.youtube.com/watch?v=OgGZaMpXbkM
But a) he notes the bug fixed in 0.601 and b) he demos the available configs. I didn't know anything about the configs, but then that WHTE wool dye thing seemed familiar so I went and found that rando-default config stuff was still there from the base example I'd started learning mods with.
I should gut that.
Here's a random pattern:
abc
xcb
xxx
a=book
b=iron
c=coal
This would be the second tier board.
right-click activated.
I originally wanted to whack a person with a chess glove
but I think a handshake over a Tournament Board will be fine. Player picks a side. Other player picks a side. First player rejects if it's the wrong player or accepts is if it's the right player. Black indicates the game is started. White can withdraw from the game before their first move at no penalty (causing the board to reset).
This means boards will have a direction on the x/y
You have to log in and out to have it come back, but other players will still see you holding it.
Given the [Rules of Chess](https://en.wikipedia.org/wiki/Rules_of_chess
There has been no capture or pawn move in the last fifty moves by each player, if the last move was not a checkmate.
Let the board offer this to either player after its occurrence. Keep it on offer until such time as a pawn moves or a piece is captured (when it will be reset).
Apply this on Tournament Chessboard
and above.
We should normalize how Compound NBT data is generated in a superclass and use Annotations to clarify fields of the TileEntity that should by incorporated.
From Ben, not the @ben from github, though.
Allow the initial placement of pieces before starting the game, allowing for custom setups, piece handicapping, etc.
If a king is in check, highlight its square as red. If a king is in checkmate, make it a solid red.
Diamond and obsidian instead of iron and coal!
It should track game lifecycle:
This means it must track the two players, what side they control and board state, and allow appropriate transitions between Board States.
State transitions should have some guarantee. After a configurable amount of time without a move, the other player may claim victory or draw. After a configurable amount of time, a challenge may be rescinded. After an appropriate amount of time, either player may reset a tournament board to the unassigned state. Default timing guarantees should be mod-configurable.
Tournament Board guarantees can be altered by the application of a timer.
I've been on the fence about board breaking. In the end, I've decided that if you break a board, its state is cleared and there is no tournament result. If a player gets a reputation for being an ass about playing, folks just won't play with them on that server, and that's better than my farting around with an overbearing technical solution.
Once we have the GUI from #18, the next step is to make it functional.
As of now, I can't run gradle build
because it can't find my JUnit 5 libs. That should be easy enough to fix if I understood gradle, but that hasn't been a priority. Right now, I run the tests in eclipse as usual.
This should drastically reduce packet traffic.
I suggest keeping an oldstate
value in the entity. Check for oldstate on the server-side during the tileentity's tick. If it doesn't match, send the update to the client. That field can be marked as server only, I suspect.
When you first build a WoodChessboard give the achievement.
My implementation of Pippin's Chesses varient Fog of War will do the expected alpha on the non-current player's pieces, but I will also attempt to recreate Corail Tombstone's fog effect around (and on top of) the chess board... because that'll be AWESOME!
I'm thinking of:
mWB
cBW
www
Where m is a nugget, c is a wool block, W is any block, B is any block and www is any wood.
I would then use the corresponding block texture, scaled as needed.
I would use the metal block relating to the nugget. I would use a scaled-down version of the wool (I want felt). I would use the scaled down (to a square on a board) version of the blocks for W and B. I would use the wood blocks for the base. Except for the base, where I'd use the appropriate parts of the texture (north side, wrapped around and the middle of down), I would use the up texture on each block. I intend to use the W
abd B
up textures for the pieces as well, but we're not there yet :D
quantum entangles
class of boards 66Thanks for the idea, Jonathan!
In the vein of making it more interactive, it'd be fun to detect which shape was getting interacted with in order to manipulate the piece (just drag and drop).
Probably just a list of pieces on the side, each color on each side. This'll let us manually set up boards more readily. It means that it's not really promotion, it's arbitrary piece placement. We'll have to make a nicer promotion system within the gui eventually.
Detect threefold repetition
. If the board is in this state, give either side the option to declare a draw. Tournament Chessboard and above should support this.
Threefold repetition: The same board position has occurred three times with the same player to move and all pieces having the same rights to move, including the right to castle or capture en passant.
--Rules of Chess
Players lose the option to claim a draw if they don't take it on the turn it arrives, or don't claim it with their move. This implies that if they expect a claim with their move, the board must allow them to indicate a draw claim, which would be automatically validated upon play (they would get their draw). The claim before move should be announced, and failure of the claim should also be announced.
If the same board happens five times, the draw is automatic (maybe make that configurable)
Jess suggested this.
Giant Chess pieces, etc.
Thanks, Gina!
Various Chess Problems to solve for achievements.
Once overtime is reached, players must play subsequent batches of moves in a fixed time. Configure defaults in mod, allow setup via timer.
hello again, i just found out in survival that when i craft the golden one, it makes still wooden table, you have 2 crafting recipes for one table, and the golden one has no recipe. Please fix this, i need the golden one :D
Thanks, JaJackULTIMATE
I'm on it!
Found this immediately. facepalm The commit will be a record of my shame.
In the DoMove we need to have the restrictions on Piece Side and type, it it's not already there... uhg. The second king would break things maybe... every other hack is self-defeating, I think.
My variant on Pippin's Chesses for 3D will be to use anaglyph3 textures for my 2D board's pieces.
State, particularly the getter, conflicts with the getter for the current BlockState, so we should avoid that.
Is that meaningful? I want it to have state. The state is currently undefined, but it's gonna be some String. I think currently that'll be a comma-separated list like:
wR,wN,wB,wQ,wK,wB,wN,wR,
wP,wP,wP,wP,wP,wP,wP,wP,
,,,,,,,,
,,,,,,,,
,,,,,,,,
,,,,,,,,
bP,bP,bP,bP,bP,bP,bP,bP,
bR,bN,bB,bQ,bK,bB,bN,bR,
I want to be able to build and use different pieces. Make a chessboard and it comes without pieces, then you craft it with various things to get pieces
a = material-type
b = chessboard
aaa
aba
aaa
pawns
axx
xbx
xxa
bishops
xax
xbx
xxa
knights
xax
xba
xxx
rooks
xax
xbx
xxx
queen
xxx
xbx
xax
king
If you mix the 6 resulting items together, you get a piece bag (if compatible). Right-clicking on a board with the piece-bag adds/swaps the sets. The piece-bags are classed as either white or black pieces.
Make some pieces unmakeable, found as loot in the world/rare trades, you still form piece-bags with them.
Make a display case for storing and showing your piece sets.
Right now it's checked in GUI and done in the messages. The former is sub-par and the latter is all kinds of wrong:
This could more simply and sanely be done here, and polymorphsm would make the messages get to the correct implementation instead of what I'm about to do till I have the will to fix this ticket...
It's not that it's ugly, though maybe it's a bit busy, it's that it's huge. I'm thinking I won't use a real texture, I'll just go solid colors till I find something I like more? That or find a tiny and good texture.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.