Merge pull request #38 from mdiluz/world-gen-improve

World gen improve
This commit is contained in:
Marc Di Luzio 2020-07-25 23:48:59 +01:00 committed by GitHub
commit 47e2e13c49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 11 deletions

View file

@ -2,7 +2,6 @@ package rove
import ( import (
"log" "log"
"math/rand"
"github.com/mdiluz/rove/pkg/maths" "github.com/mdiluz/rove/pkg/maths"
"github.com/mdiluz/rove/proto/roveapi" "github.com/mdiluz/rove/proto/roveapi"
@ -111,15 +110,6 @@ func (a *chunkBasedAtlas) populate(chunk int) {
} }
} }
// Set up any objects
for i := 0; i < len(c.Tiles); i++ {
if rand.Intn(16) == 0 {
c.Objects[i] = Object{Type: roveapi.Object_RockLarge}
} else if rand.Intn(32) == 0 {
c.Objects[i] = Object{Type: roveapi.Object_RockSmall}
}
}
a.Chunks[chunk] = c a.Chunks[chunk] = c
} }

View file

@ -33,7 +33,7 @@ func NewNoiseWorldGen(seed int64) WorldGen {
} }
const ( const (
terrainNoiseScale = 6 terrainNoiseScale = 15
rockNoiseScale = 3 rockNoiseScale = 3
) )