Momentum Mod's game client panorama (UI) code.

Overview

Momentum Mod

Momentum Mod is a standalone game built on the Source Engine, aiming to centralize movement gametypes found in CS:S, CS:GO, and TF2.

Momentum Mod Panorama

This repo contains all of our core game UI files used by Source's Panorama UI framework.

No C++ or other game code files will ever be stored here, it solely contains files interpreted at runtime by the game, authored by the Momentum Mod team.

Structure

The repository primarily consists of XML, CSS and JavaScript files. It also includes all icons and various images and videos used by the UI.

For a general overview of Panorama see the VDC page.

XML

XML is used to describe the overall layout of all panels. These panels can then be manipulated by JavaScript and C++ code.

CSS/SCSS

Panorama uses a variant of CSS for styling. Note that it does not conform to the standard CSS spec, differing majorly in how it handles things like flow and scaling. A complete list of CSS properties can be found using dump_panorama_css_properties markdown in the ingame console (you will need to launch with -condebug and read the console.log output). The list is also kept on the VDC though this may not be fully up to date.

Momentum uses the Sass preprocessor for all styling. This is compiled by the game itself on first load then cached for future loads if unchanged. Developers may therefore change any Sass styling and it will be recompiled on next launch or reload with panorama_reload.

The Sass module structure is quite conventional, with all top-level modules (besides abstract/) handled by main.scss. Any XML file then needs only include main.scss to access the entirety of the styling. We use the BEM (Block Element Modifier) naming scheme for all classes, besides those that are referenced in C++ code, which use Upper Camel Case.

JavaScript

Panorama uses the V8 JavaScript engine to interpret and run JS files at runtime, including files in <scripts> tags in XML similar to regular web development.

JavaScript communicates with the game via events and APIs exposed by the game, a full list of which can be found by running dump_panorama_events markdown and dump_panorama_js_scopes markdown ingame. Many of these are listed in this repository, though it currently requires manual updating so may not be kept up-to-date.

Setup

