Compare commits
4 Commits
feature/mu
...
4bfb5af362
Author | SHA1 | Date | |
---|---|---|---|
4bfb5af362 | |||
c7f7c083b1 | |||
1c42ec2802 | |||
7ab75e8128 |
11
LICENSE
Normal file
11
LICENSE
Normal file
@ -0,0 +1,11 @@
|
||||
“Commons Clause” License Condition v1.0
|
||||
|
||||
The Software is provided to you by the Licensor under the License, as defined below, subject to the following condition.
|
||||
|
||||
Without limiting other conditions in the License, the grant of rights under the License will not include, and the License does not grant to you, right to Sell the Software.
|
||||
|
||||
For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you under the License to provide to third parties, for a fee or other consideration (including without limitation fees for hosting or consulting/ support services related to the Software), a product or service whose value derives, entirely or substantially, from the functionality of the Software. Any license notice or attribution required by the License must also include this Commons Cause License Condition notice.
|
||||
|
||||
Software: GoonScape
|
||||
License: Commons Clause v1.0
|
||||
Licensor: bdnugget
|
32
main.go
32
main.go
@ -50,6 +50,8 @@ type Player struct {
|
||||
TargetPath []Tile
|
||||
Speed float32
|
||||
ActionQueue []Action // Queue for player actions
|
||||
Model rl.Model
|
||||
Texture rl.Texture2D
|
||||
}
|
||||
|
||||
// Initialize the map with some height data
|
||||
@ -313,11 +315,11 @@ func main() {
|
||||
|
||||
go HandleServerCommunication(conn, playerID, &player)
|
||||
|
||||
playerModel := rl.LoadModel("resources/models/goonion.obj")
|
||||
defer rl.UnloadModel(playerModel)
|
||||
goonerModel := rl.LoadModel("resources/models/goonion.obj")
|
||||
defer rl.UnloadModel(goonerModel)
|
||||
playerTexture := rl.LoadTexture("resources/models/goonion.png")
|
||||
defer rl.UnloadTexture(playerTexture)
|
||||
rl.SetMaterialTexture(playerModel.Materials, rl.MapDiffuse, playerTexture)
|
||||
rl.SetMaterialTexture(goonerModel.Materials, rl.MapDiffuse, playerTexture)
|
||||
|
||||
coomerModel := rl.LoadModel("resources/models/coomer.obj")
|
||||
defer rl.UnloadModel(coomerModel)
|
||||
@ -325,6 +327,25 @@ func main() {
|
||||
defer rl.UnloadTexture(coomerTexture)
|
||||
rl.SetMaterialTexture(coomerModel.Materials, rl.MapDiffuse, coomerTexture)
|
||||
|
||||
shrekeModel := rl.LoadModel("resources/models/shreke.obj")
|
||||
defer rl.UnloadModel(shrekeModel)
|
||||
shrekeTexture := rl.LoadTexture("resources/models/shreke.png")
|
||||
defer rl.UnloadTexture(shrekeTexture)
|
||||
rl.SetMaterialTexture(shrekeModel.Materials, rl.MapDiffuse, shrekeTexture)
|
||||
|
||||
models := []struct {
|
||||
Model rl.Model
|
||||
Texture rl.Texture2D
|
||||
}{
|
||||
{Model: goonerModel, Texture: playerTexture},
|
||||
{Model: coomerModel, Texture: coomerTexture},
|
||||
{Model: shrekeModel, Texture: shrekeTexture},
|
||||
}
|
||||
|
||||
modelIndex := int(playerID) % len(models)
|
||||
player.Model = models[modelIndex].Model
|
||||
player.Texture = models[modelIndex].Texture
|
||||
|
||||
rl.SetTargetFPS(60)
|
||||
|
||||
// Music
|
||||
@ -356,9 +377,7 @@ func main() {
|
||||
rl.ClearBackground(rl.RayWhite)
|
||||
rl.BeginMode3D(camera)
|
||||
DrawMap(mapGrid)
|
||||
DrawPlayer(player, &playerModel, mapGrid)
|
||||
|
||||
rl.DrawModel(coomerModel, rl.NewVector3(5*TileSize+32, 32, 5*TileSize+32), 16, rl.White)
|
||||
DrawPlayer(player, &player.Model, mapGrid)
|
||||
|
||||
rl.DrawFPS(10, 10)
|
||||
|
||||
@ -366,7 +385,6 @@ func main() {
|
||||
rl.EndDrawing()
|
||||
}
|
||||
}
|
||||
|
||||
func ConnectToServer() (net.Conn, int32, error) {
|
||||
// Attempt to connect to the server
|
||||
conn, err := net.Dial("tcp", serverAddr)
|
||||
|
12
resources/models/shreke.mtl
Normal file
12
resources/models/shreke.mtl
Normal file
@ -0,0 +1,12 @@
|
||||
# Blender 3.6.0 MTL File: 'None'
|
||||
# www.blender.org
|
||||
|
||||
newmtl Material.001
|
||||
Ns 250.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Kd shreke.png
|
210035
resources/models/shreke.obj
Normal file
210035
resources/models/shreke.obj
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/models/shreke.png
Normal file
BIN
resources/models/shreke.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 MiB |
Reference in New Issue
Block a user