GithubHelp home page GithubHelp logo

planet-lia / planet-lia Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 6.0 9.08 MB

A platform for bot programming competitions.

Home Page: https://planetlia.com/

License: Apache License 2.0

Python 0.52% HTML 0.18% CSS 0.22% TypeScript 4.58% Dockerfile 0.03% Makefile 0.08% Go 2.99% Shell 0.24% Java 12.63% Kotlin 0.57% Batchfile 0.04% DIGITAL Command Language 77.93%
coding-challenge artificial-intelligence programming-contests programming-game educational-game programming-competitions education

planet-lia's Introduction

Planet Lia

Discord GitHub

Planet Lia is a bot programming platform for beginners and advanced coders alike, where you can use your coding skills to develop a bot for our video games and battle with it against other enthusiastic coders. Improve your coding skills, join the community and have fun!

Planet Lia

NOTE: We are still in the process of rebranding from Lia Game to Planet Lia and some inconsistencies may still be present in this repository. You are welcome to open a GitHub issue spotting any inconsistencies so that we do not overlook them.

Our Vision

With Planet Lia we want to build an open and friendly community and hub for bot programming video game competitions. Our goal is to provide the supporting technological as well as community infrastructure so that coders can enjoy in Planet Lia games as well as easily create their own game challenges and share them with others. Our goal is to build a community where programming is a way to connect with people, to bring fun and creativity to programming, have some healthy competition and learn from one another.

About the Repository

This is a single monorepo that holds everything related to the Planet Lia platform. Here is a quick overview of the structure of the repository:

  • backend - infrastructure that takes care of the user data, uploaded bots, generates matches, builds leaderboards and much more
  • cli - a tool that runs on your local machine and helps you develop your bots for Planet Lia games
  • game-utils - a set of tools that help game creators develop their Planet Lia games as effortlessly as possible
  • games - a collection of all available Planet Lia games
  • websites - code for our main Planet Lia website, the documentation and other important parts made for the web

โš ๏ธ We are still in process of open sourcing the whole Planet Lia platform and not all of its parts are already present in this repository. We will add the remaining parts as soon as we clean them up. In the current state you unfortunately can't build and run a full platform locally.

Code of Conduct

When participating in the Planet Lia community please follow our Code of Conduct.

Contributing

We are a small team behind this project and we really appreciate all the help from the community. There are many different ways that you can help the project:

Learn how to contribute in our Contributing Guide.

Join the Community

About Us

We are three students of Computer Science at the University of Ljubljana, Slovenia and we all love coding, collaborating, meeting new people and having some healthy and fun competition while improving our skills. We started working on Lia in early 2018 as a hobby project but it has since evolved into a fully fledged platform for bot programming video game competitions. We are working on Lia in our spare time so any help is appreciated!

planet-lia's People

Contributors

greenstatic avatar mariobm avatar matjazp avatar sn3m avatar svigelj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

planet-lia's Issues

Online editor Docker container image

Summary

Docker container image to run matches from the online editor. The image will accept source code and it should inject it into the bot implementation and run the game outputting the stdout/stderr as well as the final replay file.

Newsletter form on main website fails with no visual error/warning due to Firefox content blocking

When subscribing to the newsletter on the main page, if the user's browser has content blocking enabled for trackers the subscription form breaks and gives the user no visual feedback something is wrong.

Error in console:
console error

Although I have custom preferences for content blocking, Firefox has enabled Enhanced Tracking Protection on by default in new versions of Firefox. Therefore this could become an issue down the road.

Expected Behavior/Solution

Detect if content blocking is enabled (the HTTP request fails); display a warning, disable submission button and maybe instructions on how to add it to the exception list.

Current Behavior

The user receives no visual indication something is wrong, the form does nothing after clicking on subscribe.

Your Environment

Firefox macOS 69.0 (custom content blocking preferences with trackers and cookies blocked)

Epic: DevOps

Help to make developers life easier.

