ogallagher / refraction Goto Github PK
View Code? Open in Web Editor NEWAsynchronous multiplayer semi-turn-based game
License: Other
Asynchronous multiplayer semi-turn-based game
License: Other
This will be pretty easy to begin with, given I already drafted a full player-oriented description here.
When submitting a turn for the last available game, that game can load as if it were still available.
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.
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'
}
Local mode would be similar to what the test
variable in index.js
currently does.
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.
I registered refraction.fun through namecheap for $10 total for the next two years, with auto-renewal for something like $30/yr after that.
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:
Show a leaderboard of top usernames and scores.
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.
To publish a project page on itch.io there's some content that'll need to be created:
local & remote asynchronous multiplayer action shooter
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.
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).
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.
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!
I'll include around five screenshots.
I added a game configuration section where some basic game settings can be set prior to playing the first turn.
You can currently customize:
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!
Author: Owen Gallagher
Graphics library: paperjs
Web design library: bootstrap
Server hosting: Amazon Web Services
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.
When launching a new game, open a settings panel so the user can customize the game parameters:
Spamming unlimited shots throughout the round needs to be prevented, and shot count and speed limits can help with this.
Add start and end dates to games so they can be ordered chronologically.
At some point it'll be time to graduate from the placeholder boxes and circles to something a bit more polished and thematic.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.