Skip to content

IYanel-DEV/FirstPerson-Multiplayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

39 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฏ Godot Multiplayer First Person Template

Icon

Godot Engine Platform License Version

A robust foundation for creating first-person shooter games with smooth multiplayer functionality

Complete networking solution with advanced player movement, synchronization, and matchmaking systems

๐Ÿš€ Quick Start โ€ข ๐Ÿ“‹ Features โ€ข โš™๏ธ Installation โ€ข ๐ŸŽฎ Usage โ€ข ๐Ÿค Contributing


๐ŸŒŸ Overview

The Godot Multiplayer First Person Template is your gateway to creating competitive or cooperative multiplayer shooters. Built with performance and scalability in mind, this template provides everything you need to jumpstart your FPS project with professional-grade networking and smooth gameplay mechanics.

Godot FPS Template Screenshot

Example screenshot

โœจ Key Features

๐ŸŽฎ Core Gameplay

Advanced movement and control systems
  • ๐Ÿƒ Advanced FPS Movement: Sprinting, jumping, and air control with physics-based momentum
  • ๐Ÿ–ฑ๏ธ Precision Mouse Look: Adjustable sensitivity with smooth camera controls
  • ๐Ÿ“ท Immersive Camera Effects: Dynamic FOV changes,camera sway, and tilt effects
  • โšก Responsive Controls: Coyote time and jump buffering for fluid gameplay
  • ๐ŸŽฏ Frame-Rate Independence: Consistent movement regardless of FPS

๐ŸŒ Multiplayer Networking

Professional-grade networking architecture
  • ๐Ÿ–ฅ๏ธ Dedicated Server Architecture: Reliable and scalable server infrastructure
  • ๐Ÿ”„ Smooth Synchronization: Player interpolation and lag compensation
  • ๐ŸŽญ Player Management: Seamless spawning/despawning system
  • ๐ŸŽช Matchmaking System: Automated lobby and session management
  • ๐Ÿ”— Scene Synchronization: Automatic world state consistency

โš™๏ธ Technical Highlights

Enterprise-level technical features
  • ๐Ÿ—๏ธ Separated Controller Architecture: Clean separation between local and remote players
  • ๐Ÿ”ฎ Network Prediction: Client-side prediction with server reconciliation
  • ๐Ÿ“ฆ Efficient Compression: Optimized network data transmission
  • ๐ŸŽš๏ธ Adaptive Interpolation: Dynamic adjustment based on network conditions
  • ๐Ÿ›ก๏ธ Error Handling: Robust recovery and fallback systems

๐Ÿ–ฅ๏ธ UI System

Complete user interface suite
  • ๐Ÿ  Main Menu: Intuitive host/join functionality
  • โš™๏ธ Settings Panel: Customizable sensitivity, graphics, and audio options
  • ๐Ÿ“Š Connection Status: Real-time network information display
  • ๐Ÿ’ฌ Feedback System: User-friendly error messages and notifications

๐Ÿ› ๏ธ Installation

Requirements

  • Godot Godot Engine 4.4.1 or newer
  • Network Stable internet connection for multiplayer

Quick Setup

  1. Clone the Repository

    git clone https://github.com/yourusername/godot-multiplayer-fps-template.git
    cd godot-multiplayer-fps-template
  2. Open in Godot

    • Launch Godot Engine
    • Click "Import" and select the project folder
    • Wait for assets to import
  3. Run the Project

    • Press F5 or click the play button
    • Choose "Main" scene when prompted

๐ŸŽฎ Usage

Starting a Game

๐Ÿ–ฅ๏ธ Host Server

# Host a new multiplayer session
func host_game():
	multiplayer.peer_connected.connect(_on_player_connected)
	multiplayer.peer_disconnected.connect(_on_player_disconnected)
	
	var peer = ENetMultiplayerPeer.new()
	peer.create_server(PORT, MAX_PLAYERS)
	multiplayer.multiplayer_peer = peer

๐Ÿ”Œ Join Server

# Connect to an existing server
func join_game(address: String):
	var peer = ENetMultiplayerPeer.new()
	peer.create_client(address, PORT)
	multiplayer.multiplayer_peer = peer

Key Controls

Action Key Description
Movement WASD Move forward, left, back, right
Sprint Shift Increase movement speed
Jump Space Jump with momentum conservation
Look Mouse Camera rotation and aiming
Settings Esc Open settings menu

๐Ÿ—๏ธ Architecture

graph LR
	A[Main Menu] --> B[Network Manager]
	B --> C{Server/Client}
	C -->|Host| D[Game Mode]
	C -->|Join| E[Player Controller]
	D --> F[Player Spawner]
	E --> G[Network Sync]
	F --> H[Player Instance]
	G --> H
	H --> I[Local Controller]
	H --> J[Remote Controller]
Loading

Core Components

  • PlayerController: Handles input processing and movement logic
  • NetworkManager: Manages connections and data synchronization
  • GameSession: Coordinates multiplayer game state
  • UIManager: Controls menus and user interface
  • SettingsManager: Handles player preferences and configuration

๐ŸŽฏ Customization

Movement Settings

# Adjust in PlayerController.gd
@export var walk_speed: float = 5.0
@export var sprint_speed: float = 8.0
@export var jump_strength: float = 12.0
@export var mouse_sensitivity: float = 0.003

Network Configuration

# Modify in NetworkManager.gd  
const PORT = 7000
const MAX_PLAYERS = 16
const TICK_RATE = 60

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

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


๐Ÿ™ Acknowledgments

  • Godot Engine - The amazing open-source game engine
  • Community Contributors - Thanks to everyone who helped improve this template
  • Beta Testers - Your feedback made this template better

โญ Star this repository if you found it helpful! โญ

Made with โค๏ธ using Godot Engine

Report Bug โ€ข Request Feature โ€ข Join Discord

For the Map assets i used kenney assets https://www.kenney.nl/assets/prototype-textures

About

an advanced True First Person Multiplayer with new mechanic

Resources

License

Stars

Watchers

Forks

Packages

No packages published