Coder Social home page Coder Social logo

royalur / royalur.net Goto Github PK

View Code? Open in Web Editor NEW
167.0 3.0 15.0 4.84 MB

Play The Royal Game of Ur online! https://royalur.net

Home Page: https://royalur.net

License: MIT License

HTML 28.27% JavaScript 55.35% CSS 9.12% Python 7.18% Shell 0.08%
board-game royal-game-of-ur web-game html5-game royal-ur

royalur.net's Introduction

This is an archive of an old version of the website. We have since rewritten the website from the ground up using more modern technologies. However, we will keep this repository up for any who are interested! The new version of the website is no longer open-source.


๐ŸŽฒ RoyalUr.net

A website for playing the ancient Mesopotamian board game, The Royal Game of Ur!

This repository holds the client code for RoyalUr.net. The server code for RoyalUr.net can be found in the RoyalUrServer repository.

RoyalUr.net was created based upon the ancient Sumerian board game, The Royal Game of Ur, in the British Museum. The original board game can be dated to 2600 BC, and was discovered in a royal tomb in the city-state of Ur in ancient Mesopotamia. Learn more about the game on Wikipedia, or watch a fun match between Tom Scott and Irving Finkel on YouTube!

How much of the game is luck?

The answer is, less than you might think!

If you'd like to learn more about strategy and the role of luck in The Royal Game of Ur, check out our efforts over in the RoyalUrAnalysis repository. In that repository we're currently undergoing efforts to use our computers to help us better understand the strategy and luck involved The Royal Game of Ur.

Join the community!

If you're interested in The Royal Game of Ur, we have a Discord and a Reddit that you might want to check out! These are both good places to talk about the game, its strategies, and see cool board recreations that people have made! The Discord is also a great place to find strong opponents to challenge! We also post updates about the game on our Twitter.

๐Ÿ–ฅ๏ธ Compilation

This project uses Babel to transpile all Javascript to a single ES5 compatible file, as well as a Python script to generate the resource files needed for the site.

The following commands will compile the site to ./dist:
./compile.sh release -- Full clean compilation, with minified JS.
./compile.sh dev -- No minification, no cleaning of ./dist folder.

If you run into ./res file related issues during compilation, try updating your ./res folder.

To update the contents of your ./res folder as the resources used by RoyalUrClient change, simply delete it and let the compilation script download it again for you.

๐Ÿ› ๏ธ Project Architecture

A summary of the architecture of the client-side of RoyalUr.net can be found in ARCHITECTURE.md.

๐Ÿ’พ Resource Files

The image, audio, and annotation assets required by the project are not actually stored in git, due to git's poor handling of binary files. Instead, the script to compile the site will automatically download the resources for you from https://royalur.net/res.zip.

Contributors

A massive thanks to all contributors to the RoyalUrClient project!

royalur.net's People

Contributors

frostzt avatar fuzzymannerz avatar itaquito avatar phyrik avatar sothatsit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

royalur.net's Issues

Add a way to enter player names when starting games

Currently the player name is solely based off of your piece colour. It would be nice if users could edit this.

Either:

  1. Let users type in their name before they start their game.
  2. Let users edit their name by clicking on it within a game.

Also for local games users should be able to enter two names; one for each player.

Make the rules page interactive

Currently the rules page is just text without any images. It would be really nice if we added some visualisations to better explain the rules, or better yet make the rules page interactive. I'm envisioning a board below a series of tabs, and when a tab is hovered the rule is visualised on the board, and a description of the rule is given below the board.

The tabs could be:

Overall Goal: Get all of your pieces around and off the board!
Rolling Dice: Click on the dice to roll them.
Moving Pieces: To move one of your pieces drag it, double click it, or click on it and then its destination.
Attacking Pieces: If you move your piece on top of an opponents, their piece is knocked off the board.
Extra Moves: Moving your piece onto a lotus flower tile gives you an extra move!
Piece Safety: When your piece is on a lotus flower tile, your opponent cannot knock it off the board!

Use names for children of sprites

Currently it just uses their original location pre-compilation to identify the child images within each sprite. This is a bit messy, and it would be better if instead each child image was given a name during compilation.

Lotus Tile Animation

