Hello everyone!

The Momentum Mod team has been hard at work accomplishing the latest version milestone, 0.9.1! This update has been a while coming, with over 220 (!!!) GitHub cards closed and sees a completely new user interface, a new mode or two, a new solution to the issue of missing textures, tons of fixes to gameplay and rendering, and a lot more!

Let’s jump in, shall we?

Wham, Bam, Panorama!

The majority of the work in this last milestone update has gone towards the complete overhaul of the game’s user interface (UI) to the Panorama framework.

As talked about in the previous blog posts, Panorama is the framework we’ve been graciously blessed with following our access to the CS:GO Source Engine codebase. It uses web-like design principles, with panel layouts defined in XML, styling defined in CSS, and and we’re able to utilize JavaScript via a V8 binding for the scripting layer.

While the default Panorama implementation was great, we needed some more work done to fit a better workflow. SCell took to updating V8 so that our JavaScript code can use more modern ECMAScript standards, and implemented a SCSS compiler inside the engine that allows us to utilize Sass CSS. Similarly, the SVG parser needed some more work to support some of the iconography we wanted to use, so SlidyBat worked on adding the missing specs.

The entire game programming team swarmed various different panels of varying sizes, with the work only picking up more and more speed as we figured out best practices to follow, understood more of the framework and how best to expose data via C++, and got better with communicating panel status between each other.

But the main reason this has taken so long is because not only were we completely rewriting the old user interface (VGUI) panels, but we were also rewriting the underlying systems that the major panels used. Some of the old VGUI panels were written when Momentum was just starting off (circa 2015), and some systems were written within a month to get a university senior class project done. So, it’s good to have all this code and systems refactoring done now to a more acceptable code quality that better reflects the team’s gained knowledge over the years.

So, without further ado, I’m very happy to present piece-by-piece, Momentum Mod’s new Panorama UI!

  • Panorama Main Menu
Base Image Compare Image
  • Panorama Map Selector
  • Panorama Learn section
  • Panorama Settings menu
  • Panorama Drawer Panel

    • Lobbies panel (browsing)
    • Lobbies panel (inside)
    • About panel
  • Panorama Console

  • Panorama Toast manager
  • Panorama HUD panels
    • Crosshair, Speedometer, Timer
    • Keypress input
    • Sticky charge & count
    • Conc charge & timers
    • Ghost panels
    • Leaderboards
    • End of Run
    • Comparisons
    • Damage Indicators
    • Weapon selection
    • Chat
    • Strafe sync
    • Spectate HUD, spec list
    • Replay controls
    • Static HUD menus
    • Version info
  • Misc Panorama Panels
    • Panorama color picker
    • Panorama N state buttons
    • Dual-knobbed slider

While this list seems exhaustive, it’s actually not every panel we need to convert! For example, the new map zoning tools are waiting for 0.10.0’s new zone format before being redone. Similarly, Tricksurf’s UI is waiting until we focus on the trick system again after 0.10.0. We have a lot of web work ahead of us as well which will start to populate a lot of these panels with the right data. We also have a plethora of engine-shared VGUI panels like the game_text and Game Instructor panels we want to reimplement in the future, but are low priority for now. For 0.9.1 we focused on the immediately noticeable UI and will be picking off these other panels, and giving them a lot of elbow grease in future versions.

You may have caught some of fingerprice’s development streams over on our Twitch page, but if not, check them out! We plan to use our Twitch channel for more Momentum related goodness in the future, so drop us a follow if you’d like to see it!

Finally, as a callback to our open source roots, we open sourced all of this beautiful UI! You can find it over on our momentum-mod/panorama GitHub repo. We’ve made all of the UI code that we can public, under the very permissible MIT license. Feel free to make something like your own strafe trainer or just poke around!

Speedrunning in the 90s

I think it’s about time we make Conc and Defrag officially part of the game!

Conc

Conc was initially added back in the 0.8.6 update, based on the code found in Fortress Forever, with permission from the lead developer Squeek502. Since then, we’ve been able to reverse engineer a lot of Team Fortress Classic specific timings and behaviors (with immense help from hlstriker!) and get Conc feeling better and better. It’s still not done – we’d like to address feedback raised on our forums and make the mode feel just right! But regardless, welcome to Momentum Mod, Conc!

Defrag

