Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Unit Sets #24

Closed
pongstylin opened this issue Dec 16, 2018 · 1 comment
Closed

Custom Unit Sets #24

pongstylin opened this issue Dec 16, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@pongstylin
Copy link
Owner

Our existing apps hard-codes the set used by all teams. Create a UI that allows a user to create their own set with a similar look & feel to the original game. It will be similar, but not identical. Here are some basic requirements:

  • Display the north end of the board similar to this, except there won't be a trash can, color picker, or avatar picker (MVP).
  • The south end of the board where you pick your units will differ. Each available type of unit will only appear once and cannot be moved.
  • Units can be placed on the board by the easiest means you can think of provided it is both mouse and touch compatible. For example, you might accomplish this by tapping a unit in the pick area to select it, then picking an empty tile. The original game used drag-n-drop, but I don't expect that to be easy.
  • Units can be removed from the board by the easiest means you can think of. For example, you might accomplish this by tapping the unit twice in a row.
  • There is no need to limit the number of picked units at this time. You can setup a game with 20 knights vs 20 witches if you want.

That's it! There is no need to make it possible to play with the custom set or make it possible to define the custom set for both teams. We're just going for MVP here. Just bear in mind that after it is done, we'll be looking to add these features:

  • I'm hoping that the next app we create will be similar to the "Classic" app except you can define the set for both teams before beginning the game. That means the new UI will need a method to export the custom set data for game setup.
  • When defining the sets for multiple player, we need to visually indicate which player is getting customized. So, for example, it might show the top half of the board first. Then, when you click a button to indicate you are done, it will switch. The bottom half of the board will appear and units are picked from above it.
  • It would be nice if we could freely switch between sides. With a click of a button, you can swap between seeing the top board or the bottom board.
  • It would be nice to see a preview of the full board before starting the game.
@pongstylin pongstylin added the enhancement New feature or request label Dec 16, 2018
@latin-programmer latin-programmer self-assigned this Dec 29, 2018
@latin-programmer latin-programmer removed their assignment Jun 1, 2019
@pongstylin pongstylin self-assigned this Oct 3, 2019
pongstylin pushed a commit that referenced this issue Oct 3, 2019
No set customization yet!
Fixed '1st/2nd' turn selection in auto game matching logic.
Fixed 'You 1st/2nd' display on waiting games list.
Added game type selection to create game page.
Added game type to auto game matching logic.
Added game type info to online page.
Added support for default sets.
Game type definitions are now data driven.
Added unrelated support for reserved team slots.
pongstylin pushed a commit that referenced this issue Oct 3, 2019
Moved unit loading logic from Game class to core module.
Created SetSetup class to manage board interaction
pongstylin pushed a commit that referenced this issue Oct 4, 2019
pongstylin pushed a commit that referenced this issue Oct 4, 2019
Fixed Freestyle unit type max limits
Converted unit type list to a map
pongstylin pushed a commit that referenced this issue Oct 4, 2019
pongstylin pushed a commit that referenced this issue Oct 4, 2019
pongstylin pushed a commit that referenced this issue Oct 6, 2019
pongstylin pushed a commit that referenced this issue Oct 6, 2019
pongstylin pushed a commit that referenced this issue Oct 6, 2019
pongstylin pushed a commit that referenced this issue Oct 9, 2019
Right-click 'set' units to remove them.
Select 'set' units and place them by tapping empty tile.
Select 'pick' units and place them by tapping empty tile.
Rearrange or place units using drag-n-drop
Remove oldest units when newly placed units exceed maximum counts.
Added generic drag-n-drop support to Tile and Board classes.
Deprecated Unit.assign() method in favor of Board.assign().
Fixed regression caused by rearranged stage objects.
Stop exposing the stage object from Game and SetSetup classes.
Use board "unitsContainer" (now public) or pixi objects instead of stage
pongstylin pushed a commit that referenced this issue Oct 9, 2019
Right-click 'set' units to remove them.
Select 'set' units and place them by tapping empty tile.
Select 'pick' units and place them by tapping empty tile.
Rearrange or place units using drag-n-drop
Remove oldest units when newly placed units exceed maximum counts.
Added generic drag-n-drop support to Tile and Board classes.
Deprecated Unit.assign() method in favor of Board.assign().
Fixed regression caused by rearranged stage objects.
Stop exposing the stage object from Game and SetSetup classes.
Use board "unitsContainer" (now public) or pixi objects instead of stage
pongstylin pushed a commit that referenced this issue Oct 10, 2019
Remove an ancient hack and use relative unit positioning.
pongstylin pushed a commit that referenced this issue Oct 11, 2019
Allow the set setup board to shrink on small screens.
Refactored drag-n-drop implementation
pongstylin pushed a commit that referenced this issue Oct 11, 2019
Saving a set doesn't work yet!
pongstylin pushed a commit that referenced this issue Oct 11, 2019
pongstylin pushed a commit that referenced this issue Oct 11, 2019
Fixed server-side validation of special attacks.
@pongstylin
Copy link
Owner Author

What I actually implemented differs from the requirements in a few details, but otherwise, it works. So I'm going to close this issue out. But I might change it more before I release it to the beta server at the end of the month. Here's the highlights of what is accomplished:

  1. Added 2 more game types: Dropless Gray and Freestyle and you can change your default set for each one, separately. The default set is saved persistently. It will be used for all games you create and join in that style. You can also load your custom set again and change it again.
  2. Drag-n-drop is supported for mouse pointers just like the old game.
  3. Point-n-click is also supported as an alternative interaction style. Select a unit then select an empty tile. Works with both mice and fingers.
  4. I brought back the old trash can from the original game. You can discard units with it using drag-n-drop or point-n-click.
  5. I'm including the Lightning Ward unit with custom sets. It was previously implemented, but unused, so I'm going to do more testing to make sure it works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants