-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
37 lines (32 loc) · 731 Bytes
/
main.go
File metadata and controls
37 lines (32 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package main
import (
"log"
"math/rand"
"net/http"
_ "net/http/pprof"
"time"
"github.com/piochelepiotr/minecraftGo/game"
"github.com/piochelepiotr/minecraftGo/game_engine/render"
"gopkg.in/DataDog/dd-trace-go.v1/profiler"
)
const windowWidth = 800
const windowHeight = 600
const structEditing = false
func main() {
go func() {
log.Println(http.ListenAndServe("localhost:6060", nil))
}()
err := profiler.Start(
profiler.WithService("minecraft-go"),
profiler.WithEnv("dev"),
profiler.WithVersion("v0.5"),
)
if err != nil {
log.Fatal(err)
}
defer profiler.Stop()
rand.Seed(time.Now().UnixNano())
d := render.NewDisplay(windowWidth, windowHeight)
defer d.CloseDisplay()
game.Start(d, structEditing)
}