Compare commits
No commits in common. 'stamping' and 'main' have entirely different histories.
@ -1,10 +0,0 @@
|
||||
org.label-schema.name="gomud echo"
|
||||
org.label-schema.description="simple echo server for testing gomud functionality"
|
||||
org.label-schema.vcs-ref=$VCS_REF // this is a git commit, parameterize this too
|
||||
org.label-schema.vcs-url=code.ndumas.com/ndumas/gomud
|
||||
org.label-schema.license="MIT License"
|
||||
org.label-schema.schema-version="" // TODO: parameterize this
|
||||
name="gomud-echo"
|
||||
vendor="ndumas"
|
||||
description="simple echo server for testing gomud functionality"
|
||||
summary="Deploy a gomud echo server"
|
@ -1,18 +0,0 @@
|
||||
load("@rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "ecs_lib",
|
||||
srcs = ["main.go"],
|
||||
importpath = "code.ndumas.com/ndumas/gomud/cmd/ecs",
|
||||
visibility = ["//visibility:private"],
|
||||
deps = [
|
||||
"//engine",
|
||||
"@com_github_engoengine_ecs//:ecs",
|
||||
],
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "ecs",
|
||||
embed = [":ecs_lib"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
@ -1,33 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
// "fmt"
|
||||
|
||||
"github.com/EngoEngine/ecs"
|
||||
|
||||
"code.ndumas.com/ndumas/gomud/engine"
|
||||
)
|
||||
|
||||
func main() {
|
||||
w := ecs.World{}
|
||||
trs := engine.TELNETRenderSystem{}
|
||||
|
||||
w.AddSystem(trs)
|
||||
|
||||
player1 := engine.DemoEntity{
|
||||
ecs.NewBasic(),
|
||||
&engine.RenderComponent{
|
||||
Color: true,
|
||||
},
|
||||
}
|
||||
|
||||
w.AddEntity(&player1)
|
||||
// addbyinterface isn't working right, why
|
||||
|
||||
w.Update(.25)
|
||||
w.Update(.25)
|
||||
w.Update(.25)
|
||||
w.Update(.25)
|
||||
w.Update(.25)
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
load("@rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "ecs",
|
||||
srcs = ["world.go"],
|
||||
importpath = "code.ndumas.com/ndumas/gomud/ecs",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["@com_github_engoengine_engo//:engo"],
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "engine",
|
||||
srcs = [
|
||||
"components.go",
|
||||
"telnetrenderer.go",
|
||||
"world.go",
|
||||
],
|
||||
importpath = "code.ndumas.com/ndumas/gomud/engine",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["@com_github_engoengine_ecs//:ecs"],
|
||||
)
|
@ -1,10 +0,0 @@
|
||||
package engine
|
||||
|
||||
type LocationComponent struct {
|
||||
RoomID int
|
||||
}
|
||||
|
||||
type PlayerComponent struct {
|
||||
ID int
|
||||
Username string
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
package engine
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
|
||||
"github.com/EngoEngine/ecs"
|
||||
)
|
||||
|
||||
type RenderComponent struct {
|
||||
Color bool
|
||||
}
|
||||
|
||||
func (rc *RenderComponent) GetRenderComponent() *RenderComponent {
|
||||
return rc
|
||||
}
|
||||
|
||||
type RenderComponentInterface interface {
|
||||
ecs.BasicFace
|
||||
GetRenderComponent() *RenderComponent
|
||||
}
|
||||
|
||||
type DemoEntity struct {
|
||||
ecs.BasicEntity
|
||||
*RenderComponent
|
||||
}
|
||||
|
||||
type TELNETRenderSystem struct {
|
||||
entities map[uint64]RenderComponentInterface
|
||||
conns map[uint64]net.Conn
|
||||
}
|
||||
|
||||
func Priority() int { return 100 }
|
||||
|
||||
func New(w *ecs.World) {
|
||||
|
||||
}
|
||||
|
||||
func (trs *TELNETRenderSystem) AddByInterface(o ecs.Identifier) {
|
||||
fmt.Println("calling AddByInterface")
|
||||
v := o.(RenderComponentInterface)
|
||||
trs.entities[o.ID()] = v
|
||||
}
|
||||
|
||||
func (trs TELNETRenderSystem) Update(dt float32) {
|
||||
for _, e := range trs.entities {
|
||||
fmt.Println("bing bong", e)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (trs TELNETRenderSystem) Remove(e ecs.BasicEntity) {
|
||||
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
package engine
|
||||
|
||||
import ()
|
@ -1,9 +0,0 @@
|
||||
load("@rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "logger",
|
||||
srcs = ["wrappedslogger.go"],
|
||||
importpath = "code.ndumas.com/ndumas/gomud/logger",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["@com_github_threedotslabs_watermill//:watermill"],
|
||||
)
|
@ -1,6 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
tag=$(git describe --tags --dirty=-dev)
|
||||
commit=$(git rev-parse HEAD | head -c8)
|
||||
echo "STABLE_GIT_VERSION $tag"
|
||||
echo "STABLE_GIT_COMMIT $commit"
|
@ -1,6 +0,0 @@
|
||||
package gomud
|
||||
|
||||
const (
|
||||
VERSION = ""
|
||||
BUILD = ""
|
||||
)
|
Loading…
Reference in New Issue