Git Product home page Git Product logo

progtabor2015's Introduction

progtabor2015

A Szent István gimnázium által szervezett 2015-ös Programozói táborra készülő játék.

##A játékszerver működése: A szerver a MARTON-FREE-2 wifi hálózaton van a 192.168.0.112 ip címen és az 5555 porton kínálja fel a ZMQ csatornát.

Bővebben a ZMQ-ról: link

A Request-Response eljárást használjuk.

A használathoz telepítened kell a használt programozási nyelvnek megfelelő függvénykönyvtárat.

  • C# esetén:
  • A Visual Studioban telepítsd a nuget csomagtelepítővel a netMQ csomagot.
  • A többi teendő elvileg érthetővé válik a következő script elemzésével: link

A parancsok kiadása és a válaszok értelemzése a JSON adatstruktúra segítségével történik. Ehhez egy kis segítség:

  • C# esetén:
  • Szintén a nugettel kell telepíteni a newtonsoft JSON könyvtárat.
  • Ehhez segítség a következő honlapokon található: link
  • (A korábban ajánlott JSON könyvtárhoz a segédkód: link )

##Kérések és Válaszok a szerverrel:

Mindenhol ahol szöveg az adattípus idézőjeleket "" használok, mindehol ahol egész szám van számokat írok, lebegőpontos adattípúosoknál pedig tizedestörteket írok a példákban.

  • Handshake Return a "World!" for a "Hello" request

  • getKey(teamName) returns a secret key, which is needed for the other requests

    example_request = {
        "action": "getKey",
        "team_name": "test"
    }
    example_response = {
        "secret": "kL4QBbPZRu"
    }
    
  • initLevel(level) resets drones, maps, timers, sets map to the given level return a the list of drone names

    example_request = {
        "action": "initLevel",
        "team_name": "test",
        "secret": "kL4QBbPZRu",
        "level": 1
    }
    example_response = {
        "drones": ["Muffin", "Baboo", "Prince_Charming"]
    }
    
  • moveDrone(name, acc, turn) Return actual datas (life, cooordinates, angle, acc, speed) Turn is in radians! Maximum speed is: 10 (pixel per tick) Acceleration is between: 1 and -1 (pixel per tick^2) Turn is between: +- 10*pi/180 (radian per tick) If crashed life is 0

    example_request = {
        "action": "moveDrone",
        "team_name": "test",
        "secret": "kL4QBbPZRu",
        "drone": "Baboo",
        "acceleration": 0.3,
        "turn ": 0.45
    }
    example_response = {
        "life": 1,
        "x": 256.556,
        "y": 195.999,
        "angle": 2.67,
        "acceleration": -0.3
        "speed": 4.7
    }
    
  • getMeasure(name) return measurement of the drone

    example_request = {
        "action": "getMeasure",
        "team_name": "test",
        "secret": "kL4QBbPZRu",
        "drone": "Baboo"
    }
    example_response = {
        "result": 21.64
    }
    
  • tick() Drones alive: turn, accelerate, go ahead Increment and return tick.

    example_request = {
        "action": "tick",
        "team_name": "test",
        "secret": "kL4QBbPZRu"
    }
    example_response = {
        "tick": 14
    }
    
  • getScore(map) Evaluates sent map and original map similarity. (Only once per minute can be evaluated per user! --> only during competition) Returns Score, which is between 0 and 100, where 100 is the total match. The Map is a 2 dimesnional array of integers between 0 and 100, with 512x512 size.

    example_request = {
        "action": "getScore",
        "team_name": "test",
        "secret": "kL4QBbPZRu",
        "map": [[0, 0, 12, 0, 1, 33, 45, 0 ...], [0, 100, 100, ... 100, 0], [...] ... []]
    }
    example_response = {
        "score": 14
    }
    

progtabor2015's People

Contributors

r-rudolf avatar

Watchers

James Cloos avatar  avatar

progtabor2015's Issues

Webserver path

in Server.py, you add "Webserver", but the actual path is "WebServer"... (problem on Linux)

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.