Giter Club home page Giter Club logo

ink-workshop's Introduction

🦑 ink! 4.0 Workshop

This repository contains an interactive ink! workshop. We created it as a way of gamifying the experience of learning ink!.

The workshop is a game, in which students write a smart contract that plays on their behalf – an agent. The score function of the game was chosen in a way that it favors contracts that are using as little as gas possible to play the game. This can be done using smart contract best practices.

This repository contains:

  • game/: A smart contract that runs the game. Workshop participants have to register their player with the game contract.
  • basic-player: Example of a player contract.
  • frontend/: The Game UI, which the workshop instructor can put on a big screen, so that participants can see live how their agents are doing.

The idea is that anyone who wants can give this workshop can use the slides and instructions which will be provided here. We'll add slides on how to conduct the workshop soon!

There are two other relevant repositories:

ink-workshop's People

Contributors

athei avatar doubleotheven avatar cmichi avatar robbepop avatar peetzweg avatar statictype avatar lean-apple avatar alvicsam avatar peterwht avatar riusricardo avatar mutantcornholio avatar dependabot[bot] avatar

Stargazers

david avatar Dinh Ngoc Hien avatar Ganesh avatar  avatar Chai Phonbopit avatar Haruki Kondo avatar Crypto Wolf ◾️ avatar  avatar Kaloyan Gangov avatar  avatar Tomasz Waszczyk avatar figodomous avatar Will Pankiewicz avatar Satyam Agrawal avatar  avatar

Watchers

Andrew Jones avatar  avatar James Cloos avatar Sasha Gryaznov avatar Jutta Steiner avatar  avatar Alejandro Martinez Andres avatar ddorgan avatar  avatar  avatar Crypto Wolf ◾️ avatar figodomous avatar

ink-workshop's Issues

Player names should be bigger

On the big screen the player names were hard to read. Since we limit the player name to a length of 16 anyway, we should choose the font size so that with 16 characters it takes up most of the space.

screenshot-splash use ink-2023 02 07-18_00_56

Frontend doesn't start

I have built and deploy ink-workshop smart contract in contract ui Shibuya testnet in polkadotjs. Then I started frontend and input game contract address. But game doesn't start instead it show this screen. Can anybody tell me why game doesn't start?

Screenshot 2023-01-29 at 12 38 45

Make the UI i18n ready

Please introduce i18n for the UI. Supported languages should be: English and Spanish.

We'll have someone translate all the texts to Spanish in December, there should then already be a text file which we can hand that person.

The user that instantiates a new game contract on-chain should select the language as part of the game constructor. The UI should just adapt based on which language was chosen there. So you'll need to add a language constructor parameter + getter to the contract.

There should be no way for users to switch the language.

Display event notifications

Follow-up to #20.

ToDos

(1) For the events we should choose funny descriptions, inspired by the Worms games. There's likely even a page online that lists the notification texts for Worms. Can you check if you can find one? That would be ideal as inspiration.

(2) Please display those contract events in notifications that are ephemeral and fade-out after some time.

(3) Besides the contract emitted events you can think about adding notifications for events that the UI can derive on its own, e.g. "game about to end soon".

(4) For those funny descriptions, we should have an Array of ones to choose from and the UI should select one by random. So that it's not always the same text for "player registered", but instead things like "$player decided to join the party", "$player found his courage and joined", "$player in da house".

For other events we could have things like

  • changes in the scoreboard: "Behold, $player just went to the top" or "$player decided to make an excursion to the end".

(5) Please already make this i18n ready, so that we can do the workshop in Spanish for Buenos Aires by just adding translations.

Add events to `game` contract

Please add events for whatever constitutes a state change.

Besides those, what I think could be interesting for the UI:

  • player registered
  • changes in the scoreboard
  • players failing to paint a field due to it already being painted
  • game ended

Choose as distinct colors as possible

There are libraries out there that give you distinct colors. Please take one of those and apply it in a way that the second player that registers gets a maximally distinct color from the first one, the third should get another maximally distinct color, and so on.

UI Improvements

ToDo

  • Fix sorting of players on scoreboard
  • Make scoreboard scrollable
  • Allow emoji's in player names
  • Add *.lottie animations
  • Remove numbers inside the cells (when the playing field is large they get unreadable)

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.