Coder Social home page Coder Social logo

teamtrainingplugin's People

Contributors

daftpenguin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

teamtrainingplugin's Issues

Prevent players from moving until drill starts

Players should be prevented from moving until the drill starts. This could be implemented in several different ways.

  1. Freeze all players until the timer finishes and the ball's trajectory is set.
  2. Use the countdown system used in the original custom training packs and on kickoffs.
  3. If the first or second option cannot be done, at least allow an option to set the drill to only start when a player moves (or maybe only when a specific player moves, eg: host).

The second option is the ideal option for when the countdown is at least 1 second, but option 1 is better if countdown is less than a second. If option 2 can be done, it should be possible to support option 1. I've attempted option 1, but the non-host users didn't see themselves as unfrozen, yet they were moving around from the host's perspective. This should be possible to fix by somehow communicating that the player is unfrozen to the non-host clients. I've been able to get the countdown working, but I haven't figured out how to prevent players from moving. My HoopsKickoffPractice plugin implements the third option where the ball's trajectory applies after any one of the players move, but does not implement the ability to choose only one player that may start the drill. This avoids the need to prevent players from moving, but does not really fix the problem with players trying to synchronize their timing without preventing players from moving and only allow one player to start the drill.

Allow users to upload and download training packs

Users should be able to upload training packs and browse existing training packs. Users should be able to search for and filter the existing training packs based on tags, number of offensive players, and author/creator. Creators should be allowed to publish training packs with embedded YouTube links to view how training packs can be done. If #5 is implemented in a way where training pack conversion is done on the client side, server should only need to maintain the training pack code and metadata, and training pack file can be retrieved in game and converted on the fly. Likely should still maintain training pack files on server, or at least back them up somewhere. I have a nodejs server in place already that can be used for this. #2 would introduce some complexities.

Allow using packs without having enough players

There are a few different ways this could be implemented:

  1. User can load a training pack and assign a contiguous sequence of roles (eg: 3 offensive player pack, 2 players in freeplay, player 1 is passer 2, player 2 is shooter, no passer 1). The ball would then be recorded from each drill in the original custom training pack to determine where to place the ball in the passer 2 position for the team training pack.
  2. Allow player or players to record an action for each position in the sequence, up to the roles that are assigned. Eg: player 1 and player 2 start in passer 1 and passer 2 positions. Host records the motions of player 1 and player 2. Then host shifts their role to the shooter position, with player 2 in passer 2 position. A bot joins and recreates the recorded action from player 1. Record these actions to disk so they may be used at a later time. Of course we could just capture the player's contact with the ball, but this might be useful to visually see the car's approach and contact with the ball.

Non-host players sometimes cannot pickup boost

Issue was reported by a user (v0.2.4). Three players were added to a lobby and a training pack is loaded. After resetting the shot with the dpad binding (not the normal reset shot binding), the third player was sometimes not able to pickup boost. Resetting the shot with the in-game reset shot binding however did not lead to this behavior.

Use custom training pack file directly during creation

Create team training packs by decrypting the custom training pack files and reading the values directly from the decrypted data. An issue lies with protecting the decryption keys. We could offload training pack decryption and even pack creation onto my own server, and fail over to the existing creation mechanism if offline or the server is down.

Generate shots from replays

Allow user to pause a replay in an instance and assign roles to each player in that instance (not all players need to be assigned a role), then record the player positions, boost, velocity, etc and the ball's position, velocity, spin, etc into a shot. I haven't looked into the replay data yet, so I do not know if this data exists. We may need to calculate this data using the delta between ticks.

It should be possible to append each shot to an existing pack. This might be considered with #9.

Allow users to create collections of shots from existing packs

There's a bit to consider when it comes to the implementation of this...

First, there should be a strict requirement for the number of offensive players to match for all drills in a pack, however should this requirement exist for defensive players? If not, there are a few options when it comes to defensive:

  1. Set the number of defensive players to the min of defensive players of all the packs. Then take the first n defensive player positions for all the packs, where n is that min.
  2. Set defensive players to 0 if they don't match.
  3. Set the number of defensive players to the max of defensive players of all the packs. Then take all defensive player positions for each drill. This will need some modification to the existing code as I am sure there are some assumptions that each drill has the appropriate number of defensive player positions. If this is done, we should indicate that not all drills have defensive player positions on the pack selection screen.

Edit: We can just ignore most/all of the details below and just make this work.

Currently, team training packs are created from custom training packs and the code is recorded in the team training pack. I like this as it makes it possible to automatically update team training packs if necessary for features in the future. Therefore, the training pack format should be updated so that the custom training code and shot numbers are recorded in the drills instead. Note that team training packs could be created by users while they don't have the first drill loaded. Therefore, we should consider fixing that unless we decide to drop automatic updates. What do we display for the training pack code in the selection screen? Perhaps we show a shot list with a load custom training button per shot?

The creator of the pack also needs to be considered. A curator field could be introduced for cases in which the curator is not the creator of all of the shots, then update the creator field to an array. What if two curated packs are merged into one? Perhaps curator could also be an array?

I'm sure this list is not exhaustive.

Allow players to easily create modifications to packs or setup drills in freeplay

Users should be able to modify drills in freeplay.

  1. Host activates an editor mode, which might support multiple users.
  2. Controls should allow user to cycle between shots, with the starting positions set but no ball trajectory applied.
  3. User should be able to activate the balls trajectory, and reset the ball to the starting position.
  4. User should be able to modify each player position in the drill, potentially with the help of other players in the freeplay session.
  5. Any roles not filled by a user, should be filled with a bot that is frozen in its starting position.
  6. Maybe allow user to modify the ball's starting location or trajectory through some kind of UI and potentially draw the trajectory on screen similar to custom training pack editor.

Add ability to view player and ball positions in freeplay

User should be able to click a button in the selection tab for a specific team training pack that loads up freeplay, loads in the pack, and spawns cars and the ball in their starting positions. A button can then be pressed to start the ball's trajectory, similar to when you're editing a training pack.

Ideally I would like to expand this feature to making it possible to both edit existing training packs, as well as create new training packs. These features can be added at a later time.

Add HUD

Host user should at the least be able to visibly see the current drill number and total number of drills in the pack, by either adding the in-game custom training HUD, or through a custom display. Preferably, non-host users should also be able to see this information if they at least have the plugin installed as well.

Creation of training packs has stopped working

This used to work for me but now when I click create with all the details correct, the GUI closes but nothing else happens. I have also tried conversion of the sample wayprotein pack. I have checked bakkes log and searched for any errors or crash reports and I see nothing. I have like 30 plugins installed so it could be a conflict. Any idea how to further debug?

Replace player to role assignment implementation

Currently, player to role assignment is done poorly. There is a player_order that is assigned when a pack is loaded, which is based on the ordering of the cars in ServerWrapper.GetCars(). This order may change based on a number of events in the game, like demolitions, leaving/joining the server, etc. Player roles are then assigned based on their order in the training pack (passer 1 = 0, ..., passer x = x-1, shooter = x, defender 1 = x+1, ...).

Instead, an array should simply be maintained for role index -> playerID. When a player joins, they should be assigned to an open role if one is open. When a player leaves, they should be removed from their role, unless there are not enough players (not all offensive roles are assigned, unless #1 has been implemented), in which the pack should be unloaded.

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.