GithubHelp home page GithubHelp logo

capturetheflag's Introduction

CaptureTheFlag

Socket based capture the flag game, inspired by project brainstorming for CS-3900 Practical Software Development.

This project is being written partially for fun, and partially to learn c++ and make files.

Overview

The capture the flag program will work by starting a "referee" program listening on a TCP port. This referee will handle all of the players and teams that are participating in a given game, and take requests from the players: eg, look, go north, go south, say <message>, etc. To play, the competitors will connect to the socket and issue streams of commands to get interact with the game map and other players. Because the commands and the return values are both human and machine readable, the game can either be played in person or using AIs written in a language that is capable of connecting to TCP sockets.

Building/Compiling

This should simply be a matter of running make in the project directory. Currently, this builds a test bed called gcTest that will run some checks of various game objects and a referee program called referee.

referee Program

Command Line Arguments

  • -p Sets the port that the referee will listen for connections on. Default: 8042
  • -t Sets the number of teams in the game. Default: 2

Player Commands

The commands that are available to be run by the players are as follows. Commands that require a player to be signed in are marked by a star (*).

  • *getLocation Gets the x/y coordinates of the player. Ability to select output formatting (eg, tuple, JSON, plain text) will be added at a later date
  • help Prints a list of available commands
  • *joinTeam [team number | team name] Joins a specified team. If one integer argument is given, the referee will try to add the player to that team. Else, the referee will try to add the player to a team whose name is all of the arguments concatenated together. A maximum number of players per team will be enforced at a later date.
  • listPlayers Gets a list of the ID, nicknames, and team of every player that is currently signed in.
  • listTeams Gets a list of the ID and name of all teams in the game.
  • *move [direction] Moves the player in the specified direction, if allowed. Available directions are north, south, east, west, up, down, right, and left. The initial letter of each of these options is also understood.
  • setNickname Sets the nickname of the player as it will be displayed to other players. Filtering of names will be added at a later date.
  • signIn Signs the player in. A maximum number of players will be enforced at a later date.
  • *signOut Signs the player out.

capturetheflag's People

Contributors

tux2603 avatar

Watchers

James Cloos avatar

capturetheflag's Issues

Segmentation fault in `listPlayers` command

If another player has terminated their session before signing out, the next invocation of the listPlayers command will cause a segmentation fault, most likely due to the fact that the player record still exists but the corresponding session record has been destroyed.

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.