Added player movement

This commit is contained in:
2024-01-26 17:14:20 +01:00
parent 2cd93f2a39
commit 8370afd9a1
12 changed files with 148 additions and 23 deletions

10
server/game/String.go Normal file
View File

@ -0,0 +1,10 @@
package game
import "encoding/binary"
// AppendString appends the length of the string followed by its contents.
func AppendString(data []byte, str string) []byte {
data = binary.LittleEndian.AppendUint32(data, uint32(len(str)))
data = append(data, []byte(str)...)
return data
}