Giter VIP home page Giter VIP logo

ze-rax / trackmaniaflagrush Goto Github PK

View Code? Open in Web Editor NEW
15.0 4.0 1.0 13.82 MB

FlagRush is the new community made, teambased gamemode for Trackmania2020, providing a completely new way to play your favourite racing game with direct player interaction. In FlagRush, two teams fight for a flag and try to bring it to the base of the opposing team to score a point while preventing the other team to do the same.

License: MIT License

trackmania trackmania2020 gamemode maniascript tm

trackmaniaflagrush's Introduction

FlagRush Logo

FlagRush is a Trackmania gamemode, where two teams compete in an arena to capture a flag and bring it to the opposing team base. The mode plays best with a team size of 4 players per team.

Maps

Creating maps for the mode

An explanation on how to create map for the FlagRush gamemode can be found in the Mapping guide.

Download existing maps for the mode

We recommend starting with our officially reviewed mapppacks:

You can find other compatible maps on Maniaexchange:

Server How-to

  1. Setup Trackmania2020 dedicated server. (Tutorial)
  2. Download gamemode: main.zip, then extract the zip archive.
    • or clone the repository, if you have git installed:
      git clone https://github.com/Ze-Rax/TrackmaniaFlagRush
  3. Place the contents of DedicatedServer folder into your dedicated server's UserData folder.
    • A minimal FlagRush matchsettings file is already included in Map/MatchSettings/FlagRush.MatchSettings.txt together with a map.
    • The gamemode behaviour can be customized with settings that are applied through the match settings file, see Mode settings documentation.
  4. Start the server:

Linux:

./TrackmaniaServer /game_settings=MatchSettings/FlagRush.MatchSettings.txt /dedicated_cfg=dedicated_cfg.txt

Windows:

TrackmaniaServer.exe /game_settings=MatchSettings/FlagRush.MatchSettings.txt /dedicated_cfg=dedicated_cfg.txt

Community

Huge thanks to everyone who helped this project to become reality:

  • Geekid - for ideas and contributing code
  • Reaby - for ideas and contributing code
  • Rxelux - for ideas and contributing code
  • RealSpace - for maps, mapping tutorial and support, map management and ideas
  • Nalax - for map management and mapping support
  • TuplaJ - for mapping

Join us in our Discord Server!

The project is licensed under the MIT License.

trackmaniaflagrush's People

Contributors

geekid812 avatar reaby avatar ze-rax avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

Forkers

greepthesheep

trackmaniaflagrush's Issues

Skip Map in warmup will skip the warmup but not the map

While it's warmup related, I'm not gonna fix that in the warmup, as the round/map validation is kinda related to it, so it's gonna be fixed in another branch.

Improve how, when and where MatchEndRequested is checked and handled. Right now it's only checked at round / map end. Also check it at round start and react accordingly(Already done by modebase) for the case when map was skipped during warmup.

UI Sync refactoring

Syncing the UI is still buggy at times. Sometimes all the team colors are just Black. Teamames sometimes dont load.

Respawn UI indicators

When respawning, there should be a UI indicating, that the respawn is coming up.

  • Timer that counts down
  • Force camera to map overview

Custom menu & settings dialog

Create a custom ingame escape menu dialog.

Applying settings can be done with Playground.RequestChangeModeScriptSettings (Text SettingsXml) in the client MlScript
Where Playground is CPlaygroundClient and is available in CMlScriptIngame which is every script in a layer that we send through the gamemode.

Enhance Flag Marker: Height indicator

  • Move the gauge to the right of the flag and rotate it. Vertical, gauge going down
  • Height indicator above and below the flag
    • ^ shape above the flag when it's above
    • v shape below the flag when it's below player position
    • Indicator only appears when the height difference is either x meters or the angle of Player -> Flag to the X-Z Plane is over a threshold.

"Follow flag carrier" mode overview camera

The overview camera should be around all the players instead of showing the whole map. Some maps are off center or just don't take the whole maps. The overview camera looks weird in these cases.

Feature: Player Collision Elimination (Comparison: Rocket League)

What?

  • Player collision could lead to the elimination (unspawn/respawn) of a player.

Why?

  • Deeper tactics and player interaction

How? (Ideas)

  • On collision even evaluate collision and determine a "collision winner"
  • Potential parameters
    • Angle of impact (frontal collision? collision in the back? side?)
    • Speed(-difference)

Event feed / Event display

There could be an event feed that displays events that have happened ingame, comparable to the event feed in Shootmania or kill feed in pretty much any shooter.

