Giter Site home page Giter Site logo

refraction's People

Contributors

ogallagher avatar

Stargazers

 avatar

Watchers

 avatar  avatar

refraction's Issues

Create readme

This will be pretty easy to begin with, given I already drafted a full player-oriented description here.

Enable playback of old games

Select an old game from history to load it in playback mode (the game knows it’s in playback if this.result != Game.RESULT_UNKNOWN in constructor). When in playback, a play/pause icon shows more prominently when the cursor is closer to the middle of the view, and pauses/resumes on click.

Game nicknames

Currently names are identified with uuids, but it would be much more user-friendly to have recognizable names. Some testing results of my custom module:

> uuidn.generate_uuid_nickname()
{
  nickname: 'by-voice-stomach-station',
  uuid: '9dd30f45-1146-4f3e-9106-8702440b58a6'
}
> uuidn.generate_uuid_nickname()
{
  nickname: 'deal-piece-source-wind',
  uuid: 'ab21e8cf-5c04-48e7-b9bf-5ce7b11ef733'
}
> uuidn.generate_uuid_nickname()
{
  nickname: 'consist-gasoline-additional-they',
  uuid: '146244ed-7453-42df-938d-f6a3cbbad802'
}

History game load fails online switch

When switching from local to online mode, somewhere along execution some Game instance variables get unset and cause an error when attempting to load an old game for playback.

Extend game mechanics

Currently the controls are limited to: move, point, and shoot. However, the game could be more fun and dynamic if other complexities were introduced. Here are some ideas:

  • abilities. There are different ways to grant abilities, but regardless of how they’re obtained, here’s a list of potentials:
    • shot spray
    • shot speed
    • run speed
    • time slowdown
    • rewind
    • shield
    • grow obstacles
    • cut obstacles
    • screen wrap-around
  • player class selection. Different classes have different abilities.
  • items with abilities. This could be an alternative to player classes, where items give abilities.
  • possess ghosts. If your current player dies, you can take over one of your avatars from a previous match (a ghost).
  • possess other team’s ghosts. If your current player reaches the target base, you can take over a dead ghost from the other team.
  • other base actions. If left click is shoot, then right click and other keys could be other actions.
  • tow dead ghosts. If a ghost was killed in its first match, it will never reach the target base in future matches, unless there’s a way to move them otherwise, like pushing/dragging/possessing.

Migrate to React+Nextjs

I want to improve the scalability and design of the website, and using a framework like React should improve interaction, organization, scalability, design, and better handling of user/game data.

Publish prototype to itch.io

To publish a project page on itch.io there's some content that'll need to be created:

Short description

local & remote asynchronous multiplayer action shooter

Long description

Controls

WASD or arrow keys to run up, left, down, and right.

Point and left-click to point and shoot.

The bar at the top of the game window shows a combination of remaining ammunition and remaining shots in the current clip. The clip limits shot frequency (has a capacity and continuous reload speed), and ammunition limits total shots per round.

Your player is marked with a black X. Teams are denoted by colors (blue, orange, green, magenta).

Below the game window is a switch to toggle local vs online mode. In online mode, you pick a username and pass turns between your and other usernames.

System requirements

Just a computer browser with a keyboard and mouse. Mobile devices are not yet supported (the UI would first need some major improvements, and the game window would need touch control support). Most browsers should work (I've done cursory testing in Chrome, Firefox, and Safari).

Gameplay

Your objective is to get as many of your players to the opposite base as possible, while at the same time allowing as few of the players from the other team get to your base as possible. You get one point for each player that reaches the opposing base within the time limit.

The game can be played with 2,3, or 4 teams. The arena is a square, and each base is a corner. Let's assume the game is just 2 teams, blue vs orange, and run an example.

  1. The first turn, blue moves their player to the opposite corner, which seems easy enough.

refraction_playthrough_local_1_1

  1. On orange's turn, they then run the opposite direction, and takes out blue's first player on the way.

refraction_playthrough_local_1_2

  1. ...

refraction_playthrough_local_1_3

  1. ...

refraction_playthrough_local_1_4

  1. ...

refraction_playthrough_local_1_5

  1. ...

refraction_playthrough_local_1_6

  1. ...

refraction_playthrough_local_1_7

  1. ...

refraction_playthrough_local_1_8

Eventually, the game is over (default is 8 turns). The winning team has the most points total. The game then enters playback mode, and we can review how it went!

refraction_playthrough_local_1_9

Screenshots

I'll include around five screenshots.

Customization

I added a game configuration section where some basic game settings can be set prior to playing the first turn.

You can currently customize:

  • number of teams
  • number of rounds
  • player run speed
  • player radius
  • bullet tracer length
  • frame limit (round time limit, in frames)

Development

Refraction is a pretty early prototype, so I'll be updating it frequently and am looking forward to suggestions.

It's also open source and shared on GitHub at ogallagher/refraction. Check it out!

Planned improvements

  • pick a design theme and replace the placeholder graphics with something cooler
  • redesign the page interface so the layout is not so sparse
  • expand the arena by adding some camera panning
  • extend game mechanics with player abilities, secondary attack, items (details unknown)
  • add passwords to prevent account sabotage
  • add mobile support
  • ...?

Credits

Author: Owen Gallagher
Graphics library: paperjs
Web design library: bootstrap
Server hosting: Amazon Web Services

Launch remote webserver

I’ll move the server to a remote AWS Linux instance and run it there. So far I’ve done most of the instance config and created the Github origin so I can clone remotely.

Game settings inputs for new game

When launching a new game, open a settings panel so the user can customize the game parameters:

  • number of teams (current default = 2)
  • player speed
  • player size
  • bullet speed
  • bullet length/tracer
  • frame limit (current default 1000)
  • number of rounds (default = 4 rounds = 8 matches for two players)
  • obstacle size

Limit ammo and shot speed

Spamming unlimited shots throughout the round needs to be prevented, and shot count and speed limits can help with this.

Pick a design theme

At some point it'll be time to graduate from the placeholder boxes and circles to something a bit more polished and thematic.

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.