Defrag on the other hand started off as an 0.8.7 fork by Lumia, and we were very impressed with their work and brought them onboard to make the mode official! 0.9.1 is the first version seeing the VQ3 and CPM based implementations, with CPM as the default, with things like official VQ3 support and weapons coming later.

We’re amazed with and very thankful for the feedback the Defrag community has been giving us as we integrate the mode into the game. It has led us to getting PeenScreeker onto the team, who, alongside fingerprince, implemented the CGAZ and Snaphud a lot of Defraggers are used to, with plenty of options to boot!

Any Color, As Long As It’s Not Purple and Black

An active problem for our game and our players is mounted content. Momentum Mod specifically never requires any particular game to be able to play it, but lots of supported maps within the game utilize content from Valve games that the player may not have installed, or in the common case of Counter-Strike: Source, even purchased.

The reason it’s a problem for us is maps tend to pack these assets that should otherwise come from mounting Valve’s games. It makes sense why they originally do, though. For traditional dedicated servers, mounting the games needed (other than the one the server is for) is not even possible, so mappers have to include the games’ assets directly in the BSP file for it to be playable.

Granted, Valve probably doesn’t care if maps pack other games’ assets for a server that’s already running on one of their games, but, Momentum Mod is a standalone game. Thus, our goals are to:

  1. Maintain our good terms with Valve by not committing copyright infringement
  2. Support every map of every supported mode that we possibly can
  3. Reduce our cloud storage costs for maps, which:
    1. Optimizes map downloads for users globally
    2. Similarly reduces the amount of storage end users need for maps

As such, we can’t afford, nor want to pack these assets in maps. We similarly don’t want to ship the mounted Valve games’ content with our game, as that will balloon our game’s install size for content that a lot of players may not even need in the first place, or already have on their computers anyways. Simply asking players to install the Valve games locally, and automatically mounting using the Steamworks API is our best option.

But for players, this is a problem because if they don’t have the Valve games installed, these maps will otherwise have the lovely purple-and-black error textures everywhere, depending on how much the map relied on them.

For example, did you know the map surf_utopia actually uses Team Fortress 2 textures despite being a popular surf map in Counter-Strike? A ton of our surf players didn’t know, and thus don’t have it installed, leading them to this lovely sight on map load:

Our team member BLT worked on a solution, originally suggested by Exactol, and the approach is pretty brilliant:

During the map compile process, the texture files (VTFs) used in a map have their average colors copied over into the texture data lump’s “reflectivity” value by VBSP, which is then used by VRAD for the indirect lighting calculations done on a map. Since this is all done at map compile time, and not at game runtime, this color data exists in the BSP file regardless of whether the original VTFs are mounted or not!

This means that instead of having the game point to the eye-searing purple-and-black error texture, we can instead point to a texture of the surface’s reflectivity color, and the results are astounding:

Base Image Compare Image

(Click and drag the blue bar to compare the two images side by side!)

Obviously, this is just a workaround solution. We still recommend installing the original Valve games that maps may use assets from! Not only will the maps look significantly better with more detail, but our solution doesn’t cover every case, especially models, and isn’t meant to be a permanent “you can uninstall everything” answer.

We will be updating our Map Selector in the future to display which Valve game(s) a map mounts assets from, along with the “reliance severity” which suggests how good of a job our texture replacement system will (or won’t) do. For example, maps that are composed of more than 70% assets from a particular game will have a “high reliance severity” on it, and we will be recommending via our UI that you install the given game (if you haven’t already) to have the best experience. While the map still might be playable, the visual experience is going to be very different from what the mapper has intended!

Alas, this is just the first step of our plans to optimize BSPs. Stay tuned for a future blog post that will go into detail about our plans to further optimize BSP sizes, file mounting, and more!

Fixing Your Movement, One Bug at a Time

Rio was added to the team and licensed, and has been hard at work, working on a plethora of movement fixes.

  • Movement Reimplementation + Cleanup

Our movement code from the 0.8.6 days has been pretty messy. Every game mode’s code lived in a single file, leading to a ton of if-else spaghetti checks, causing really confusing and hard-to-follow code. While it had the benefit of little code duplication, it was traded for lack of code cleanliness.