It would be cool if there was a special animation for landing on a lotus tile. I was thinking an outward expanding circular "explosion" type effect could be cool. A new sound would also be ideal for this.

Change the text when loading game assets

Currently the loading screen to get to the menu is identical to the loading screen when getting into a game. Would be nice to at least change the text to something like "Loading game assets..." to differentiate the two.

Confirm button when exiting game

If you are in a game and press the exit button, it should ask you to confirm... Especially since for computer games there is no way to get back to the game.

Redraw before switching to win screen

When a player wins it doesn't redraw the players score or the board. Would be nice if it updated it before the switch so that the score showed the full 7 tiles filled in.

Add more game modes

Currently there is only the basic route, but there are many more sets of game rules. Adding some more of these would be good, although preferably in a way that doesn't interfere with the website being easy to use.

Load smaller assets on smaller window sizes

Most of the time the full resolution assets are not needed. Could instead only load assets appropriate to the size of the browser window.

The generation of the different sizes of image should be done by the compilation script, and selected based upon classes of window size.
i.e. Have separate assets for different screen resolutions, then pick the smallest resolution that the browser window fits within and use the assets scaled for that browser size.

Example Resolutions:

  • unlimited x unlimited (full resolution assets)
  • unlimited x 2160 (4k assets)
  • unlimited x 1440 (1440p assets)
  • unlimited x 1080 (1080p assets)
  • unlimited x 720 (720p assets)
  • 2048 x 2732 (iPad Pro)
  • 1242 x 2688 (iPhone XS Max)
  • 1080 x 1920 (iPhone 8 Plus)
  • 750 x 1334 (iPhone 8)
  • 640 x 1136 (iPhone 5)

We don't need this many resolutions, but picking a few standard resolutions between full resolution and really small assets would help load times a lot.

Write a README

Currently there is no README for this repository, one should be written.

It should contain a description of the repository, how to compile the client, and some pointers on how to navigate the repository.

Initially only load menu screen assets.

Improve loading times by only requiring that the menu screen assets be loaded before showing the menu screen. The rest of the assets required during the game can then be loaded in the background.

Warning when increasing browser resolution

All the assets are loaded to fit the browser resolution when the page is loaded. This allows smaller assets to be loaded if bigger ones are not needed, however it also means if users increase the size of their browser it will look blurred. Detecting this and warning the user that they can reload to get higher quality assets may be a good solution.

Mobile Support

Currently the client does not behave correctly on mobile. This needs to be fixed.

The dice numbers change too much, and its confusing

Its too often that people read the dice and then later the number changes and it causes confusion. The animation is nice, but clarity is nicer. This needs to be re-worked.

I'm not sure the best option here, but a few potentials are:

  1. Change the numbers earlier (may look bad due to the numbers being offset).
  2. Immediately set the number to its final value and don't change it during the animation.

Add layout options

One user found it disorienting that the board was vertical because he was used to it being laid down horizontally. Would be nice when adding mobile layouts in #5 to also add the option to switch to a horizontal layout at the same time.

Add text to the loading screen

Some text would be nice to let the user know that the website is loading.

Could be fun to put in different fun messages, but just something simple like "The Royal Ur is loading" would be fine.

Add a rules page

Currently there is no page for users to teach them the game. This would help a lot to introduce people to the game.

Disable the exit button while switching screens

Currently if you double click the exit button on the learn screen, it will ask the user if they wish to exit to exit the game. This is confusing, but happens because the first click exits the learn screen, while the second exits the game screen. Disabling the exit button while switching screens would remove this problem.

Keyboard Shortcuts

Some keyboard shortcuts could be nice.
e.g. Press enter/space to roll your dice.

Option to play local games.

There should be an option so that people can play eachother locally, without requiring multiple computers or having to open multiple browser tabs.

Discord

Would be nice to have a place where people who play the game can talk. Helps towards building a community instead of this just being a random website.

There should be a link to this on the website if its created.

Less obtrusive play button UI.

The play button UI currently darkens the whole screen and pops open large buttons to select from. This should be made more subtle, so that instead a list of options expands below the play button when it is pressed. This will also work better when "local play" and "play with a friend" options are added.

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.