This would be in addition to the currently available big UI status messages.

  • Players and words like "flag" colored in according team color
  • "<> picked up the flag!"
  • "<> dropped the flag!"
  • "<> stole the flag from <>!"
  • ...
  • Maybe even better: only icons and names.

This should make it easier to follow events and the general gameflow when a lot is happening.

Reduce amount of settings for the mode

There's just too many...

  • Set some as "< hidden >" ?
  • Custom settings page? (Void SetGameModeNameAndCustomData (Text GameModeName, Text GameModeCustomData) for sending settings? Don't know if that works)

Timelimit client side: Don't push "time left" over netwrite/netread

Right now we send the time left every frame (updateui) by computing the time left (in millis) on server and sending them to the client via netwrite/netread.

Instead:

  • Send EndTime, but only when it updates
  • Compute time left on client side: TimeLeft = EndTime - GameTime
    • GameTime is part of C(Sm)MlScriptIngame and is equivalent to CSmMode::Now

Support for multiple flag spawns

Multiple flag spawns on the map could make the gameplay a bit more dynamic and diverse.

Needs support in gamemode:

  • InitLandmark should parse more than one flagspawn
  • G_FlagSpawn to array
  • new algorithm to select a flag spawn (random or criteria?)

Needs support in maptype:

  • Adjust the UpdateValidability function
  • Adjust Validability error message

Minimap / Radar

  • Add a minimap showing the location of teammates (and opponents) on the map.
  • Important Landmarks (Flagspawn, Base, Spawn, FlagCarrier) should have an according icon/marker on the minimap

Flag Gauge not shown after respawn

When respawning, the gamemode calls initplayer, which overrides the displayed flag gauge timer to -1, therefore hiding it, although the timer is still running.

WarmUp for the mode

  • Warmup phase at the beginning of every map

  • Players need to confirm that they are ready

    • Maybe not every player, but if at least one player in each time is ready, then a timelimit start (comparable to Elite in Shootmania)
  • Players should be spawned and able to drive around

  • Clear indicator that a warmup is running (UI)

Gamemode: Refactoring, generalization, outsource to libraries and BaseModes

The gamemode mainly works, but it got bloated a bit and could need some refactoring.

  • Put potential common functionalities for other team/flag based modes in base modes? (FlagModeBase.Script.txt, TeamFlagModeBase.Script.txt)
  • Put some features into libraries?

Right now I'm not 100% sure how much can be put in respective libraries and basemodes, since I didn't look into that to much yet. But there probably should be some things

EventFeed improvements

  • Reposition and resize (gotta find a good spot)
  • Make old entries disappear (animations?)
  • Define size in creation
  • Make it grow upwards instead of downwards

Player marker improvements

Currently player markers are only visible if the player itself is visible. While is is fine for players of the opppnent team, markers of players of the same team should be visible through walls, so teams have a better overview of where their team is.

Broken Match evaluation

The match evaluation seems to be broken.

Sometime Team1 Wins a map but the Match ends with Team2 winning or it being a draw.
Might also be that the match scores are not reset? xd Error in the match end Check. FlagRush.Script.txt, line 366

Crash on Round Start

Context: FlagRush.Script.txt:

/**
 * Spawns all players.
 */
Void SpawnPlayers() {
    foreach (Player in Players) {
        if (Player.Armor <= 0) {        // If Player has no armor, unspawn first (for example Offzone hit)
            FlagRush_UnspawnPlayer(Player);    // Has to be done here, since Player in OnArmorEmpty Event in Null
        }
        
        // Spawn unspawned players
        if (Player.SpawnStatus == CSmPlayer::ESpawnStatus::NotSpawned) {
            declare CMapSpawn Spawn = FlagRush_Map::GetSpawn(Player).PlayerSpawn;
            if (Spawn != Null) {
                declare Integer SpawnDate for Player;
                InitPlayer(Player);
                if (SpawnDate <= Now) {
                    SpawnPlayer(Player, Player.CurrentClan, 1, Spawn, Now + 2000);
                    FlagRush_UI::UpdateDossard(Player);
                    SpawnDate = 0;
                }
            }
        }
    }
}

Error in line 789:
declare CMapSpawn Spawn = FlagRush_Map::GetSpawn(Player).PlayerSpawn;
FlagRush_Map::GetSpawn(Player) returned Null.
Which means Player.CurrentClan was not 1 or 2, so he wasn't part of a valid team?

A player joined right before the error occured (during UI Phase). Probably caused it.
Bren VOD: https://www.twitch.tv/videos/1232578186 , 02:57:24

Ideas:

  • Player joined during a timeframe where the joinevent couldnt be caught (OnPlayerAdded) and the player wasn't initialized, therefore his clan was not set. Might have to call InitPlayer() before getting the Spawn SpawnPlayers().

Use Clubs for Teamnames & Colors

The color and name of teams is currently handled through settings or statically. Maybe we can find a way to use the official Club feature for that.

UI: General Redesign and Rework.

At the moment the UI ist mostly functional. It should be reworked a bit:

  • Redesign (like reaby did for the header)
  • Split into seperate files per module (Header, ScoresTable, Markers, ...)

Count flag score assists

Add a new telemetry value for assists.

We have to think about how we detect assists. Like "If the a player scores and a teammate of him had the flag in the last 5 seconds, give him an assist". There are probably better ideas on how to detect them. Open for ideas.

MapType: UI to make setting properties and mapping easier

Create a UI that makes setting the block properties easier for landmarks.

  • Spawns/Starts

    • Tag: "SpawnTeamX" where X is 1 or 2
    • Order: Not used yet.
    • Right now Teams have exactly 1 Spawn
  • Goals/Finishes/Bases:

    • Tag: "BaseTeamX" where X is 1 or 2.
    • Order: Not used yet.
    • Right now Teams have exactly 1 Base
  • Flagspawn (Checkpoint)

    • Tag: "FlagSpawn"
    • Order: Not used yet.
    • Right now there is exactly 1 FlagSpawn

Add Time Remaining warning

From my observations it can happen that people are not aware of the timer even though it is displayed on the score header itself. I think implementing a time warning such as "30 seconds remaining" and making the timer red/blinking could solve this.

No ideas on the implementation yet. That's to be discussed in the dev channel.

Possibility to start a warmup during a round (By Command)

A server controller should be able to call a warmup.
I think the XmlRpc command for that should be SetWarmUp (boolean)
Use #Commands instead.
Edit 20.10.2021: Apparently Commands are broken at the moment on server side. :) Prepare for it anyways.

  • The turn get stopped, but not the round (Players are unspawned by EndTurn and respawned by warmup)
  • When the next turn would start, start the warmup first
  • The remaining time from the interrupted round should should be saved and reapplied after the warmup is over

