A python-based multi-player online educational game for students to play in a class or club setting.

Overview

Kurono (codename: aimmo)

Workflow Status codecov PRs Welcome Zenhub Shield

Kurono Game

Code for Life has been developed by Ocado Technology as a free, open-source project to inspire the next generation of computer scientists and to help teachers deliver the computing curriculum.

Kurono is a Code for Life project, aimed at teaching students and keen adults programming with Python. The game is designed to be played in a class or a group setting, as it simulates a multiplayer online game.

We are open to contributors from anywhere around the world. Please read ahead if you'd like to get involved.

To get started



Kurono Logo

Comments
  • [New UI] Unity Build in React

    [New UI] Unity Build in React

    When merging, merge this along with PR: https://github.com/ocadotechnology/aimmo-unity/pull/211.

    Some of the changes:

    • Docs changed
    • Parcel is now not minifying code as well as caching has been disabled.
    • Introduces 3rd party react-unity-webgl package.
    • Makes use of the helper function @mrniket wrote for snapshot testing in current tests.
    • We register an external listener for a function here SendAllConnect() and we dispatch calls to Unity's webGL build too.
    • New reducer, new store format, loads of new types.
    • API used in our epics for unity slightly changed. It's parameterised for a generic case but we left epics separate.
    • Little refactoring of players in aimmo.

    Things that could be improved and we should discuss for future:

    • Error catching. Right now our React has very little error catching. Some of the stuff I've added here is also poorly caught. We sometimes use catchError() but even then we don't use the error object to use that information. Even worse, we can have a success action in redux being returned by the epic but when we emit a certain function call to Unity, SendMessage() call might fail and we have no way of catching that through the redux stuff?
    • Marble tests are probably incorrect for the epics. At first when I had two marbles, with events at frame 10 everything was fine. Now even when the first event, a, is dispatched at frame 10, the success response happens at frame 0. It also completes, which we probably don't want to happen. Unsure what's happening here. Tests passing right now because I emit the first event at 0 and expect a success and completion at 0 as well.
    • Styling is completely wrong. When resizing after the WebGL loads the website goes crazy.

    This change is Reviewable

    opened by OlafSzmidt 49
  • Setup base React project

    Setup base React project

    This PR adds a react project with an example to the game_frontend folder inside of this repo. It also includes documentation and examples of how to test each part of the project. Please have a look and comment on the architecture!

    This change is Reviewable

    opened by mrniket 29
  • Update AI:MMO student challenge sheets

    Update AI:MMO student challenge sheets

    Description

    To reflect feedback from teachers and user testing, that we want to hide the scary imports and the use of (object). Rebecca and I also discussed changing the default code from

    class Avatar:
    	def next_turn(self, avatar_state, world_state):
    		return MoveAction(random.choice(direction.ALL_DIRECTIONS))
    

    To

    class Avatar:
    	def next_turn(self, avatar_state, world_state):
    		return MoveAction(direction.NORTH)
    

    As too much time is required in a lesson to explain the imports and changing the default code from all directions to N,S,E or W.

    Acceptance criteria

    The challenges will need to be rewritten to reflect Challenge 1

    • [ ] Removing the handle_turn() introduction
    • [ ] Getting the class to move their avatar the direction to something other than direction.NORTH
    • [ ] Add the relevant move commands from the Cheat Sheet to this document to keep the lesson more focused (stop players from trying to attack rather than focussing on the lesson!)

    Challenge 2

    • [ ] Removing the handle_turn() introduction and update Fig. 1 – Default code
    • [ ] Better explaination of the avatar_state.location code by adding the info from the Cheat sheet)

    Analytics

    • [ ] Test with a class
    UX/UI teaching resources 
    opened by j4mesholland 21
  • Black screen of doom on AIMMO game map

    Black screen of doom on AIMMO game map

    Describe the bug When user testing in schools, some players' browsers don't load in the game map. The Unity logo appears when loading the map, however, the map does not load and just shows a black screen in place of the map.

    To Reproduce Steps to reproduce the behaviour: We are not sure if this is a network issue (firewall/blocking software) in schools as we haven't been able to reproduce the issue on a regular basis here.

    Expected behaviour The game map should load but doesn't.

    Screenshots After the lesson on Friday, we and I had a look to see if we could discover the problem. As Chrome is locked down on the school computers (‘Inspect’ is greyed out), we took a look on Edge. I took some screen grabs, which may, or may not tell us something….

    The black game screen in Chrome IMG_1888.jpg

    and in IE, oddly, no black screen but the map still doesn't load: IMG_1889.jpg

    The errors in Edge: IMG_1891.jpg

    IMG_1892.jpg

    IMG_1890.jpg

    Desktop (please complete the following information):

    • OS: Windows 10
    • Browser [Chrome]
    • Version [Not sure]

    Additional context Add any other context about the problem here.

    bug 
    opened by j4mesholland 21
  • Test cheat sheet code on AI:MMO

    Test cheat sheet code on AI:MMO

    opened by j4mesholland 17
  • Auth tokens

    Auth tokens

    Olaf: Closing this pull request to stale it. We will review this at a later stage and perhaps re-open it.

    Requires #124 as that adds the models in the backend (diff with just this pull request).

    Whenever a component receives a request, the receiver should check authentication from the caller. Workers should never know any other components auth token due to running user code.

    Places where needs/has been implemented:

    • [x] players/creator interface (needs a new auth token generated before the creator app is started).
    • [x] players/game interface (game auth token).
    • [x] game/worker interface (avatar auth token).
    opened by joshuablake 15
  • Worker should not participate in game if Avatar initialization fails

    Worker should not participate in game if Avatar initialization fails

    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
        return self.wsgi_app(environ, start_response)
      File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
        response = self.make_response(self.handle_exception(e))
      File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
        reraise(exc_type, exc_value, tb)
      File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
        response = self.full_dispatch_request()
      File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
        rv = self.handle_user_exception(e)
      File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
        reraise(exc_type, exc_value, tb)
      File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
        rv = self.dispatch_request()
      File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
        return self.view_functions[rule.endpoint](**req.view_args)
      File "/Users/wael.aljeshi/Documents/c4l/aimmo/aimmo-game-worker/service.py", line 38, in process_turn
        action = avatar.handle_turn(avatar_state, world_map)
    AttributeError: 'NoneType' object has no attribute 'handle_turn'
    
    bug help wanted 
    opened by jishi9 13
  • World

    World "era" state

    Once again, during serialization, we realized we need to add an era element to our JSON in order to decide what assets will be used in the back end.

    This element will be passed on the highest level from service.py, probably somewhat close to what you can see below in the screen-shot. We need this functionality.

    opened by OlafSzmidt 12
  • Obstacles: width, height, type, orientation

    Obstacles: width, height, type, orientation

    The serialisation we're currently implementing with @mrniket passes a JSON with the following fields:

    width, height, type, orientation.

    • [ ] We need to add more obstacle logic (such doesn't exist right now, we assume any cell that has False as its habitable value is an obstacle, no getters etc all).
    • [ ] Introduce the concept of width and height to obstacles.
    • [ ] Obstacles should have different types. For example, it could be a wall.
    • [ ] We need orientation for rendering purposes.
    opened by OlafSzmidt 12
  • Bring the repo back to a working state. Reverting a long time!

    Bring the repo back to a working state. Reverting a long time!

    As discussed with @Spycho, @CelineBoudier and everyone else; we are reverting the game to the last known working state.

    Could everyone please, test this if the game works properly? Use the test plan to see if the game works properly. It would be nice to see this being tested on both Windows and Linux.

    The test plan as we stand can be found here (it's being rewrittento this).

    opened by OlafSzmidt 12
  • Futurize the codebase for py2/3

    Futurize the codebase for py2/3

    The following log shows the results of a potential stage 1 application of futurize to port the codebase to py2/3. It might break some things.

    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    RefactoringTool: Skipping optional fixer: idioms
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    RefactoringTool: Skipping optional fixer: ws_comma
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
    RefactoringTool: Refactored all_tests.py
    --- all_tests.py	(original)
    +++ all_tests.py	(refactored)
    @@ -7,6 +7,7 @@
     Optional arguments:
         -c, --coverage  compute the coverage while running tests.
     """
    +from __future__ import print_function
     
     import os
     import subprocess
    RefactoringTool: No changes to minikube.py
    RefactoringTool: No changes to render-manifests.py
    RefactoringTool: Refactored run.py
    --- run.py	(original)
    +++ run.py	(refactored)
    @@ -1,4 +1,5 @@
     #!/usr/bin/env python
    +from __future__ import print_function
     import logging
     import os
     import signal
    @@ -33,7 +34,7 @@
     
     
     def log(message):
    -    print >> sys.stderr, message
    +    print(message, file=sys.stderr)
     
     
     def run_command(args, capture_output=False):
    RefactoringTool: No changes to versioneer.py
    RefactoringTool: Files that need to be modified:
    RefactoringTool: all_tests.py
    RefactoringTool: minikube.py
    RefactoringTool: render-manifests.py
    RefactoringTool: run.py
    RefactoringTool: versioneer.py
    
    help wanted priority: low 
    opened by OlafSzmidt 11
  • Backpack Attribute Erro

    Backpack Attribute Erro

    Describe the bug When trying to use the backpack, the module doesn't exist on avatar_state (AttributeError: 'AvatarState' object has no attribute 'backpack') To Reproduce Steps to reproduce the behavior:

    1. Go to kurono
    2. Try to access your backpack
    3. Execute Code

    Expected behavior Backpack being a module of avatar_state, allowing me to access it's information.

    Desktop (please complete the following information):

    • OS: Windows
    • Browser Chrome

    Additional context Doing this for a school project, quite easy, but good idea!

    opened by WhineyMonkey10 0
  • Kurono feedback error

    Kurono feedback error

    Challenge 4 - If there is no nearby artefact, the console will return:

    Uh oh! Something isn't correct on line 43. Here's the error we got: simulation.errors.NoNearbyArtefactsError: There aren't any nearby artefacts, you need to move closer!

    This then blocks any code after this, so if you want to check through your backpack to check your items, you need to be within range of an artefact.

    We need to let the user know this, or change the solution to part two and ask the user to remove the previous locate code before searching through the bag.

    UX/UI 
    opened by lauracumming 0
  • Update Kurono avatar marker

    Update Kurono avatar marker

    Task Description

    The marker has been flagged as too subtle. We need to implement the new design for it.

    Acceptance Criteria

    • [ ] Implement new marker in Babylon to replace the old blue diamond
    • [ ] Animate it, possibly having it jump up and down?

    Analytics Requirements

    None

    Copywrite Requirements

    None

    UX/UI 
    opened by faucomte97 0
  • Flexible windows in Kurono

    Flexible windows in Kurono

    Task Description

    Make the windows flexible in Kurono

    Acceptance Criteria

    • [ ] Make the game window resizable (vertical)
    • [ ] Make the console log resizable (horizontal)
    • [ ] Automatic testing

    Analytics Requirements

    None

    Copywrite Requirements

    None

    opened by razvan-pro 0
  • Remove artefacts from Worksheet 1

    Remove artefacts from Worksheet 1

    Task Description

    Worksheet 1 has artefacts even though the lesson doesn't make use of it. Feedback from teachers has told us it is confusing the students.

    Acceptance Criteria

    • [ ] Remove the artefacts from Worksheet 1

    Analytics Requirements

    None

    Copywrite Requirements

    None

    opened by faucomte97 0
Releases(v2.5.10)
Owner
Ocado Technology
Ocado Technology
Hagia is a 2D game engine and toolset for Python.

HAGIA What is Hagia? Hagia is a 2D game engine and toolset for Python. Hagia has

star 3 Jun 01, 2022
A simple matrix code rain created using Python with Pygame.

Matrix4_code_rain A simple matrix code rain created using Python with Pygame. To run the code you will need Pygame and MS Mincho font. Create a projec

7 Nov 06, 2022
This is Minesweeper coded in Python. It has almost all features from the main game

Minesweeper This is Minesweeper coded in Python. It has almost all features from the main game Use right click to open tile, right click on an open ti

3 Jul 12, 2022
An exploration of a fantasy world, to autobattle your way to ruling the demesne.

Not Quite Paradise 2 (no relation to NQP, I just like the name enough to want to keep it.) Badges! Current position: Quality of last commit: Who dunni

9 Mar 12, 2022
Tictactoe py tkinter canvas - Tic Tac Toe written in Python 3 with tkinter mainly using canvas

Python 3 Tic Tac Toe with tkinter This is a tkinter version of my Tic Tac Toe ga

Bojan Adzic 1 Jan 09, 2022
WIP python/pygame 2D zombie shooter

2d-shooter project A single/multiplayer co-op survival small space zombie shooter. If you'd like to contribute, feel free to join the discord! INSTALL

36 Dec 08, 2022
Ladder network is a deep learning algorithm that combines supervised and unsupervised learning

This repository contains source code for the experiments in a paper titled Semi-Supervised Learning with Ladder Networks by A Rasmus, H Valpola, M Hon

Curious AI 505 Nov 15, 2022
Un semplice Snake game , come negli anni 90!

Project-SnakeGame Un semplice Snake game , come negli anni 90! ITA VI porto un semplice giochino per i nostalgini degli anni 90 , ispirato al vecchio

Matt K Lawrence 1 Oct 17, 2021
MCRPC (Minecraft Resource Pack Comparator) checks your resource pack against any version of Minecraft to show resources missing from your pack for that version.

Minecraft Resource Pack Comparator MCRPC checks your resource pack against any version of Minecraft to show resources missing from your pack for that

3 Nov 03, 2022
AI plays games with python

AI-plays-games- To use it, you first need to create an img file and save the pic

Murat Ali Avcu 7 Oct 16, 2022
A rhythm-based game that automatically generates obstacles based on a song's features.

DISCLAIMER: This is my first coding project, created in December 2019. The game may not be optimized, and looking back on it, there are a lot of chang

Kenneth Huang 1 Dec 27, 2021
Minecraft-Bedrock-Modpack-Maker - Simple tool to combine multiple addons into one. Not finished

Minecraft-Bedrock-Modpack-Maker Simple tool to combine multiple addons into one. Not finished! Any contributing is welcome. How to use: Move all .mcpa

MivianCoin 1 Jan 06, 2022
Flappy Bird Game using Pygame in Python

Flappy Bird Game using Pygame in Python Demo Pages Hello dear, hope you are very well! I created Flappy Bird Game using Pygame ( Pygame is a cross-pla

Datt Panchal 3 Feb 05, 2022
Made to help you create UI using pygame in python, gonna add way more to this project

Pygame visualizer Made to help you create UI using pygame in python, gonna add way more to this project. As of now, this is only hours worth of work.

Ayza 2 Feb 08, 2022
Brawl Stars private server for version 30.242

Brawl Stars v30 Brawl Stars v30.242 server emulator written in Python. Requirements: Python 3.7 or higher pymongo dnspython colorama Running the serve

15 Oct 17, 2021
Client-Server design (guess the closest number to the average score game)

Multiplayer game (enter the number closest to the average) Design Client-Server design The client's side is responsible for sending numbers from the g

Adam Piszczek 0 Jun 29, 2022
A minecraft bedrock server software written in python (3.X)

Podrum README also available in: English 🇺🇸 Français 🇫🇷 Deutsch 🇩🇪 Español 🇪🇸 Tiếng Việt 🇻🇳 Italiana 🇮🇹 Русский 🇷🇺 中文 🇨🇳 Is a Minecraf

Podrum 53 Nov 11, 2022
This is a python implementation of wordle, which uses the same set of available words as the hit game, Wordle

Wordle Game This is a python implementation of wordle, which uses the same set of available words as the hit game, Wordle. Play the game manually pyth

Pierre Theo Klein 11 Mar 04, 2022
Chess game for 2 players with UI

2-D Chess for 2 players Overview This is a simple 2D Chess game for 2 players using pygame library. Requirements To be able to run this game, you must

7 Apr 06, 2022
PLVRA is a TUI (Terminal User Interface) implementation of wordle / termo in portuguese, written in Python

PLVRA is a TUI (Terminal User Interface) implementation of wordle / termo in portuguese, written in Python

Enzo Shiraishi 1 Feb 11, 2022