GithubHelp home page GithubHelp logo

deterministic-risk's Introduction

CI GitHub pull request check contexts GitHub pull requests GitHub Release Date GitHub commit activity GitHub all releases

Deterministic Risk

A deterministic, perfect information, version of the turn based Risk game.

Gameplay Demo

untitled.mp4

Game Guide

Deterministic Risk is the game for people who like playing Risk, but can't get a good roll to save their lives.

Winning:

You win when your opponent has no countries left in their possession.

Attacking:

Each turn is split into an attack and a reinforce phase. Suppose you want to attack country A with country B to conquer it. This is only possible if B has more units than A, and B is adjacent to A. Adjacency across oceans is represented with dashed white lines. After the attack, B is left with 1 unit, and A is left with B-A units. A is now under your ownership.

Reinforcing:

The reinforce phase automatically starts when you have no attacks to make or when you click on the "end attack" button. During the reinforce phase the number of reinforcements you get is the number of countries you own halved, then rounded up.

Controls:

In general: Click and drag to pan the map. During attack: Click to select a country that you own. Click again to attack a country that you don't own. During reinforcement: Left click to add a reinforcement. Right click to remove a reinforcement. You cannot remove more reinforcements than you have added.

Behind the Scenes

The allocation of countries to the blue and red players is done randomly when spawning. However, countries when being spawned, cannot be allocated such that they belong to different players and are adjacent. The player going first gets 3 countries with a unit distribution of [2,2,3]. The player going second gets 4 countries with a unit distribution of [1,2,2,3]. This is to counter the first player advantage.

The number of units in each country is determined randomly at the start of each game. There is a discrete probability distribution behind the randomness but there is no balance or intelligence behind it. For this reason a reroll spawn button is present so that you can reroll the number of units in each country and the allocation of the countries until both players agree that the game is balanced. (1)

How to Run

Use the standard version of the godot game engine run this game.

Use the mouse 3 button to pan across the map.

https://godotengine.org/download

Online Connection Guide

This game has no dedicated servers.

If both the host and the guest are not on the same LAN this will not work without a VLAN (eg: Hamachi, ZeroTier).

First the host must be waiting on the level select menu. Only then should the guest enter the IP address and connect. Once the waiting screen shows up on the guest, the host can select a level. Then both the host and guest should have synchronized game screens.

Future

(1) An AI for single player mode and to help determine the balance of a spawn is in the works.

Thanks

Thank you to Allan Ekai for the 4K images of the maps and help in play testing.

deterministic-risk's People

Contributors

ra314 avatar shinydeagle avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

shinydeagle

deterministic-risk's Issues

Limit panning

Limit panning to some distance away from the map. This is to avoid crashes on systems like Thomas's laptop.

Exit button

Not sure at which menu/menu's this button would be present. I leave it to your judgement.

Confirmation when ending attacking and ending reinforcement

Button to confirm that you're ending reinforcements, and that you're ending attack if there's unused reinforcements left and if there's available attacks to do.

Number of reinforcements left is just a variable.

There does exist a method to check if there's any attacks left, so just use that.

Create automated testing

It is possible, just need to think about what kind of tests you want to include.
Probably some basic stuff would be clicking two countries and seeing if the attack works as intended. This would be a separate scene that can be run on it's own that goes through all the tests and provides a report of some sort.

Reduce the amount of RPCs in the code

Hopefully some abstraction can be done and the number of RPC calls in code can go down. This will help if you decide to introduce 2+ players and also will reduce multiplayer issues.

Proposed Game Modes

What I think will be fun

  • If a country gets attacked more than once in the same turn, the next hit against it deals +1 damage
  • You can move units from one square to another by 'attacking' it. (It might leave the country with 0 reinforcements)
  • pandemic style, countries with higher reinforcements loose troops every x turns?

What I should be tried just to see if they're fun

  • If you conquer a country, that new country is fatigued and cannot attack
  • Whenever you conquer a country, you will remain with the half of the units fought.
    (If a 6 attacks a 2, 2 gets used, 2 will stay home and two will be at the new country)
  • Countries have a maximum reinforcement cap 2x of its starting amount.
    (If a country spawned with 4 units inside. The cap is 8.)
    (Player countries use their new amount as the cap.)
  • Allow attacking a country with less but this time let it go to the negatives, a country is the negative results in -1 reinforcements per turn. A negative total of reinforcements per turn results in you having to pick from where you want to remove troops
  • temporal, you can attack countries if in the previous turn you would've been able to attack them

Bottom UI bar

It should contain the round number.

The skull or crown should also appear next to the winner or loser at the bottom.

When it's not your turn the current pahse of the enemy should be communicated somehow.

Help menu should be interactive

It should details the currently active game modes and rules for all game modes.
This "help" should also be available when selecting a game mode.

Fix the random button

Currently both players do not end yup with the same map after blickcin on the random button.

Attacking country bug

The common compoentent, label update and the move animation should all be instead the if statement that checks can attack.

Also it seems like there's a bug where a lot more things are being set to fatigue than they should be. I was unable to do drains even when no fatigue symbol was showing overhead.

Improve create_mask_sprite

You don't need a mask for each color. Just have one mask who's color you modulate. yes just one, even between flashing whtie and blue for example. And you definitely don't need a grey mask, that's just transperent.

Menu navigation

This would be in the form of restarting a game.

And moving back and forth through the various menus.

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.