TODO (reference https://github.com/panorama-languages-support/vscode-panorama-css)

Contributing

Most of our larger systems and components require significant work with (closed-source) game code and thus requires licensed access or working tandem licensed dev. Thus, our work until now has been done internally by the core team. By the time of the release of 0.9.1 however, we have exposed enough events and APIs that non-team developers should be able to work on areas like HUD components (for an example of non-licensed HUD work, we recommend scripts/hud/cgaz.js).

Those looking to contribute should look for issues not marked with "Needs C++". See also the #panorama channel in our Discord - whilst Panorama itself is poorly documented, we are happy to help any potential contributors there.

One of our team members, brae, also maintains various tools at panorama-languages-support which we highly recommend.

Comments
  • Add mat_brightness to settings

    Add mat_brightness to settings

    Should be able to replace the brightness slider with this cvar, although the scale slightly differs. Other cvar was default brightness at value of 2.2, whereas mat_brightness is default brightness at 1.

    Although mat_brightness has min/max range of 0-10, should probably limit slider to something more reasonable, like 0.7-1.3.

    opened by SlidyBat 3
  • Misc tweaks

    Misc tweaks

    This is a bit of a bits-and-bobs PR I'm afraid, loads of small fixes I wanted to get in ASAP.

    Closes https://github.com/momentum-mod/panorama/issues/25 Closed https://github.com/momentum-mod/panorama/issues/23

    opened by tsa96 2
  • feat: Add synchronizer bhop trainer

    feat: Add synchronizer bhop trainer

    I'm the world's biggest idiot and merged Peen's branch by accident. Reverted it, resubmitting the PR. Has my approval, needs 1 more. Original message:

    adds bhop trainer with 4 visualization modes and settings entries for feedback customization

    fixup

    opened by tsa96 2
  • Add Prettier formatting

    Add Prettier formatting

    Adds a prettier config file and sets up Husky and lint-staged to run after each commit.

    Adds Prettier scripts to package.json including a check for if we ever want to integrate it with Github Actions (probably overkill, up to you Goc).

    Reformats all our JS, XML, SCSS and Markdown with Prettier.

    God it feels good to be back to Github PRs.

    Type: Development / Internal 
    opened by tsa96 2
  • Spelling Fixes

    Spelling Fixes

    These are autogenerated comment spelling/grammar fixes. Two notes:

    1. It was set to English-UK due to the spelling of initialise and such, so those inferior spellings are ignored.
    2. This does not fix the fact that the methods like setComparisionStats() are misspelled, only the comments.
    opened by davis-matthew 1
  • Feat: defrag compass (pitch & yaw)

    Feat: defrag compass (pitch & yaw)

    This PR adds settings and functionality for compass hud elements in defrag:

    • compass mode - off, show arrow, show ticks, show both
    • compass size - compass tick length and arrow half-height
    • pitch enable - show/hide pitch target
    • pitch target - pitch line offset in degrees (71.8 default for plasma climb)
    • compass stat mode - off, show pitch, show yaw, show both
    • compass color - normal color for compass elements
    • compass highlight color - pitch line & text set to this color when aiming at the pitch target, compass & yaw stat set to this color when velocity is along Pi/4 directions

    Requires changes on red to function (cvars and events)

    opened by PeenScreeker 1
  • feat: jump stats

    feat: jump stats

    This PR introduces a panel to implement jump stats like the SSJ plugin popular in CS:S. The ability to show jump stats on the strafe synchronizer is also introduced in this PR.

    Jump stat settings:

    • mom_hud_jstats_enable display bhop jump stats
    • mom_hud_jstats_first first jump to log stats on jump stats panel
    • mom_hud_jstats_interval log stats every X jumps after first log
    • mom_hud_jstats_takeoff_speed_enable show takeoff speed on jump stats panel
    • mom_hud_jstats_speed_delta_enable show speed delta on jump stats panel
    • mom_hud_jstats_takeoff_time_enable show takeoff time on jump stats panel
    • mom_hud_jstats_time_delta_enable show time delta on jump stats panel
    • mom_hud_jstats_strafe_sync_enable show sync on jump stats panel
    • mom_hud_jstats_strafe_count_enable show strafe count on jump stats panel
    • mom_hud_jstats_speed_gain_enable show speed gain on jump stats panel
    • mom_hud_jstats_strafe_ratio_enable show strafe ratio on jump stats panel
    • mom_hud_jstats_height_delta_enable show height delta on jump stats panel
    • mom_hud_jstats_efficiency_enable show jump efficiency on jump stats panel

    New synchronizer settings:

    • mom_hud_synchro_stat_mode show jump stats on strafe synchronizer. 0 = OFF, 1 = Show stats, 2 = Hide bar
    • mom_hud_synchro_dynamic_enable enable bar direction to change with movement inputs (default ON). Turning this setting off causes the bar to fill from one side no matter the current input direction

    Requires red and green changes.

    opened by PeenScreeker 1
  • Localization/Tokenization

    Localization/Tokenization

    Idk exactly what this process is called, but this takes every English string and replaces it with a tokenize that can then be localised, as well as adding $.Localize calls everywhere in JS.

    Note that this depends on PRs on Red, Green, AND we want to setup release scripts, so don't merge in until everything's ready.

    opened by tsa96 1
  • feat: adjust menus to scale better with aspect ratio

    feat: adjust menus to scale better with aspect ratio

    This change addresses issues https://github.com/momentum-mod/game/issues/1761 and https://github.com/momentum-mod/game/issues/1669, without the need to explicitly define aspect ratios. The menus scale for arbitrary aspect ratios between 1:1 and 21:9. For ratios larger than 21:9, the menu is displayed at 21:9 and centered on the screen - this has no effect for any display 21:9 or narrower.

    opened by PeenScreeker 1
  • feat: better cgaz

    feat: better cgaz

    ** C++ CHANGE REQUIRED ** This change:

    • improves cgaz responsiveness
    • cleans up ConVarEnabler use
    • adds a setting for coloring the "uncolored" snap zones
    • fixes vector normalization bug
    • and sets the max height multiplier to 1x setting for sizing snaps by gain
    opened by PeenScreeker 1
  • fix: stuck compass

    fix: stuck compass

    This PR fixes a lingering a bug that should have been fixed with the last cgaz-fixes PR.

    Defrag compass/pitch tools are now properly hidden outside of defrag. Defrag compass/pitch tools now update when both snaps and accel zones are turned off.

    opened by epkieffe 0
  • Draft: Defrag project drawdelay setting

    Draft: Defrag project drawdelay setting

    Leaving as a draft til Lumia confirms if there's any other defrag weapon stuff we could add here.

    Once in, add to POEditor

    "Settings_Defrag_Projectile_DrawDelay": "Projectile render delay",
    "Settings_Defrag_Projectile_DrawDelay_Info": "The delay in seconds before all defrag projectiles are rendered on-screen."
    
    opened by tsa96 0
  • Rework cgaz.scss with new modes/settings

    Rework cgaz.scss with new modes/settings

    The cgaz.scss file has largely been gutted to accommodate more flexibility through user settings/cvars.

    It may be worth scrapping the file completely and implementing the few remaining CSS classes in jJS methods to match the rest of cgaz styling.

    opened by PeenScreeker 0
  • Improve loading screen text to have stronger shadow

    Improve loading screen text to have stronger shadow

    Loading up surf_antichamber makes it very hard to read the text on the loading screen as it's all white. Pls make it have a stronger drop shadow or something so we don't have this problem.

    Priority: Medium Size: Trivial Type: Enhancement 
    opened by Gocnak 4
Owner
Momentum Mod
A standalone game built on the Source Engine centralizing movement game modes found in Counter-Strike, Team Fortress, Half-Life 2, and Titanfall.
Momentum Mod
Plugin builder that compiles to several different discord client mods.

Builder Plugin builder that compiles to several different discord client mods. Supports Powercord Unbound Asstra BetterDiscord Installation git submod

Strencher 5 Dec 1, 2022
Boilerplate project to run MOBILE Test Automation with WebdriverIO v7, Mocha, Appium, Allure reporting and Momentum Suite cloud device farm support

WebdriverIO Mocha Appium Momentumsuite WebdriverIO Integration with local or Momentum Suite real mobile farm devices Supports Native or Hybrid Android

Momentum Suite 21 Dec 5, 2022
Custom Element: interactive panorama viewer

<little-planet> This project is a Custom HTML Element (AKA Web Component) that renders an interactive view of a panoramic photo. Can be used with no J

Ondřej Žára 12 Nov 25, 2022
Using a Leap Motion Controller from Ultraleap for finger tracking in VRChat without mods

Leap Motion Controller finger tracking for VRChat OSC Using a Leap Motion Controller from Ultraleap for finger tracking in VRChat without mods. Descri

adeleine 28 Dec 31, 2022
Extra modifications and enhancements for Discord Bot Maker. Mods you won't find on the DBM Network!

DBM Extended is a open source project meant to enhance and extend Discord Bot Maker. Downloads This repository is not meant to be downloaded or cloned

DBM Extended 11 Oct 10, 2022
Unofficial API client for the Tidbyt API. Use this client to control Tidbyt devices and integrate with other services.

Tidbyt Client for Node.js Unofficial API client for the Tidbyt API. Use this client to control Tidbyt devices and integrate with other services. Insta

Nicholas Penree 19 Dec 17, 2022
an electron based custom client for the game kirka.io

Better-Kirka-Client A simple, yet performance-optimized and feature-rich kirka client This client features: Highly stable and outstanding performance

infi 0 Dec 17, 2022
Cards Against Humanity Game Client made with ⚡Nextron (Next.js + Electron) and Typescript

CAH Client Introduction This project is one of the other projects related to the Cards Against Humanity (CAH) game. This client is made in Electron, u

null 3 Jun 17, 2022
NFT Game Starter Project: https://github.com/buildspace/buildspace-nft-game-starter

Running React on Repl.it React is a popular JavaScript library for building user interfaces. Vite is a blazing fast frontend build tool that includes

Zahuis 2 Feb 11, 2022
Conways-game-of-life - A Conway's Game Of Life project using Python

conways-game-of-life A Conway's Game Of Life project using Python JavaScript Devlog January 1st 2022: also need to remember Python's syntax a bit will

Felipe Melgaço Magesty Silveira 0 Sep 23, 2022
Slime jumper game is a simple game that requires you to escape from the enemies that come your way.

Slime Jumper What is this game? The slime jumper game is a game with a simple logic (but it was not so easy to do) where you have to escape from the e

Fatih 2 Mar 1, 2022
Clinton Mbonu 20 Jun 30, 2022
INeedHelp is a Game Boy, Game Boy Advance, and Nintendo DS emulator written in JavaScript and TypeScript.

INeedHelp INeedHelp is a Game Boy Advance and Nintendo DS emulator written in JavaScript/TypeScript. FAQ Why is it called INeedHelp? You would need he

Powerlated 6 Jun 29, 2022
This is a Tic Tac Toe game built with HTML, CSS, and JavaScript. It is a simple and fun game where two players take turns marking X and O on a 3x3 grid.

Tic Tac Toe Game This is a Tic Tac Toe game built with HTML, CSS, and JavaScript. It is a simple and fun game where two players take turns marking X a

Andrew Tsegaye 4 Mar 4, 2023
A VS Code extension to practice and improve your typing speed right inside your code editor. Practice with simple words or code snippets.

Warm Up ?? ??‍?? A VS Code extension to practice and improve your typing speed right inside your code editor. Practice with simple words or code snipp

Arhun Saday 34 Dec 12, 2022
This is email scheduler made using MERN. This repo contains server code, client repo is linked in readme.

Email Scheduler Client This is an email scheduler server (client in different repository). It is made using node.js/express.js. Overview User can sign

Sai Charan 2 Dec 3, 2022
Basic Express methood solution with mongodb and Client & Server site code example

Express with MongoDB Tutorial (Basic) React Tutorial React Inastallation React Fundamental Concepts React Advanced concepts let start Express Starter

Md. Nazmul Islam 28 Oct 28, 2022
A Mail client embedded in Visual Studio Code.

VSCode Mail Client A Mail client embedded in Visual Studio Code Features Support IMAP and SMTP protocol. Gmail.com vendor test pass. 126.com vendor te

buhe 14 Nov 8, 2022