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/majiayu000/claude-skill-registry/tree/main/skills/data/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.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?