Pulcedocs

Test Server

Run lightweight test hosts while developing and validating plugin behavior.

On this page

Fast Start

Use the minimal test server for quick gameplay checks. It starts quickly with a memory world and loads the sample plugin.

commands.ps1
go run ./examples/testserver
go run ./cmd/basicserver

Ready-Made Server

Use the bundled cmd/basicserver when you need terrain persistence, player storage, query status, logging, and built-in demo plugins.

basic-server.ps1
go run ./cmd/basicserver

Adding a Plugin To The Test Server

Import a plugin instance into bootstrap.Config.Plugins for direct compile-time wiring, or register a factory and load by name through PluginNames.

host-config.go
import (
	"github.com/pulce-core/Pulce/bootstrap"
	"github.com/pulce-core/Pulce/core/plugin"
	"github.com/pulce-core/Pulce/examples/minimalplugin"
)

instance, err := bootstrap.New(bootstrap.Config{
	// worlds, listen endpoint, status, etc.
	Plugins: []plugin.Plugin{
		minimalplugin.New(),
	},
})
plugin-factory.go
func init() {
	plugin.MustRegisterFactory("minimalplugin", New)
}

instance, err := bootstrap.New(bootstrap.Config{
	PluginNames: []string{"minimalplugin"},
})

External Plugin Module

For plugin development outside this repository, use a normal go.mod flow and a local replace while testing against this checkout.

external-module.ps1
mkdir myplugin
cd myplugin
go mod init example.com/myplugin
go get github.com/pulce-core/Pulce

go mod edit -replace github.com/pulce-core/Pulce=../nucleus