Giter VIP home page Giter VIP logo

tsubasa's Introduction

Tsubasa

Tsubasa onchain game running on Starknet Appchain.

Project license Pull Requests welcome

About

Tsubasa is a football game based on the popular manga series of the same name. It's a simulation based on the rules of the game, but with a twist: the players are able to use superhuman techniques, such as the Tiger Shot, to make the game more exciting.

The game leverages the Dojo Engine, a provable game engine and toolchain for building onchain games and autonomous worlds with Cairo.

It can run on the public Starknet, or on a Starknet Appchain using Madara.

How to play

Rules

Decks

  • Each player has a deck that he prepared before the game
  • Each deck is composed of 8 cards
  • There are 24 cards available in the game (for now).

Game

  1. A game is composed of multiple rounds
  2. The first player to win 2 rounds wins the game
  3. To win a round a player has to score a goal
  4. Each player can place 4 cards at most on the field
  5. When you place a card on the board it'll wait on side until your next turn to enter the field
  6. To place a card you'll need to spend the amount of energy specified on it
  7. The energy level is reset and increased at each turn
  8. You can place multiple cards on the board during 1 turn
  9. Each card has 2 statistics dribble/defense
  10. If you place your card in its real role it will have +1 in dribble and in defense
  11. The defense is the ability to counter a dribble. If a card A (6 dribble, 3 defense) attacks a card B (2 dribble, 4 defense). The card A will dribble B for sure because 6 >= 4 and will go out of the game. A will stay in the game because 3 >= 2 but Aโ€™s defense will be decremented to 1.
  12. You can define your team captain while creating your deck. Your team captain will have +1 in dribble and defense.
  13. When the adversary board is empty, your cards will score a goal and you'll win the round
  14. If both players don't have cards anymore the round is a draw
  15. The number of rounds played to finish a game is unlimited

Components

Onchain smart contracts

Onchain part of the game is located in onchain directory.

It's a set of Starknet smart contracts written in Cairo.

The project is using dojo. If you are not familiar with it, please read the Dojo book.

You absolutely need to install the dojo toolchain if you want to do anything related to smart contracts.

curl -L https://install.dojoengine.org | bash
dojoup

For a more detailed onboarding please read the installation guide

Run tests

Within contracts directory run:

sozo test

You should see something like this:

Updating git repository https://github.com/dojoengine/dojo
running 2 tests
test tsubasa::card::tests::test_move ... ok
test tsubasa::game::tests::test_move ... ok
test result: ok. 2 passed; 0 failed; 0 ignored; 0 filtered out;

Frontend

Within game-app directory run:

npm i
npm run dev

You should see something like this:

> [email protected] dev
> next dev

- ready started server on 0.0.0.0:3000, url: http://localhost:3000
- event compiled client and server successfully in 79 ms (20 modules)
- wait compiling...
- event compiled client and server successfully in 87 ms (20 modules)

๐Ÿค Contribute

We're always looking for passionate developers to join our community and contribute to Tsubasa. Check out our contributing guide for more information on how to get started.

๐Ÿ“– License

This project is licensed under the MIT license.

See LICENSE for more information.

Happy coding! ๐ŸŽ‰

Contributors โœจ

Thanks goes to these wonderful people (emoji key):

Abdel @ StarkWare
Abdel @ StarkWare

๐Ÿ’ป
Lucas @ StarkWare
Lucas @ StarkWare

๐Ÿ’ป ๐Ÿ“– โš ๏ธ
clicksave
clicksave

๐ŸŽจ
ElegantShinobi
ElegantShinobi

๐ŸŽจ
Yohan @ScreenshotLabs
Yohan @ScreenshotLabs

๐Ÿ’ป โš ๏ธ
Pia
Pia

๐Ÿ’ป โš ๏ธ
A5Farmer
A5Farmer

๐Ÿ’ป โš ๏ธ
notV4l
notV4l

๐Ÿ’ป โš ๏ธ
Teddy Not Bear
Teddy Not Bear

๐Ÿ’ป โš ๏ธ
Ayush Tomar
Ayush Tomar

๐Ÿ’ป โš ๏ธ
Rรฉmi Roycourt
Rรฉmi Roycourt

๐Ÿ’ป โš ๏ธ
Daniel Bejarano
Daniel Bejarano

๐Ÿ’ป โš ๏ธ
Matthias
Matthias

๐Ÿ’ป โš ๏ธ
0xNac
0xNac

๐Ÿ’ป โš ๏ธ

This project follows the all-contributors specification. Contributions of any kind welcome!

tsubasa's People

Contributors

0xlucqs avatar abdelstark avatar cheelax avatar remiroyc avatar ayushtom avatar notv4l avatar yohantz avatar hypekn1ght avatar rkdud007 avatar teddynotbear avatar whoisnac avatar dbejarano820 avatar eikix avatar ponderingdemocritus avatar matth26 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.