Agent skill
programming-languages
Core programming languages for game server development including C++, C#, Go, Rust
Install this agent skill to your Project
npx add-skill https://github.com/pluginagentmarketplace/custom-plugin-server-side-game-dev/tree/main/skills/programming-languages
SKILL.md
Programming Languages for Game Servers
Master high-performance languages for real-time game server development.
Language Comparison
| Language | Performance | Memory | Concurrency | Use Case |
|---|---|---|---|---|
| C++ | Highest | Manual | Threads | AAA, FPS |
| Rust | High | Safe | Async | New projects |
| Go | High | GC | Goroutines | Microservices |
| C# | Medium | GC | Async | Unity, casual |
| Java | Medium | GC | Threads | MMO |
C++ Game Server
#include <boost/asio.hpp>
class GameServer {
public:
GameServer(boost::asio::io_context& io, short port)
: acceptor_(io, tcp::endpoint(tcp::v4(), port)) {
start_accept();
}
private:
void start_accept() {
auto socket = std::make_shared<tcp::socket>(acceptor_.get_executor());
acceptor_.async_accept(*socket,
[this, socket](boost::system::error_code ec) {
if (!ec) handle_connection(socket);
start_accept();
});
}
tcp::acceptor acceptor_;
};
Go Server
type GameServer struct {
players sync.Map
tick *time.Ticker
}
func (s *GameServer) handlePlayer(conn net.Conn) {
defer conn.Close()
for {
msg := readMessage(conn)
go s.processMessage(msg)
}
}
Rust Server
async fn handle_player(stream: TcpStream) -> Result<()> {
let (reader, writer) = stream.split();
loop {
let msg = read_message(&mut reader).await?;
let response = process_command(&msg).await;
write_message(&mut writer, &response).await?;
}
}
Selection Criteria
| Factor | Best Choice |
|---|---|
| Latency critical | C++, Rust |
| Rapid development | Go, C# |
| Team expertise | Match existing |
| Scalability | Go, Erlang |
Troubleshooting
Common Failure Modes
| Error | Root Cause | Solution |
|---|---|---|
| Memory leak | Manual mgmt | Use RAII/smart ptrs |
| GC pauses | Allocation | Pool objects |
| Thread deadlock | Lock order | Lock hierarchy |
| Segfault | Pointer bug | Use Rust/sanitizers |
Debug Checklist
# C++ memory check
valgrind --leak-check=full ./game-server
# Go profiling
go tool pprof http://localhost:6060/debug/pprof/heap
# Rust optimization
cargo build --release
Unit Test Template
TEST(GameServer, AcceptsConnections) {
GameServer server(8080);
TcpClient client;
client.connect("localhost", 8080);
EXPECT_TRUE(client.isConnected());
}
Resources
assets/- Language templatesreferences/- Performance guides
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
io-multiplexing
High-performance I/O multiplexing including epoll, IOCP, kqueue, and io_uring
design-patterns
Game server design patterns including ECS, command pattern, and event sourcing
matchmaking
Skill-based matchmaking systems, ranking algorithms, and queue management for fair multiplayer matches
async-programming
Asynchronous programming models including coroutines, async/await, and reactive patterns
monitoring
Game server monitoring with metrics, alerting, and performance tracking for production reliability
communication-protocols
Game server communication protocols including gRPC, REST, and custom binary protocols
Didn't find tool you were looking for?