it114's Introduction
it114's People
it114's Issues
Player may pick 1 cell per turn to “hit”
That player will see a “hit” on that cell
All other players will see if the player hit or missed but will not see what coordinate was picked
Client can be started via eclipse or command line and connect to the running server
Each grid cell may contain 0-N ships
-
Pick one of the following
-
Players may only place 1 ship per cell
-
Players may place any amount of their ships in a single cell
Following the payload concept begin implementing some of the core functionality
Payload sample: Payload {type: (place, pick, hit, miss, turn), x:0, y:0, playerId: id}
Server can broadcast messages to all connected clients of a particular Room
Server will implement the concept of “Rooms”, for this milestone only “Lobby” is needed
Currency can be spent for special effects (below are examples, if you diverge please thoroughly explain)
- Proximity Sweep
1 use, next miss will let the player know if a ship is within 2 square radius - New Vessel
Purchase a new ship and place it - Multishot (pick two spaces)
- Shield (pick a cell that’s protected for 1 hit)
Will make the space eligible to hit again if a player already picked it - Battle Formation (move a ship)
Will make both spaces eligible to hit again if a player already picked it)
Game Flow
Prep Phase
- Players have X seconds to place Y ships on the grid
Ships may overlap the same cell across players and/or across current player’s ships - Prep ends when timer expires or all players have placed their ships
All pending ships not placed are lost
Server will not send the coordinates of placed ships to the other clients (this is private information)
Create a UI page for your game area
- List players
Show score (i.e., ships remaining, ships hit, etc)
Show whos turn it is - Have a text area to show game events
Player’s hit or miss
Other players will just see hit or miss, not the coordinate
The player that the event triggered for will see the coordinate they picked along with hit or miss - Round countdown timer
- Grid for battle field
Grid should show any spot that was a hit or miss for the current player
All grids should be in sync in terms of ship locations
Players have X seconds to pick a spot until they lose the “shot” (i.e., 30 seconds)
Clients can disconnect and reconnect without crashing the server
Server will have the functionality to switch users between “Rooms”
(i.e., all start in “Lobby”, but can then create or join existing rooms to be with a particular group)
Rooms will not have cross communication
Client can mark themselves “away” to be skipped in the turn flow but still be in the game
Client can join as spectator
Each player should get X “ships” to place on the grid (use best judgement for grid size)
Once all players have placed ships or if the timer expires the rounds begin
A player is eliminated when they have no more ships on the board
They may stay as spectators but will be skipped over until there’s one player left
Battle Phase
- Initially random player is picked to start
- Player has x seconds to pick an unpicked cell
If another player has already hit the ships in this cell the server will just tell the current player that it was a miss
The current player will not benefit from hitting already hit ships
The current player will only see the cells of the grid from their perspective, other player’s picks will not show - Server determines if it was a hit or a miss
Award points appropriately
Send appropriate text event to text area
Checks to see if the hit player(s) still have at least 1 ship remaining (otherwise they’re out) - Next player is chosen in round robin order
- Repeat from step 2
- Game ends when 1 player is remaining
- Players are ranked by score
Client can send messages to the server
Clients will have some sort of identifier to show who sent each message
Create a UI Page/Panel for connecting to the server
Username
Password (tentative)
Host
Port
Randomly pick a player to go first, then go in order
Players have X seconds to place their ships (i.e., 90 seconds)
Server can be started via eclipse or command line and listen for connections
Implement “currency” for actions during the game
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.