Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CompewterTutor/MortarGolf

Repository files navigation

โ›ณ MortarGolf - Battlefield 6 Portal Game Mode

Version Status BF6 Portal

Golf. But with Mortars. And Combat. And Golf Carts.

MortarGolf is a wacky take on traditional golf where you use mortars to shoot your way through 9 holes, drive golf carts across the battlefield, and fend off opponents trying to disrupt your perfect backswing. Speed matters, accuracy matters, and survival definitely matters.


๐Ÿ“‹ Table of Contents


๐ŸŽฎ Overview

The Concept

Imagine golf, but instead of a golf ball, you're shooting mortars. Instead of a golf cart, you're driving a military vehicle. Instead of peaceful putting greens, you're dodging gunfire from other players. That's MortarGolf.

Game Mode Details

  • Type: Team-based competitive golf with combat
  • Players: 1-32 players (Recommended: 4-16)
  • Teams: Up to 4 teams of 1-2 players (golfer + caddy)
  • Duration: 9 holes (18-hole expansion planned)
  • Maps: Firestorm (more maps planned)

What Makes It Unique

  1. Mortar-Based Golf: Use mortars with adjustable power, angle, and spin to reach the green
  2. Combat Golf: Shoot at opponents during their shots to disrupt them (but watch out for their caddy!)
  3. Speed Factor: Time matters - fastest completion earns more money
  4. Shop System: Buy weapons, armor, and upgrades between holes
  5. Caddy System: AI or player-controlled caddies provide support, defense, and revives
  6. Career Tracking: Generate a passcode at the end of each round to track your career on an external website

โœจ Features

Core Gameplay

  • โ›ณ 9-Hole Golf Course - Designed on Battlefield's Firestorm map
  • ๐ŸŽฏ Mortar Shot Mechanics - 3-click shot meter (backswing, power, follow-through)
  • ๐ŸŒ๏ธ Putting System - Dart-based putting with randomized targets when you reach the green
  • ๐Ÿš™ Golf Cart Combat - Drive jeeps/humvees between shots while avoiding enemy fire
  • ๐Ÿค Caddy System - AI or player caddies defend you and revive you when downed
  • โฑ๏ธ Time-Based Scoring - Speed bonuses for completing holes quickly

Scoring & Progression

  • ๐Ÿ“Š Dual Scoring - Traditional golf score + time-based performance
  • ๐Ÿ’ฐ Money System - Earn currency based on performance
  • ๐Ÿ† Leaderboards - Live leaderboards during play
  • ๐ŸŽ–๏ธ Achievements - Track career accomplishments
  • ๐Ÿ”‘ Career Passcodes - Persist stats across matches via external website

Shop & Equipment

  • ๐Ÿ›’ Between-Hole Shop - Purchase upgrades, weapons, ammo, and armor
  • ๐ŸŽฒ Random Items - Shop inventory rotates, offering different items each hole
  • โš”๏ธ Weapon Variety - Customize your loadout for combat and defense
  • ๐Ÿš— Cart Upgrades - Improve your vehicle's speed and durability
  • ๐ŸŽจ Customization - Unlock collectibles and cosmetics in the Pro Shop

Social Features

  • ๐ŸŒ๏ธ Tee Times - Schedule matches with other players
  • ๐ŸŽฏ Driving Range - Practice your shot mechanics
  • ๐Ÿ‘ฅ Pro Shop - Social hub, leaderboards, and collectible shop
  • ๐Ÿ‘€ Spectator Mode - Watch other foursomes from the gallery
  • ๐Ÿ’ฌ In-Game Chat - Communicate with teammates and opponents

๐ŸŽฏ Gameplay

The Flow

  1. Matchmaking - Form a foursome (4 players with optional caddies)
  2. Tee Off - All players address their "ball" (mortar) simultaneously
  3. The Drive - Navigate to your next shot location while fending off opponents
  4. The Approach - Take subsequent shots to reach the green
  5. The Putt - Use the dart-based putting system to sink your shot
  6. Shopping - Spend earned money on equipment for the next hole
  7. Next Hole - Repeat until all 9 holes are complete
  8. Tournament End - Final scores, podium, and career passcode generation

Shot Mechanics

Setup

  • Select your club (driver, iron, wedge, putter)
  • Adjust aim direction
  • Set launch angle
  • Apply spin (hook/slice/backspin/topspin)