For 0.9.1, Rio has painstakingly went through and separated out the movement into the “classes” of movement we support: 2013 (Ahop, Bhop, RJ, SJ, Surf), Defrag (it already was separated out, thanks Lumia!!), Fortress Forever (Conc), and a base class where all of these subclasses share code, like movement through portals.

The benefit now is that a particular gamemode’s movement is found in one instance of the overall movement system, and while we may need to do a little bit of code duplication for applying fixes to every game mode’s movement, the cleanliness more than makes up for it. A byproduct of this effort is that TF2’s modes now are as 1:1 as we can get with the original game’s code, meaning things like ctaps are properly working and giving the expected distances.

  • RNGFix Fully Implemented
    • Telehop fix - hitting a wall behind teleport triggers will not stop players
    • Slope fixes - consistent speed gain and loss going down and up slopes, respectively
    • Edge fix, including ILDPRUT’s edgebug assistance - edgebugs are more consistent, can jump out of edgebugs in surf/bhop if holding jump
    • Jump height made 100% consistent - consistent 64s every jump for bhop in particular
  • Collision bugs fixed, largely thanks to ILDPRUT
    • Wallbugs - getting stuck in any wall that isn’t aligned to the player’s axis-aligned bounding box
    • Texturebugs - getting temporarily stuck where two textures form a seam on a wall
    • Pixelwalks - walking where a slope meets a vertical wall
    • Pixelsurfs (mostly) - surfing along a seam in the wall, 3kliksphilip has an excellent video about this bug
  • Players can safely strafe through portals now
  • Slides refactored to a solid (func_slide)
    • Less bug-prone with being built directly into the movement code
    • Easier mapping experience - mappers need to only put the entity down where a slide section should be, no more covering sections in triggers

Okay Then, Render Me This!

SlidyBat’s been hard at work porting the rendering backend to DX11 and fixing various bugs that pop up.

  • MSAA implemented in DX11

  • CSM implemented in DX11, and even added to water:

    Base Image Compare Image

  • Now utilizing the DXGI flip model

    • Players should be using “Fullscreen windowed” now, as it has no input lag and alt-tabbing is instantaneous
  • Various shader porting and fixes

  • Performance optimizations

    • So much so that we’re now GPU bound instead of CPU bound

Smaed is a member of the Chaos Initiative team working on P2CE, but the benefit of using a shared engine repository is that they’ve contributed a couple of very noteworthy rendering related fixes:

  • VRAD can now bounce light through static Portals
  • PBR now has Parallax-Corrected Cubemaps

We’ll also be bringing on Cowboyana to the licensed developer team, they’re another graphics-focused coder looking forward to helping out wherever they can, so stay tuned for even more graphical goodies!

Sentry Goin’ Up

With an initial implementation by SCell, we’re now able to collect and analyze crash reports from the game, utilizing Sentry.io’s extremely generous Open Source offering!

What does this mean for players? Well, on first time boot, you will be prompted with this pop-up:

You can opt-in to submitting crash reports automatically to us. If you do, and whenever the game unfortunately crashes, a crash dump is made and sent automatically to our Sentry dashboard.

The only information that is sent to us is:

  • The Operating System (Windows / Linux)
  • The current Steam user’s username and ID number
  • The crash dump file itself, containing debugging info such as the stack trace, which allows us to find exactly which line(s) of code are causing the crash

It is entirely optional, but we highly recommend opting-in, as it will help us to improve the game and make it more stable!

You can reset this consent by deleting the Momentum Mod Playtest/bin/<platform>/_sentry/user-consent file, which will prompt you again on next boot for your new Yes/No answer.

Full Changelog

Click to Toggle Visibility

Added (39)

Fixed (114)

Improved (60)


The response we’ve seen to the playtest is absolutely amazing. We’re currently at 30,000 wishlists, with 13,500 playtesters, and another 12,600 awaiting access. Every time I check the signups, the number of waiting players increases! I cannot wait to get this game in the hands of every single person in the queue!! A gentle reminder: we are granting 50 grants to the playtest every day, and this number will increase to 100 a day at 0.10.0, and 200 a day at 0.11.0!

If you haven’t yet, you can sign up for the playtest over on our Steam Store page, and make sure to join our (now ~PARTNERED~ !!) Discord server, check out our Twitch stream, and oh, before I forget, keep on being awesome. 😉

Until 0.9.2,
Nick (Gocnak) K.
Momentum Mod Project Lead