Show the round wins on a map in the UI

  • There should be a counter for each team that counts the amount of rounds won. Possibly in scoreboard and header
  • The counters should only be shown if RoundsToWinMap > 1

Support for multiple team bases

Multiple team bases on the map could make the gameplay a bit more dynamic and diverse. Could also prevent base camping on some maps.

Needs support in gamemode:

  • InitLandmark should parse more than one team basenper team
  • according variables to array

Needs support in maptype:

  • Adjust the UpdateValidability function
  • Adjust Validability error message

Radar v2

The radar implementation is somewhat weird. This is partially because we're using MrLag's minimap library, which obviously is kinda generic to work with multiple usecases.

At some point we should refactor the radar and go for a implementation.

Improved hitboxes

We somehow need to implement box shaped hitboxes that rotate with the car... Does someone know how the math for that works?

(Axisaligned Bounding boxes (AABB) won't suffice)

FlagCarrier can drop flag

  • The flag carrier can drop the flag by pressing a key.
    • Respawn doesn't respawn, but drops the flag first? Then afterwards you can respawn.
  • The player who dropped the flag is not able to pick it up again for X amount of time.
  • Other players are instantly able to pick up the flag.
  • NO settings to turn this option on or off.

Massive desync issues

The players can go completely out of sync leading to the players being displayed on completely different locations then they actually are at.

This is most likely due to us having switched to fine Extrapolation. In that case we might have to go back to crude extrapolation.

Right now we got server 1-3 running back on crude Extrapolation to check if that actually fixes the issue.

If so, then Todo:

  • In InitPlayer(): Player.UseCrudeExtrapolation = S_UseCrudExtrapolation;
    This setting is already available from the modebase, default False and hidden.

Spectator mode: Follow flag carrier

Make it possible to alway follow the flag carrier (if there is one) when spectating.

  • When someone picks up / steals the flag the camera of the spectator switches to that player.
  • When the flag is lost (dropped or reset), go to overview camera.
  • Option to toggle on or off for spectator individually.
    • UI button/switch
    • Supported Spectator functionalities by the mode? (Auto target mode)
      • As seen on 17.10.2021, maybe Cam7 is/can be used as that mode.
  • Spectators should still be able to select other targets (-> If follow mode is on, toggle off) or go into freecam.

Scoreboard fixes

  • Show number of spectators
  • Mark disconnected players
  • Don't show spectators / disconnected players who have 0 points in list
  • Find cause for duplication

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.