Execution

  1. Click 1: Start backswing
  2. Click 2: Determine shot power (meter-based)
  3. Click 3: Determine accuracy (hook/slice based on timing)

Factors

  • Lie Type: Fairway (normal), Rough (reduced power), Tee Box (enhanced)
  • Wind: Directional wind affects trajectory
  • Obstacles: Navigate around or through destructible obstacles
  • Combat: Getting hit during your shot can ruin your aim

Combat

  • During Driving: Full combat enabled while navigating between shots
  • During Shots: You're vulnerable, but your caddy provides cover
  • Death Penalty: +1 stroke and respawn at last position
  • Caddy Revive: Caddies can revive downed golfers
  • Caddy Death: Temporary respawn delay

Scoring

Golf Score (Primary)

  • Strokes taken to complete the hole
  • Compared to par (under par = birdie, eagle, etc.)
  • Lower is better

Time Score (Secondary)

  • Total time to complete the hole
  • Faster times earn more money
  • Used as tiebreaker

Combined Ranking

  • Winner has the best golf score
  • Ties broken by fastest time
  • Money earned based on both factors

๐Ÿš€ Installation

For Players

  1. Launch Battlefield 6
  2. Navigate to Portal Mode
  3. Search for "MortarGolf" in the server browser
  4. Join a Server or create your own with the MortarGolf ruleset

For Server Hosts

  1. Open BF6 Portal Editor
  2. Import MortarGolf.ts from this repository
  3. Configure Settings (player count, round duration, etc.)
  4. Publish Server and share with friends

๐Ÿ“– How to Play

Getting Started

  1. Join a Server - Find a MortarGolf server in the browser
  2. Select Role - Choose to be a golfer or caddy
  3. Wait for Tee Time - Matchmaking will form foursomes
  4. Accept Rules - Read and accept the game rules
  5. Get to Your Cart - Spawn and drive to the first tee

Controls

Action Input
Aim Shot Mouse/Right Stick
Adjust Power Click/Trigger (timing based)
Adjust Angle Mouse Wheel/D-Pad
Apply Spin WASD/Left Stick
Select Club Number Keys/Bumpers
Enter Cart E/Interact
Exit Cart E/Interact
Shoot Weapon Left Click/Right Trigger
Revive Teammate Hold E/Hold Interact
Open Shop Auto-opens between holes

Tips & Strategies

  • Drive Smart: Faster routes aren't always safer
  • Protect Your Shot: Position your caddy strategically
  • Manage Money: Save for important holes, splurge when needed
  • Read the Wind: Check wind direction before every shot
  • Know Your Clubs: Use the right tool for the distance
  • Speed vs. Safety: Decide when to rush and when to take your time
  • Combat Timing: Disrupt opponents during their backswing for maximum effect

๐Ÿ› ๏ธ Development

Project Structure

mods/MortarGolf/
โ”œโ”€โ”€ src/ # Source files (multi-file development)
โ”‚ โ”œโ”€โ”€ types.ts # Type definitions
โ”‚ โ”œโ”€โ”€ constants.ts # Configuration
โ”‚ โ”œโ”€โ”€ state.ts # Global state
โ”‚ โ”œโ”€โ”€ helpers.ts # Utility functions
โ”‚ โ”œโ”€โ”€ ui.ts # UI components
โ”‚ โ”œโ”€โ”€ player.ts # Player management
โ”‚ โ”œโ”€โ”€ messages.ts # Message system
โ”‚ โ”œโ”€โ”€ gameflow.ts # Game flow logic
โ”‚ โ”œโ”€โ”€ updates.ts # Update loops
โ”‚ โ””โ”€โ”€ events.ts # Event handlers
โ”œโ”€โ”€ DOCS/ # Documentation
โ”‚ โ”œโ”€โ”€ BF6_SDK.md # SDK documentation
โ”‚ โ”œโ”€โ”€ BUILD_SYSTEM.md # Build system guide
โ”‚ โ”œโ”€โ”€ common_checklist.md # Development checklist
โ”‚ โ””โ”€โ”€ dev_guidelines.md # Coding guidelines
โ”œโ”€โ”€ llm/ # LLM development files
โ”‚ โ”œโ”€โ”€ brief.md # Project brief
โ”‚ โ”œโ”€โ”€ todo.md # Task list
โ”‚ โ”œโ”€โ”€ memory.md # Dev progress tracking
โ”‚ โ””โ”€โ”€ prompts.md # Useful prompts
โ”œโ”€โ”€ build.config.json # Build configuration
โ”œโ”€โ”€ MortarGolf.ts # Generated single-file output
โ”œโ”€โ”€ CHANGELOG.md # Version history
โ””โ”€โ”€ README.md # This file

