Skip to content

leafserver rebuilt and update to new version > 1.20

Notifications You must be signed in to change notification settings

juinnlau2/leafserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leafserver (Rebuild for Go >= 1.20)

A rebuilt Leaf game server project compatible with modern Go versions
(Go Modules, new protobuf, no deprecated dependencies)

Ask DeepWiki

✨ Project Introduction

This project is a modernized rebuild of the original leafserver project.

Main improvements:

  • ✅ Compatible with Go Modules
  • ✅ Works with modern Go versions (Go ≥ 1.20)
  • ✅ Removed deprecated / broken dependencies (e.g. lexkong/log)
  • ✅ Updated protobuf generation workflow
  • ✅ Clean project structure, suitable for learning and extension

This project is suitable for:

  • Learning the Leaf game server framework
  • Building a simple TCP / game server
  • Understanding client-server message handling

📁 Project Structure

leafserver/
├── server/           # Server main logic
├── client/           # Simple client for testing
├── conf/             # Configuration & initialization
├── msg/              # Protobuf generated messages
├── config/           # YAML configuration files
├── go.mod
├── go.sum
└── main.go

🛠 Requirements

Make sure you have the following installed:

Go ≥ 1.20

  • go version

protoc (Protocol Buffers compiler)

  • protoc --version

protoc-gen-go

  • go install google.golang.org/protobuf/cmd/protoc-gen-go@latest

🚀 How to Run the Project

1️⃣ Clone the repository

  git clone https://github.com/juinnlau2/leafserver.git
 cd leafserver

2️⃣ Initialize dependencies

 go mod tidy

3️⃣ Start the server

go run main.go

If successful, you should see logs similar to:

[INFO] logger initialized
[release] Leaf 1.1.3 starting up

4️⃣ Run the client (optional)

In another terminal:

cd client/ping
go run ping.go

The client will connect to the server and print received messages.

About

leafserver rebuilt and update to new version > 1.20

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published