Giter Club home page Giter Club logo

othello's Introduction

Othello

An online implementation of the classic game of othello. You can create a server and play against your friends. Offline mode is currently unavailable, but will surely come back. Be aware, that this game is currently in early development stages and may not run to your satisfaction. Now that you are warned, the next part will explain how to compile and run the game, once you have aquired the source code.

How do I run the game?


Prerequesites:

Othello is written in rust and uses the rust packet manager cargo to manage its dependencies and targets, so you will need to install both in order to compile and run this project. Also, you will need to install the C-Bindings for sfml2 on your computer, since this project relies on it for its graphics code. (If you are using a packet manager, look for either csml or maybe just sfml and they should pop up.)

Starting a server:

If you want to start a debug server, you can start one with:

cargo run --bin server

The port the server is going to listen to is specified in the server.toml. By default it will be 44942.

Starting a client and connecting:

If you know a server, or have started one yourself, you will want to connect to it. Currently, the Server address is managed in the client.toml, which should be fairly straightforward to edit. Let it just be said, that the login name does not have to be provided in the client.toml. In that case you can enter one once prompted by the client. The client can again be started using cargo using:

cargo run --bin client

If you want to compile the game to run it without using cargo, you can use

cargo build --release

to build the release binaries which then can be found in the target/ folder. You can then provide the port for the server to listen to as a command line argument. The data files will then need to go into the same directory as the executable.

Playing the game:

Finally, the fun part. Once you have started the game you will be greeted with a rather blank console. Just try entering help and the program will hopefully successfully talk you through from there.

Contributing


Contributions are highly welcomed in any form. The game is in early development, so I am sure you will encounter a multitude of bugs or things you would like to change. If you have the spare time (after all, you're playing othello.. right?), please feel free to open an issue on the issue tracker, or if getting to work on it yourself is more your style, please don't hesitate to create a pull request.

othello's People

Contributors

lordsentox avatar scosh avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

othello's Issues

Fullscreen Mode

Should there be a fullscreen mode for the game? What exactly would it look like? How would the elements scale, the background be filled, etc?

Fix error message for client.toml

It should be something along the lines of your client.toml configurations are wrong and suck

instead of Could not find configuration file 'client.toml'

Polish up terminal interface

This issue includes suggestions for a better terminal interface in the final version of the game:

  • coloured output (potentially using this package)
  • a more useful welcome message
  • tab-completion?

Animation

The technicalities of how this project should handle animation should be decided on. Should the game load image sequences of externally created graphics/animations, or should all the animations be interpolated by the game itself? Or must both techniques, by necessity, be used depending on the complexity of any given animation?

Or is the game perhaps better off without animations altogether? (development-resource-wise, but perhaps also from a visual design perspective -> the minimalism could suit the project better)

If 'in-software' animation is used, there should be a more-or-less friendly way for interpolated animations to be written/modified by graphic artists and programmers.

Request and accept a game

A player can request a game of othello from another player on the server.
The other player should be able to accept or deny this game and relay that to the other player.
The server creates a new instance for them and sets the game up.

Config file

It is tedious to always provide everything on the command line.
A config file would be much nicer and is already kind of underway in form of the server.toml
which is currently unused.

Test a different shading/gradient method

The board is currently drawn to emulate a lamp pointed down at the centre of the board. This is baked into the board.png texture as a coloured gradient. Should I try to have shadows be cast over the pieces and the board as a seperate texture?

This problem is especially obvious with pieces on the boards edges and it also results in the game board looking very repetitive when there are many pieces on the board.

This could potentially be alleviated if a texture for the 'lights/shadows' is used separately and drawn above all the elements as an overlay or multiply.

However, this might also make the board less visually readable, if done poorly โ€ฆ

Server crash on same name

When a client attempts to login with a name that had already been taken, instead of gracefully declining the client the server just crashes.

Turn based othello

Once the players can place stones on the board, the server needs to manage the turns of the players to avoid mayhem and let the players play to the actual rules of othello.

Packets that make sense

Currently, the packets do not have much access to the server context.
That should change, but also the packets should be kept simple and slim.

Config file placement

At the moment, if someone changes their local config files, the changes are always getting pushed. This is of course not desirable. It should already be okey, if the config files are added to the .gitignore and then the ones that are synced are the example config files, which you can copy and rename. Then everyone can customise their config files without worrying if it
upsets the repo state.
However, a finanl solution is open to debate.

Multiple games

One player may want to play against multiple opponents at a time, so it should be possible to
have multiple games running, and not just one.

List when status changes

When players disconnect from or connect to a server, the updated client list should be relayed to all other clients as a status report.

Make window resizable

The player should be able to choose how big the game should be, so that it works on all screen sizes.

Determine Overall Graphical Style

Currently, two general visual design approaches exist that are diametrically at odds, and the question is which of the two to use for the final game to strike a good balance between good game feel and avoiding unnecessary complexity and effort in regards to developing graphics, which is not the main focus of this project.

README File

I don't know what to do to start the game.

Make UX/GUI Mockups

Once the graphical style of the game baord is more or less fixed, the desired interface elements should be determined, created and set.

Furthermore, to visualise the appropriate UX flow of these interface elements, mockups showing possible or final solutions to these problems, could be helpful.

First, the UX and look of the GUI should be thought about (e.g. on paper) and drawn.

Mockups will only be created if they are necessary to communicate certain design ideas. Therefor, this goal is marked as optional.

Score is a useless struct

Everything the Score does could be much better placed into the board implementation.
The DrawableScore can then require to have a board reference to draw.

Place stones on the board

Once two players have started a game and have been assigned their colour, they can place stones on the board at places that are allowed by the rules of othello.

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.