CI/CD

  • Github actions when commited to master (#29, #30, #31)
  • Backend services test and deploy
  • Website test and deploy
  • Documentation test and deploy
  • Games test and deploy
  • Infrastructure files deploy
  • CLI test, build and create a new release
  • Game utilities - test, build and deploy libraries to remote center (eg. Maven central)

Monitoring

  • Unified logs view across all services
  • Monitoring dasboard (performance, health, ...)
  • Alerting

Main website does not serve 404 pages

Expected Behavior

When visting e.g. https://planetlia.com/this-should-be-a-404 the page should return a 404 page.

Current Behavior

The router ignores the invalid page and serves the main (index) page.

GitHub Actions path field change

Summary

Our rant regarding the way GitHub Actions handle path triggers was a success!

In case GH Actions yml format changes, we need to fix our workflows do they don't break.

Epic: Local bot development

Improve CLI to support multiple Planet Lia games and better bot development workflow.

CLI (.lia)

  • Support multiple games
  • Use a web based replay viewer
  • Move prepare, cleanup and run configurations to bot implementations
  • List of CLI commands (WIP):
    • game #103
      • download - relative to cli
      • list
      • update
      • delete
      • automatically check for game updates
    • bot - uses pwd
      • new #104
      • build #104
      • update (is it worth it?)
      • delete #104
      • clean
      • upload
    • play ... [--game-path-manual] [-r replay-file-path] - if -r is not provided, the replay file is stored in replays/game-name/ relative to the cli location #106
    • replay [-f file-name]
      • Without provided file opens up a local match-viewer with index of all replays (live refresh) #105
      • Match viewer API:
        • List all replay files
        • Return selected file
        • List a specific file
      • Opens a specific replay file
    • prune [-y] [game-name]
    • help
    • settings
    • account
      • login
      • logout
      • status
    • gzip
    • update - get all the details from a repository cli-details.json config

Local Match Viewer

  • Create the site and integrate match viewer in it
  • Load replay files from local os
  • List all replay files

Write bot runtime stats to replay

Summary

Write bot runtime stats to replay file (standarize it!). Examples: number of timeouts, was it disqualified, disqualification time, response total duration, disqualification reason, team index

CI/CD for main website

Summary

Create a CI/CD pipeline to automatically deploy source from master to production web server.

This will probably be done using GitHub Actions + Netlify

CI/CD for backend

Summary

Create a CI/CD pipeline to deploy to our infrastructure.

This will include running unit tests, building the necessary Docker image and creating the necessary commit to our planet-lia/infrastructure repository.

Bot restrictions in base match-generator

Summary

Specify bot restrictions to base match-generator and it will enforce them automatically.

Tests

  • All bots not disqualified
  • All bots disqualified
  • Some bots disqualified
  • Bot times out few time but not disqualified
  • Bot times out and disqualified
  • Trying to send multiple requests in same turn
  • Trying to send multiple responses in same turn

Match viewer entering/exiting full screen occasional crash

Expected behavior

Match viewer should be able to enter or exit full screen.

Current behavior

Match viewer occasionally crashes when entering or exiting the full screen.

Context

It happens occassionally. Example error message:
image
image

Steps to reproduce

  1. Start switching between full screen and non full screen mode

Your environment

Chrome, Linux (KDE Neon)

Basic bot API

Summary

Short example in game-template of how to implement bot API.

Java generic bot

Summary

Create Java generic bot that can be used for any kind of Planet Lia game.

Epic: Game dev framework

Create a game development framework which will help developers creating Planet Lia games to more easily create their own games.

Game (Example Game)

  • Base LibGDX project #20
  • Main loop that can run with or without (debug view) displaying the game #21
  • Support any number of connected bots #22
  • Bot restrictions support #23
  • Add generic config support (loads a config) #35
  • Generic way of getting game state every tick (for custom tools) - Discord request #40
  • Add support for teams of bots #42
  • Pass through bot details to bots eg. who are his opponents and optionally ranks, link to external storage etc. #43
  • Log window in debug view where bots can write their logs #24
  • Debug view controls (play, pause, speed) #78
  • Debug view disable bot restrictions #79
  • Base entity that devs can extend and that can display entity details on hover #80
  • Basic bot API #90
  • Support for writing replay files #81
  • Write bot runtime stats to replay file (standarize it!). Examples: number of timeouts, was it disqualified, disqualification time, response total duration, disqualification reason, team index #82
  • Rename game-template to game-example #96
  • Remove default bots and implement Java and Kotlin for this example #97
  • Document game-example #83

Game Utils

  • Match viewer remove the need to specify file type (gzip, json, zip)
  • Export generic functions to library #98
  • Document library
  • Refactor basic bot implementations to be generic for any game
  • Tutorial on how to add new generic bot implementation for unsupported languages

Replay file examples

Examples where person can see the code, the replay json and what it does in the player

Entity Types

  • TextureEntity
  • TextEntity (text, time)
  • ParticleEntity

Attribute Interpolation

  • Linear Interpolation
  • Step Interpolation
  • Sine Interpolation
  • Circular Interpolation
  • Mixed Interpolation

Controlling entities

  • Entity attributes (rotation, scale, texture swap, opacity, visibility)
  • Multiple entities (obstacles)
  • Layer attribute
  • Entity animation
  • Attach simple
  • Attach rotation
  • Attach rotation and angle
  • Attach no scale
  • Attach with scale

Camera

  • Camera movement
  • Multiple cameras
  • HUD camera elements

Other

  • Charts (statistics)
  • Show entity path
  • Match details

Epic: Offline tournament environment

Support for generating local leaderboard and packing it with all games into a static html page.

Local Environment - Backend

  • Map uploaded bots to usernames and emails
  • Generate matches in parallel
  • Store results of matches
  • Keep track of the leaderboard
  • Define matchmaking logic

Local Environment - Frontend

  • Leaderboard page
  • Games page
  • Games page filter by user
  • Deploy website

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.