Game Overview
Infinity Train is a unique multiplayer RPG set in a post-apocalyptic world ravaged by mutated creatures. Explore desolate landscapes while battling for survival aboard the last operational train.
Storyline
Embark on a journey through the desolate landscapes of Infinity Train, a multiplayer RPG set in a post-apocalyptic world ravaged by mutated creatures. In the aftermath of a nuclear war, humanity's remnants cling to survival aboard a single operational train, hurtling towards the elusive sanctuary of "Paradise Land." But salvation comes with danger, and only the strongest will endure.
As a survivor, your mission is clear: keep the train running at all costs. Every moment stationary risks drawing hordes of mutated creatures that roam the wasteland. Survival demands adherence to one profound motto: "Keep going no matter what."
Traverse procedurally-generated landscapes, scavenging resources across ruined cities, dense forests, and treacherous mountains. Beware—creatures grow more ferocious during eclipses, and the day-night cycle adds its own challenges. Master RPG mechanics, craft tools and weapons, and manage your inventory wisely to improve your odds of survival.
Upgrade the train as you progress, equipping it with advanced weaponry, facilities, and furnishings to ensure the safety and well-being of all aboard. Cooperation is key—team up with fellow survivors to embark on perilous quests and face formidable adversaries together. Defy the odds and lead humanity toward a brighter future.
Inventory System
Currently, I'm working on a dynamic inventory system designed to handle stackable items, limited slot counts, and real-time updates to the user interface.
- Items are categorized as materials, tools, or buildables.
- Supports stack limits per item type, defined in the database.
- Includes a UI that updates as items are added, removed, or modified.
- Fully scriptable and integrated with Unity's event-driven architecture.
Procedural Terrain Generation
The terrain in Infinity Train is procedurally generated, ensuring a unique landscape for every playthrough. The game leverages modular and scalable methods to create immersive environments dynamically.
- Seed Synchronization: A deterministic seed is generated and synchronized across the network to ensure consistency between clients.
- Layered Generators: The terrain is built using multiple generators, including height maps, tree placement, grass distribution, and texture layers.
- Runtime Regeneration: Terrain can be fully regenerated at runtime. This modular system allows for seamless updates during gameplay, keeping the experience fresh and unpredictable.
- Infinite Gameplay: By procedurally generating everything, Infinity Train has the potential to provide endless exploration. As the game progresses, new terrains, resources, and challenges are continuously created.
- Customizable Noise Maps: Using Perlin noise with adjustable parameters (e.g., octaves, persistence, lacunarity), landscapes can be tailored for varied difficulty and aesthetic appeal.
- Steepness-based Textures: Different textures are applied based on slope steepness, creating realistic transitions between grassy plains and rocky cliffs.
- Gameplay Integration: The game emphasizes the need to "keep going" — players must continuously move forward, gathering new resources to survive and win.
- Network Optimization: Terrain details (e.g., trees, grass) are calculated client-side after the synchronized seed ensures positional accuracy.
This modular approach allows for scalability, where more biomes and features can be added with minimal rework. The infinite generation concept also opens doors to endless gameplay, ensuring that no two journeys are the same.
Multiplayer Implementation
Infinity Train features multiplayer gameplay, allowing players to connect and collaborate seamlessly. The multiplayer system is built using Unity Netcode for GameObjects and integrates Unity Relay for scalable, low-latency connections across players worldwide.
- Hosting a Game: The host creates a relay allocation using Unity Relay, which supports up to 9 players. A unique join code is generated for others to connect. The Relay Server ensures stable and secure communication for all players.
- Joining a Game: Clients can join a game by entering the host’s join code. The Relay Server handles the connection setup, ensuring that the connection is stable and efficient for every player.
- Secure and Reliable Communication: The system uses Unity Transport Protocol (UTP) with DTLS encryption, ensuring secure communication for all players.
- Anonymous Authentication: Players authenticate using Unity’s anonymous authentication system, which provides unique player identification without requiring complex login systems.
- Debugging Support: Callbacks track client connections, disconnections, and server states for seamless troubleshooting and monitoring.
This multiplayer system is designed to scale efficiently, providing a smooth and engaging experience for both hosts and players.