Giter Site home page Giter Site logo

1j01 / chess-mashup Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 11.18 MB

Chess game mashup in 3D

Home Page: https://1j01.github.io/chess-mashup/

License: MIT License

HTML 0.34% JavaScript 96.24% C 3.41%
3d 3d-game chess chess-game chess-variant chess-variants game voxel voxel-game voxels

chess-mashup's Introduction

Chess Mashup

Play amusing chess variants in beautiful 3D.

Screenshot of the chess game

The available games may not match the list below, since this document was written largely prospectively.

Chess On a Cube

(8³ cube = 512 voxels, 8×8×6 surface area = 384 spaces)

Finally, a perfect information game with poor visibility.

No fog of war, or anything silly like that. 🌫️⚔️💣 Sure there's 3-D chess and N-D chess, where it's hard to wrap your head around it, 🤯
but in this game, it's hard to hard to wrap your eyes around it. 👀
It's innovative. 🍷🤔

Some may say this cube seems too big, but I say it seems almost impossible to design a reasonable starting arrangement for a cube like this.

or...

Frankenstein's Board Game, or: What Game Should We Play?

Board game mashup. How many abstract board games can you play on the same board? How many rule sets can you combine?

♟️♙️♖️♘️♗️♔️♕️🃏🎲👾🅂🄲🅁🄰🄱🄱🄻🄴🎯🎱🎳🎮⬮⬯●○⬬⬭⬬⬭⬬⬭

or...

Non-Euclidean Chess

In the game of Chess, pawns can advance to the eighth rank and promote to a queen. In Non-Euclidean Chess, there's another way to upgrade pieces, but it's not what you're used to. If a piece goes through a portal, it can come out the other side onto the same board but twice the size, because the exit portal is twice as large as the entry portal, and thus it stretches the piece.

Big pieces can capture four small pieces in a single move.

If you go the other direction, you can end up with a tiny piece. What can a tiny piece do? I don't know. It can hide.

What if the exit portal is wider than the entry portal? You get a wide piece, taking up 2x1 space.

If you've ever played Problem Sleuth, this should be no problem for you.

Development Setup

This project is built with ThreeJS, a popular JavaScript library for 3D graphics.

  • Install Git if you don't already have it.
  • Clone the repo.
  • Install Node.js if you don't have it, then open up a command prompt / terminal in the project directory.
  • Install project dependencies with npm install
  • npm start will start a web server which will watch for changes to the source files and automatically reload the page.

License

MIT license

chess-mashup's People

Contributors

1j01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chess-mashup's Issues

Moving diagonally around a crater is sometimes not allowed

On a plane, left, up is equivalent to up, left but not so in a 3D voxel world.
With 3D rotations, order matters, like with a Rubik's cube.
Consider the case where a pawn wants to attack a piece to its diagonal, and there's a voxel crater adjacent to them.
left, up may attack the piece whereas up, left may go down into the crater, and not come out.

Deranged (order-swapped) diagonal moves are needed.

But what about bishops/queens? Unlike a king/pawn, they have repeated diagonal movement. Should it branch out recursively with either possible interpretation of the diagonal at each step? Bishops/queens are already crazy / overpowered on a voxel world.
So I'd actually favor limiting diagonal movement, perhaps to the plane.

(Is there any logical, intuitive, generally reasonable subset of 3D diagonal moves that allows more than just planar movement? Like, allowed over edges but not around corners? How would that be defined? Or, going over an edge is considered a diagonal in itself (but also straight, so that straight-moving pieces can go over edges)?)

Invalid move indicator can occlude valid move indicator (for distinct moves to the same square)

On a corner it's possible for a pawn to move OR attack the same square, because the pawn can reach the square by moving to it directly or indirectly, with the indirect path corresponding to a "diagonal" attack.
If there is an enemy piece, only the attack is a valid move, but sometimes the invalid move indicator appears over top the valid move indicator. The valid move indicator should get preference.

Actually, this should no longer be possible if I implement truncated cuboctahedral board geometry, I think.

Can't (easily) see what piece is attacking when in Check(mate?)

Often you can look at places you can't move the king for it to show you, in the form of an attack path, but it only shows one attack path if multiple pieces are attacking that square, so sometimes it's hard to see what piece is putting you in Check.

Handle WebGL context loss

Lately WebGL is super unreliable in Chrome for me, and refreshing the page I get "WebGL not supported" messages — including in this app — but the context loss event isn't handled yet.

Waiting for move animations to finish before you can interact isn't fun

You can technically cancel by undoing and redoing (ctrl+z, ctrl+shift+z) but that doesn't feel nice either and it's not particularly "discoverable" — it's a hack.
You should be able to select pieces, and probably even queue up moves, while it's animating. Need to consider selecting pieces that are currently under attack, and other board state consistency.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.