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
Brawl Stars v31.96 server emulator written in Python.

Brawl Stars v31 Brawl Stars v31.96 server emulator written in Python. Requirements: Python 3.7 or higher pymongo dnspython colorama MongoDB configurat

9 Nov 26, 2021
狼人杀,线下面杀用,服务端语音播报,浏览器操作,移动端友好。不再需要真人法官~

Wolf 狼人杀面杀法官系统 Preview 如何使用 安装 Python 3.5.2 版本及以上(PyWebIO 要求) pip install -r requirements.txt python main.py 所有玩家访问 Web 服务 TODO,欢迎PR TTS 目前仅支持 macOS 未

Lake Chan 33 Nov 11, 2022
Flappy bird using Pygames

flappy-bird Esse é um jogo que eu fiz utilizando a biblioteca de jogos do Python

Leandro Henrique 2 Jan 05, 2022
NSI project --> 2D platformer in Python with Pygame

Projet de NSI (2021-2022): Jeu sous Python Collaborateurs: Remi K-S et Nathan D Lien de l'environnement IDE de Python en ligne: https://replit.com/@Re

Remi K-S 3 May 24, 2022
Atari2600 Training / Evaluation with RLlib

Training Atari2600 by Reinforcement Learning Train Atari2600 and check how it works! How to Setup You can setup packages on your local env. $ make set

Jinwoo Park (Curt) 1 Dec 12, 2021
Ultimaze est un jeu en 2.5D, réalisé dans le cadre d'un projet de NSI.

Ultimaze Ultimaze est un jeu en 2.5D, réalisé dans le cadre d'un projet de NSI. La consigne était d'utiliser la librairie pygame pour créer un jeu en

parlabarbedeMerlin 3 Sep 17, 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 python script that uses pygame to display fractals.

Pygame-Fractals A python script that uses pygame to display interactive fractals. There are 3 fractals on the script. They can be displayed on the col

michel 2 Feb 09, 2022
Projeto Flappy Bird temática doom, projeto python e pygame

Doom-Bird Tecnologias usadas Requisitos para inicializar o jogo: Python faça o download em: https://www.python.org/downloads/ Após instalar o Python d

João Guilherme 1 Dec 08, 2021
AI based assitant for minecarft

Minecraft_AI_assistant AI-based assistant for Minecraft There are 4 steps to build 1-I'm using collecting_data.png as a structure to take shots with c

Murat Ali Avcu 13 Oct 16, 2022
Text-Adventure-Game [Open Source] A group project by the Python TASK Force

Text-Adventure-Game [Open Source] A group project by the Python TASK Force

Mircea Dumitrescu 2 Sep 17, 2021
source codes for my(small indie game developer) games

My repository for most of my finished && unfinished games Table of Contents Getting Started Prerequisites Installation Usage License Contact Prerequis

Gustavs Jākobsons 1 Jan 30, 2022
This is a basic virtual quiz game using opencv-python

Basic Virtual-Quiz-Game This is a basic structure of a virtual quiz game using opencv-python. As the camera window opens up we can see the questions a

2 Dec 11, 2021
Rock Paper Scissors Game with PyQt5

Rock-Paper-Scissors-Game rock paper scissors is a old game that all of us played it but this time let's play with computer Description This is Rock Pa

MohammadAli.HBA 4 Nov 11, 2021
Game of life, with python code.

Game of Life The Game of Life, also known simply as Life, is a cellular automaton. It is a zero-player game, meaning that its evolution is determined

Mohammad Dori 3 Jul 15, 2022
A visualization of how much Manchester United fans enjoyed each game from the first half of the 21/22 Premier League season.

Man-Utd-Fan-Satisfaction-Levels-First-19-games A visualization of how much Manchester United fans enjoyed each game from the first half of the 21/22 P

1 Jan 19, 2022
Software Design | Spring 2020 | Classic Arcade Game

Breakout Software Design Final Project, Spring 2020 Team members: Izumi, Lilo For our Interactive Visualization, we implemented the classic arcade gam

Lilo Heinrich 1 Jul 26, 2022
Easy and fun game to play a bit. Written in python

NumGuesser Easy and fun game to play a bit. Written in python

Lodi#0001 4 May 22, 2022
Mandaw 2 Mar 01, 2022
Quiz Game: answering questions naturally with a friendly UI to enjoy the game

About Quiz Game : The Game is about answering questions naturally with a friendl

4 Jan 19, 2022