Coder Social home page Coder Social logo

ninjas's Introduction

Ninjas

Ninjas is a multiplayer game where players attempt to blend in with the computer controlled characters on their quest to either loot all five castles or to eliminate all of the other players.

NPCs will move randomly, will not die, and will not attack.

Players can stun NPCs, kill other players, attempt to regain anonymity using the smoke bomb, and attempt to secretly loot the castles.

When any player loots a castle he hasn't looted before the text "DING" will appear in the top corner of the screen. No further indication is given as to which castle was looted or which character was the looter.

Controls

  • A - Attack
  • S - Smoke bomb
  • N - New game
  • C - Clear messages
  • ESC - Quit game
  • Left Click - Move to clicked location
  • Right Click - Stop moving immediately

Installation

$ cabal install

Usage

Ninjas server [FLAGS] NUM_NINJAS
    --port=NUM    Server port
    --npcs=NUM    Number of NPCs
    --smokes=NUM  Number of initial smokebombs

Ninjas client [FLAGS] [HOSTNAME [PORT]]
    --server=STRING  Server hostname
    --port=NUM       Server port
    --user=STRING    User Name

ninjas's People

Contributors

cdxr avatar creswick avatar glguy avatar syntaxpolice avatar yav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ninjas's Issues

Enhancement: Bot Support

I'm building bot support and DSL to help teach my nieces, nephews, and daughters to program. I'd like to make sure what I build can get upstream.

  1. Add "Ninjas bot" support via a module Bot.hs. This module includes "runBot" which either uses a default bot or loads some bytecode from a file specified at runtime.

  2. Define a turning-complete byte code. No strong ideas here yet, but basic operations of Move, Attack, Smoke, and GetWorld would be included.

  3. Define a language 'Ninja'. This could be a "typical" DSL that includes the primitives and helper functions in the style of:

    distanceTo :: World -> Entity -> Int -- returns the distance to the taget
    followBeizer :: World -> Entity -> Command -- returns a Move command

    Or it could be a more restrictive language that takes a set of conditions for attacking, moving, and smoking. In this case the possible "conditions" and their logical connectives would be part of the language.

  4. Make a stand-alone compiler, shipped with Ninjas, that compiles Ninja to NBC - Ninja to Ninja bytecode. Also, write tutorials.

  5. Parameterize the step rate in the server to allow faster game play for tournaments or faster evolution of Ninjas (given a genetic algorithm).

  6. Add a server parameter that will identify the clients' Ninja, allowing easier development.

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.