GithubHelp home page GithubHelp logo

bcardoso / shoggy Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 472 KB

A fairy chess game for Emacs

License: GNU General Public License v3.0

Emacs Lisp 100.00%
chess chess-variants emacs emacs-lisp fairy-chess game

shoggy's Introduction

         __
   _____/ /_  ____  ____ _____ ___  __
  / ___/ __ \/ __ \/ __ `/ __ `/ / / /
 (__  ) / / / /_/ / /_/ / /_/ / /_/ /
/____/_/ /_/\____/\__, /\__, /\__, /
                 /____//____//____/

shoggy

shoggy is a 6x6 board, fairy chess variant with spell cards, written in Emacs Lisp.

screenshot1.png

shoggy was developed during the Spring Lisp Game Jam 2024.

Requirements

  • GNU Emacs 29.3 with SVG support (probably runs on older versions too)
  • There are no third-party packages required.

Installation

;; Manual install
;; clone this repo:
;; git clone https://github.com/bcardoso/shoggy
(add-to-list 'load-path "/path/to/shoggy")
(require 'shoggy)

;; With use-package + straight.el
(use-package shoggy
  :straight (shoggy :host github :repo "bcardoso/shoggy"
                    :files (:defaults "images" "sounds")
                    :build (:not compile))) ;; compiler won't be happy

How to play

M-x shoggy RET

You can adjust and toggle some game options in the main screen.

screenshot2.png

The rules

  • No checks, no castling: when the Sage is captured, the game ends!
  • No en passant: pawns can move one or two squares in their first move (you can toggle this behavior), and that’s it.
  • When a player is out of moves, it’s game over.
  • In each turn, you can either move a piece or cast a spell: you are given a spell card after every capture.
  • You can’t hold more than 3 cards at a time: cards are randomly discarded if your hand is full.
  • All else is pretty much chess.

The pieces

shoggy has standard and non-standard pieces:

NameAtomRangeValueDescription
PawnP1 or 21A pawn
FerzF12Advisor, like a 1 square bishop
WazirW12Like a Rook, also moves 1 square
KnightN2,132,1 Leaper
RookRboard5Same as a Rook
SageS199Like a King, but wiser

The spells

After each capture of an enemy’s piece, you earn a spell card. In your turn, you can either move a piece or cast a spell.

There are three types of spells (for now):

SpellDescription
BOOSTBoost a piece’s range (applies to Ferz or Wazir)
PROMOTEPromote a piece (Pawn -> Ferz/Wazir -> Knight -> Rook)
DEMOTEDemote an enemy piece (Rook -> Knight -> Ferz/Wazir -> Pawn)

The engines

shoggy has two engines to play against: dumbfish and sanefish.

dumbfish
tries to capture pieces or makes random moves
sanefish
tries to be a more reasonable fish (the default)

The lore

shoggy was loosely inspired by Shogi, a Japanese chess variant (which you can play online at https://lishogi.org/).

At first I was planning to make a Minichess/Los Alamos chess variant, but I soon started to deviate into other directions.

I also had this idea a long time ago about adding playing cards into the game of chess. Perhaps in the future I’ll add some more spell cards to shoggy. Also, check out Knightmare Chess, which I discovered during my research of the Game Jam.

So there are hundreds of chess variants and fairy chess pieces out there. This is my own :)

Acknowledgements

I’m thankful to the creators mentioned below for sharing their work under free and open-source licences.

Images

Sounds

shoggy's People

Contributors

bcardoso avatar

Stargazers

Wesley Nelson avatar StrawberryTea avatar Michael Pope avatar  avatar Adam B avatar  avatar Cadence Ember avatar

Watchers

 avatar

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.