Description
🃏 Truco Paulista 1v1 Unity Multiplayer Source Code
Truco Paulista 1v1 is a complete Unity card game source code project combined with a full ASP.NET Core multiplayer backend. It is designed for developers who want to build, customize, and extend a real-time online Truco card game without having to create the complete multiplayer architecture from the ground up.
The project supports both Solo mode against a CPU and online 1v1 Multiplayer, with both modes using the same GamePlay scene. This makes the project easier to understand and provides a convenient foundation for future customization and expansion.
The multiplayer system uses SignalR for real-time communication and an authoritative ASP.NET Core server to control important game actions and validate multiplayer gameplay.
🎮 Solo & Online 1v1 Multiplayer
Players can choose between two gameplay experiences.
Solo Mode allows the player to compete against the CPU, while Multiplayer Mode connects two players in an online 1v1 match.
Both modes share the same GamePlay scene, helping keep the project architecture organized and reducing unnecessary duplication between gameplay systems.
🌐 Authoritative ASP.NET Core Multiplayer
The backend is designed around an authoritative server architecture.
Important multiplayer actions are controlled and validated by the ASP.NET Core server, including:
Card distribution
Player turns
Truco requests
Score handling
Match results
Player statistics
This architecture gives developers a solid foundation for building and extending the online gameplay system.
⚡ SignalR Real-Time Communication
The project uses Microsoft SignalR for real-time multiplayer communication between Unity clients and the ASP.NET Core backend.
The included multiplayer architecture supports live 1v1 gameplay while also providing automatic reconnect and match-resume functionality for temporary connection interruptions.
🔐 Registration, Login & JWT Authentication
The project includes a complete user authentication foundation.
Players can:
Register an account
Log in
Use JWT authentication
Refresh authentication tokens
Access their player profile
View gameplay statistics
This gives the project more than just a multiplayer match system. It includes the core account functionality needed for a connected card game experience.
👤 Player Profiles & Statistics
Player information and multiplayer performance are supported through the backend.
The system tracks statistics such as:
Wins
Losses
Matches played
Multiplayer statistics are handled server-side, providing a centralized foundation for player data.
🏆 Truco Paulista Gameplay Systems
The project implements the core Truco Paulista card-game mechanics described in the source package.
Included systems feature:
40-card Truco deck
Vira and Manilha system
Truco stake progression
Eleven Hand system
Turn timers
Truco decision timers
Victory and defeat handling
Match surrender
The Truco stake progression supports 1, 3, 6, 9 and 12.
⏱️ Turn & Decision Timers
Timed gameplay systems are included for multiplayer matches.
The project contains turn timers and dedicated Truco decision timers, helping maintain the flow of an online match.
🔄 Reconnect & Match Resume
Temporary disconnections do not necessarily mean the match has to immediately end.
The project includes an 80-second disconnect grace period, automatic SignalR reconnection, and support for resuming a match after a temporary disconnection.
This provides an important foundation for real-time multiplayer environments where network interruptions can occur.
🤝 Automatic Matchmaking
The multiplayer mode includes an automatic matchmaking system.
For local multiplayer testing, developers can run two clients using different accounts. For example, one player can use the Unity Editor while the second uses a Windows build.
When both players select Multiplayer, the matchmaking system automatically creates a 1v1 match.
🗄️ PostgreSQL Database
The ASP.NET Core backend uses PostgreSQL for persistence.
Developers can configure the database connection through the backend's application settings and apply the included Entity Framework migrations for local testing.
🧩 Organized Unity & Backend Source Code
The package includes the full Unity project source code as well as the complete ASP.NET Core backend source code.
The project also includes technical PDF documentation covering areas such as:
Unity setup
ASP.NET Core
PostgreSQL
Gameplay systems
Multiplayer architecture
Testing
This makes the project easier to set up and understand, especially for developers who are working with Unity multiplayer and backend systems for the first time.
🛠️ Configured for Local Development
The project is prepared for local development and testing.
The default local API address used by the Unity project is:
http://localhost:5000
The SignalR Hub URL is:
http://localhost:5000/gamehub
Production infrastructure is not included. Developers will need to separately configure their own VPS, domain, SSL certificate, and production server environment when deploying the project online.
4. Key Features
✔ Complete Truco Paulista card game
✔ Full Unity source code
✔ Full ASP.NET Core backend source code
✔ Solo mode against CPU
✔ Online 1v1 multiplayer
✔ Automatic matchmaking
✔ SignalR real-time communication
✔ Authoritative multiplayer server
✔ Server-side gameplay validation
✔ PostgreSQL database persistence
✔ JWT authentication
✔ User registration and login
✔ Refresh token system
✔ Player profiles
✔ Wins, losses, and matches-played statistics
✔ 40-card Truco deck
✔ Vira and Manilha system
✔ Truco progression: 1, 3, 6, 9, 12
✔ Eleven Hand system
✔ Turn timers
✔ Truco decision timers
✔ Match surrender system
✔ 80-second disconnect grace period
✔ Automatic SignalR reconnection
✔ Match resume after temporary disconnection
✔ Victory and defeat system
✔ Server-side multiplayer statistics
✔ Shared GamePlay scene for Solo and Multiplayer
✔ Technical PDF documentation
✔ Organized C# code
5. What You’ll Get
The package includes:
Complete Unity project
Complete ASP.NET Core backend
Unity C# source code
Backend C# source code
Solo CPU gameplay
Online 1v1 multiplayer
SignalR integration
Authoritative multiplayer architecture
Matchmaking system
Authentication system
JWT and refresh token functionality
PostgreSQL integration
Player profile system
Player statistics
Reconnect and match-resume systems
Surrender functionality
Truco gameplay mechanics
Technical PDF documentation
6. Technical Details
Game Type: Truco Paulista Card Game
Game Modes: Solo + Online 1v1 Multiplayer
Game Engine: Unity
Backend: ASP.NET Core
Real-Time Networking: SignalR
Database: PostgreSQL
Authentication: JWT + Refresh Tokens
Multiplayer Architecture: Authoritative Server
Card Deck: 40-card Truco deck
Persistence: PostgreSQL
Gameplay Scene: Shared between Solo and Multiplayer
Requirements
Unity Editor
.NET 10 SDK
PostgreSQL
NuGetForUnity
Microsoft.AspNetCore.SignalR.Client
Basic Unity and C# knowledge
Basic ASP.NET Core knowledge recommended
PostgreSQL installed and configured for local backend testing
7. Local Setup
The project is configured for local development and testing.
Basic setup involves:
Extract the downloaded ZIP.
Open the ASP.NET Core backend.
Install and configure PostgreSQL.
Configure the PostgreSQL connection string.
Configure the JWT secret key.
Apply the Entity Framework database migrations.
Start the ASP.NET Core API.
Open the included Unity project.
Verify the API URL is configured for http://localhost:5000.
Verify the SignalR Hub uses http://localhost:5000/gamehub.
Start the project from LoginScene.
Register or log in with an account.
Select Solo to play against the CPU.
For multiplayer testing, run two clients with different accounts.
Select Multiplayer on both clients to trigger automatic matchmaking.
The included PDF documentation provides additional information about the setup, gameplay systems, backend, multiplayer architecture, and testing process.
8. Perfect For
This Unity source code is suitable for developers interested in:
Truco card games
Online multiplayer card games
Unity multiplayer projects
ASP.NET Core game backends
SignalR multiplayer systems
Real-time 1v1 games
Card game templates
Authoritative multiplayer architecture
PostgreSQL-backed Unity games
Unity + ASP.NET Core projects
Custom multiplayer game development
9. Why Choose Truco Paulista 1v1?
Creating an online card game requires much more than implementing the cards and gameplay. Authentication, matchmaking, database persistence, server authority, real-time communication, reconnect handling, and player statistics all need to work together.
Truco Paulista 1v1 provides these major systems in one project, including both the Unity client and ASP.NET Core backend.
The authoritative server architecture handles important multiplayer actions, while SignalR provides real-time communication. PostgreSQL handles persistent player data, and the included authentication, matchmaking, reconnect, and statistics systems provide a strong foundation for further development.
Whether you want to study a Unity + ASP.NET Core multiplayer architecture, customize the existing Truco game, or use it as a foundation for your own online card-game project, this source code provides a ready-made starting point.
Get the Truco Paulista 1v1 Unity ASP.NET Core Source Code from SellUnitySourceCode.com and start building your multiplayer card game project. 🃏⚡