Building from Source

Prerequisites

npm install

Development Mode

# Watch for changes and auto-rebuild
npm run watch:mortar
# Or build once
npm run build:mortar

Output

The build system combines all src/*.ts files into a single MortarGolf.ts file ready for BF6 Portal.

Development Workflow

  1. Read the Brief (llm/brief.md) - Understand the game design
  2. Follow Guidelines (llm/dev_guidelines.md) - Code standards and patterns
  3. Track Progress (llm/todo.md) - Granular task list
  4. Document Decisions (llm/memory.md) - Keep notes on progress
  5. Update Changelog (CHANGELOG.md) - Log all changes
  6. Build & Test - Use watch mode during development
  7. Commit - Commit both source files and generated output

Technology Stack

  • Language: TypeScript
  • SDK: Battlefield 6 Portal SDK
  • Build System: Custom Node.js builder
  • Mod Library: modlib (BF6 utility library)

๐Ÿค Contributing

We welcome contributions! Here's how you can help:

Reporting Bugs

  1. Check existing issues first
  2. Create a new issue with:
    • Clear description
    • Steps to reproduce
    • Expected vs actual behavior
    • Screenshots/videos if applicable

Suggesting Features

  1. Open an issue with the enhancement label
  2. Describe the feature and why it would be valuable
  3. Include mockups or examples if possible

Contributing Code

  1. Fork the Repository
  2. Create a Branch (git checkout -b feature/AmazingFeature)
  3. Follow Dev Guidelines (see llm/dev_guidelines.md)
  4. Make Changes in src/ files, not the generated output
  5. Test Thoroughly
  6. Build (npm run build:mortar)
  7. Commit (git commit -m 'Add some AmazingFeature')
  8. Push (git push origin feature/AmazingFeature)
  9. Open a Pull Request

Code Style

  • Follow existing patterns in dev_guidelines.md
  • Use TypeScript types appropriately
  • Comment complex logic
  • Keep functions small and focused
  • Test with multiple player counts

๐Ÿ“ Roadmap

v0.1 - MVP (Current)

  • Project setup and documentation
  • Core type definitions complete
  • Constants and configuration complete
  • Basic single-hole gameplay
  • Shot mechanics (mortar system)
  • Simple scoring
  • Basic UI

v0.5 - Alpha

  • Full 9-hole course
  • Advanced shot mechanics (spin, lie effects)
  • Shop system
  • Combat mechanics
  • AI caddy system
  • Multiple foursome support

v1.0 - Release

  • Complete feature set
  • Pro shop & career tracking
  • Driving range
  • Full polish (VFX, SFX, UI)
  • Comprehensive testing
  • 32-player support

v2.0 - Expansion

  • 18-hole courses
  • Additional maps
  • Tournament modes
  • Skins game
  • Procedural obstacles
  • Enhanced social features

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

Note: This mod requires Battlefield 6 and is built using the official BF6 Portal SDK. All Battlefield assets and trademarks are property of EA/DICE.


๐Ÿ“ž Contact & Support

Developer

Project Links

Community

  • Join the discussion in Issues
  • Share your best rounds
  • Submit course ideas
  • Report bugs and suggest features

๐Ÿ™ Acknowledgments

  • EA/DICE - For Battlefield 6 and the Portal SDK
  • BF6 Portal Community - For inspiration and feedback
  • Official Game Modes - Vertigo, BombSquad, AcePursuit, Exfil for reference patterns

๐Ÿ“ธ Screenshots

(Coming soon - screenshots and gameplay videos will be added as development progresses)


๐ŸŽฎ Play MortarGolf Today!

Ready to tee off? Find a MortarGolf server in Battlefield 6 Portal and start your golf career!

Par for the course has never been this explosive. โ›ณ๐Ÿ’ฅ


Last Updated: October 17, 2025 Version: 0.1.2

About

MortarGolf is a gamemod for Battlefield 6 Portal mode.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

AltStyle ใซใ‚ˆใฃใฆๅค‰ๆ›ใ•ใ‚ŒใŸใƒšใƒผใ‚ธ (->ใ‚ชใƒชใ‚ธใƒŠใƒซ) /