Hope to contibute to faiface/pixel with a new community example

This commit is contained in:
Essenceia 2018-07-04 22:27:22 +00:00
parent 2ffc7a670e
commit 8a772c3de1
64 changed files with 4011 additions and 0 deletions

View File

@ -0,0 +1,9 @@
run:
./build_assets.sh
go run main.go
build_mac:
./build_mac.sh
build_assets:
./build_assets.sh

View File

@ -0,0 +1,60 @@
# ASharedJourney
This is a fork of a project originally developed during the SFR game jam along side Pierre, Gabriel, Aurore & Fabio.
This project uses the go [pixel](https://github.com/faiface/pixel) package for sound management and sprites, go check them out.
>GameJam SFR 2018 Julia - Pierre - Gabriel - Aurore - Fabio
>
>Music: Thibault
>
>Theme: Si j'étais toi et que tu étais moi (If I were you and you were me)
>
>[Itch.io](https://fmaschi.itch.io/a-shared-journey)
## Getting Started
* [GO](https://golang.org) - Programming language
## Building and running
### Installation
- First, install the game and its dependencies
```bash
go get -u github.com/gandrin/ASharedJourney
```
- You will also need the `go-bindata` program to build the assets into the binary file
```bash
go get -u github.com/jteeuwen/go-bindata/...
```
> Make sure your `$GOPATH` is set :wink:
### Run
```
make run
```
### Releasing
```
make build_mac
```
#### OR
```
make build_linux
```
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
### Acknowledgements
Thibault A. - Sound designer

View File

@ -0,0 +1,21 @@
package animation
import (
"log"
"github.com/gandrin/ASharedJourney/shared"
)
//placeholder
type backgroundImage int
func (a *Animator) generateBackground(level int) [][]backgroundImage {
//todo draw background depending on selected level
return make([][]backgroundImage, 3, 3)
}
func (a *Animator) redrawBackGroundTile(pos shared.Position) {
//todo refresh background position
//log.Print("position to redraw ", pos)
}

View File

@ -0,0 +1,75 @@
//package for managing animations and refreshing screen
package animation
import (
"fmt"
"log"
"time"
"github.com/gandrin/ASharedJourney/mechanics"
"github.com/gandrin/ASharedJourney/shared"
)
type Animator struct {
backgound [][]backgroundImage //placeholder
fromAnim chan *mechanics.Motion
player1 *playerSprite
player2 *playerSprite
tileSet *FakeTileSet
}
var anim *Animator
func Start(motion chan *mechanics.Motion, level int, pType1 mechanics.PlayerType, pType2 mechanics.PlayerType, tileset *FakeTileSet) {
anim = new(Animator)
anim.fromAnim = motion
//player animation
anim.player1 = NewPlayerSprite(pType1)
anim.player2 = NewPlayerSprite(pType2)
//load tileset
anim.tileSet = tileset
//load background
anim.backgound = anim.generateBackground(level)
}
func (anim *Animator) muxChannel() *mechanics.Motion {
var nextMotion *mechanics.Motion = nil
select {
case m, ok := <-anim.fromAnim:
if ok {
nextMotion = m
} else {
log.Fatal("Channel closed!")
}
default:
fmt.Println("No value ready, moving on.")
}
return nextMotion
}
//play main animation loop
func (anim *Animator) Play() {
for play := true; play; play = shared.Continue() {
time.Sleep(shared.FrameRefreshDelayMs * time.Millisecond)
motion := anim.muxChannel()
anim.animate(motion)
}
}
func (anim *Animator) animate(motion *mechanics.Motion) {
//check if motion called
if motion != nil {
//move players and events
//log.Printf("Move players")
}
//move all animations
//log.Printf("animting")
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="18" height="20" tilewidth="32" tileheight="32" infinite="0" nextobjectid="1">
<tileset firstgid="1" source="forest.tsx"/>
<layer name="background" width="18" height="20">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,18,18,18,0,18,18,18,0,18,18,18,0,18,18,18,18,0,
0,18,0,18,18,18,0,18,0,0,0,18,0,18,0,0,18,0,
0,18,18,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,
0,0,18,0,0,18,18,0,0,0,0,18,0,0,0,18,0,0,
0,18,18,0,18,18,0,18,18,0,0,18,0,18,18,18,0,0,
0,18,0,18,18,0,0,0,18,18,0,18,18,18,0,18,18,0,
0,18,18,18,0,18,0,18,0,18,18,18,0,18,0,0,18,0,
0,0,0,18,18,18,18,18,18,18,0,18,18,18,18,18,18,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,
0,0,0,18,18,18,18,18,18,18,0,18,18,18,18,18,18,0,
0,18,18,18,0,18,0,18,0,18,18,18,0,18,0,0,18,0,
0,18,0,18,18,0,0,0,18,18,0,18,18,18,0,18,18,0,
0,18,18,0,18,18,0,18,18,0,0,18,0,18,18,18,0,0,
0,0,18,0,0,18,18,0,0,0,0,18,0,0,0,18,0,0,
0,18,18,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,
0,18,0,18,18,18,0,18,0,0,0,18,0,18,0,0,18,0,
0,18,18,18,0,18,18,18,0,18,18,18,0,18,18,18,18,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="water" width="18" height="20">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="obstacles" width="18" height="20">
<data encoding="csv">
21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,
20,0,0,0,17,0,0,0,16,0,0,0,16,0,0,0,0,24,
20,0,17,0,0,0,17,0,17,17,17,0,16,0,17,17,0,24,
20,0,0,17,17,17,17,0,0,0,0,0,0,0,0,0,0,24,
20,16,0,17,17,0,0,19,19,19,19,0,17,17,17,0,17,24,
20,0,0,17,0,0,17,0,0,19,19,0,17,0,0,0,17,24,
20,0,17,0,0,17,17,17,0,0,19,0,0,0,17,0,0,24,
20,0,0,0,19,0,17,0,19,0,0,0,16,0,17,17,0,24,
20,17,17,0,0,0,0,0,0,0,17,0,0,0,0,0,0,24,
20,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,0,24,
20,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,0,24,
20,17,17,0,0,0,0,0,0,0,17,0,0,0,0,0,0,24,
20,0,0,0,17,0,17,0,17,0,0,0,16,0,17,17,0,24,
20,0,16,0,0,17,16,17,0,0,17,0,0,0,17,0,0,24,
20,0,0,19,0,0,17,0,0,17,19,0,17,0,0,0,17,24,
20,17,0,19,19,0,0,17,17,17,17,0,19,17,17,0,17,24,
20,0,0,19,19,19,19,0,0,0,0,0,0,0,0,0,0,24,
20,0,17,0,0,0,19,0,17,17,17,0,17,0,17,17,0,24,
20,0,0,0,16,0,0,0,17,0,0,0,19,0,0,0,0,24,
27,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,25
</data>
</layer>
<layer name="movables" width="18" height="20" locked="1">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="holes" width="18" height="20" locked="1">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
</map>

View File

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="20" height="20" tilewidth="32" tileheight="32" infinite="0" nextobjectid="1">
<tileset firstgid="1" source="forest.tsx"/>
<layer name="water" width="20" height="20">
<data encoding="csv">
32,31,30,30,29,32,30,29,32,32,31,32,30,29,30,31,30,30,30,30,
31,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,31,
32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29,
32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,
31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,
31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,
29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29,
31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,
31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29,
32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29,
29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,
31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,
32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,
31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,
31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,
31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29,
31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,
29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,
30,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,32,
31,30,31,31,31,29,30,30,32,32,29,32,29,30,32,30,30,30,31,32
</data>
</layer>
<layer name="background" width="20" height="20">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,39,33,33,33,33,33,33,33,33,33,33,33,33,33,33,40,0,0,
0,39,53,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,40,0,
0,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,
0,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,
0,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,
0,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,
0,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,
0,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,
0,51,18,18,18,18,0,0,18,0,18,0,18,0,0,0,0,18,50,0,
0,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,
0,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,
0,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,
0,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,
0,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,
0,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,
0,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,
0,38,42,18,18,18,18,18,18,18,18,18,18,18,18,18,18,41,37,0,
0,0,38,36,36,36,36,36,36,36,36,36,36,36,36,36,36,37,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="movables" width="20" height="20">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,49,49,0,0,0,0,49,0,0,49,49,49,0,0,
0,0,0,0,0,49,49,0,0,49,49,49,49,0,0,49,0,49,0,0,
0,0,0,0,0,0,0,49,49,49,0,0,49,0,0,49,49,49,0,0,
0,0,0,0,0,0,49,0,0,49,0,49,49,49,49,0,49,49,0,0,
0,0,0,0,0,0,0,0,0,0,49,49,49,49,49,0,0,49,49,0,
0,0,49,0,49,49,49,49,49,49,0,0,0,0,49,0,0,49,49,0,
0,49,0,49,0,0,49,49,49,0,0,0,49,49,0,49,0,49,49,0,
0,49,49,49,0,49,0,0,49,0,49,0,49,49,0,0,0,49,49,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,49,49,49,0,49,0,0,49,0,49,0,49,49,0,0,0,49,49,0,
0,49,0,49,0,0,49,49,49,0,0,0,49,49,0,49,0,49,49,0,
0,0,49,0,49,49,49,49,49,49,0,0,0,0,49,0,0,49,49,0,
0,0,0,0,0,0,0,0,0,0,49,49,49,49,49,0,0,49,49,0,
0,0,0,0,0,0,49,0,0,49,0,49,49,49,49,0,49,49,0,0,
0,0,0,0,0,0,0,49,49,49,0,0,49,0,0,49,49,49,0,0,
0,0,0,0,0,49,49,0,0,49,49,49,49,0,0,49,0,49,0,0,
0,0,0,0,0,0,49,49,0,0,0,0,49,0,0,49,49,49,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="obstacles" width="20" height="20">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,43,0,0,0,0,0,0,0,0,0,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,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,61,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
</map>

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

View File

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="17" height="17" tilewidth="32" tileheight="32" infinite="0" nextobjectid="1">
<tileset firstgid="1" source="forest.tsx"/>
<layer name="background" width="17" height="17">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,39,18,33,33,33,33,33,33,33,33,40,0,0,0,
0,0,39,53,18,18,6,18,18,18,18,18,18,52,40,0,0,
0,0,51,18,18,18,18,18,8,10,18,7,18,18,50,0,0,
0,0,51,18,18,18,18,18,18,18,18,18,18,18,50,0,0,
0,0,38,42,18,18,18,13,18,18,18,18,18,41,37,0,0,
0,0,0,38,36,36,36,36,48,36,36,36,36,37,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
18,40,0,0,0,39,33,18,47,33,33,33,33,18,33,33,18,
18,52,33,33,33,53,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,6,18,18,13,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,9,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,8,10,18,18,18,18,
18,18,18,18,18,18,18,7,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
</data>
</layer>
<layer name="water" width="17" height="17">
<data encoding="csv">
29,31,31,31,31,30,32,31,30,31,29,30,32,32,29,29,29,
30,29,32,0,0,0,0,0,0,0,0,0,0,0,30,31,29,
29,31,0,0,0,0,0,0,0,0,0,0,0,0,0,30,31,
32,31,0,0,0,0,0,0,0,0,0,0,0,0,0,29,29,
30,30,0,0,0,0,0,0,0,0,0,0,0,0,0,29,31,
30,31,0,0,0,0,0,0,0,0,0,0,0,0,0,31,31,
29,29,30,0,0,0,0,0,0,0,0,0,0,0,31,32,31,
30,29,31,31,29,30,31,32,29,32,30,31,30,31,32,29,31,
31,31,31,30,29,30,29,31,29,32,31,30,31,30,30,32,32,
0,0,32,32,31,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="obstacles" width="17" height="17">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,46,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,43,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,43,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
35,0,0,0,0,0,0,45,0,0,0,0,0,44,0,0,34,
20,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
27,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,25
</data>
</layer>
<layer name="movables" width="17" height="17" locked="1">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="holes" width="17" height="17">
<data encoding="csv">
0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="win" width="17" height="17">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,55,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,55,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
</map>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset name="forest" tilewidth="32" tileheight="32" tilecount="75" columns="5">
<image source="map.png" width="160" height="510"/>
</tileset>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset name="map" tilewidth="32" tileheight="32" tilecount="65" columns="5">
<image source="map.png" width="160" height="416"/>
</tileset>

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="12" height="13" tilewidth="32" tileheight="32" infinite="0" nextobjectid="1">
<tileset firstgid="1" source="forest.tsx"/>
<layer name="background" width="12" height="13">
<data encoding="csv">
18,18,18,18,18,18,18,18,10,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,
18,9,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,13,18,18,18,
18,18,18,10,18,8,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,9,18,
18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,9,18,18,18,18,18,
18,13,18,18,18,18,18,18,18,13,18,18,
18,18,13,18,9,18,18,10,18,18,18,18,
18,18,18,18,18,18,18,18,18,13,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18
</data>
</layer>
<layer name="water" width="12" height="13">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="obstacles" width="12" height="13">
<data encoding="csv">
21,22,22,22,22,22,22,22,22,22,22,23,
20,0,0,0,0,0,0,0,17,0,0,24,
20,17,17,43,17,17,54,0,17,17,0,24,
20,0,17,0,0,0,17,0,0,0,0,24,
20,0,17,0,17,0,43,17,19,54,0,24,
20,0,0,0,17,0,0,0,0,0,0,24,
20,17,17,17,17,17,17,17,17,17,17,24,
20,0,0,0,17,0,0,17,0,0,0,24,
20,0,17,0,0,0,0,43,0,0,0,24,
20,0,54,17,17,17,0,17,0,0,0,24,
20,0,17,0,17,0,0,0,0,0,0,24,
20,0,17,0,17,17,0,17,0,0,0,24,
27,26,26,26,26,26,26,26,26,26,26,25
</data>
</layer>
<layer name="movables" width="12" height="13">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,49,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="holes" width="12" height="13">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="animals" width="12" height="13">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,
0,61,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,5,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="win" width="12" height="13">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,55,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,55,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
</map>

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

View File

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="16" height="16" tilewidth="32" tileheight="32" infinite="0" nextobjectid="1">
<tileset firstgid="1" source="forest.tsx"/>
<layer name="background" width="16" height="16">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,18,18,18,18,18,18,18,18,18,18,10,18,18,18,0,
0,18,6,18,41,36,42,18,18,41,36,42,18,18,7,0,
0,18,18,18,50,0,51,18,18,50,0,51,18,18,18,0,
0,18,18,18,50,0,51,18,18,50,0,51,18,18,18,0,
0,18,7,18,50,0,51,18,18,50,0,51,18,18,18,0,
0,18,18,18,50,0,51,18,18,50,0,51,18,8,18,0,
0,18,18,18,52,33,53,18,18,52,33,53,18,18,18,0,
0,18,18,18,18,18,6,10,18,18,18,9,18,18,18,0,
0,18,41,36,36,42,18,18,18,18,41,36,36,42,18,0,
0,18,50,0,0,38,42,18,18,41,37,0,0,51,18,0,
0,18,52,40,0,0,38,36,36,37,0,0,39,53,18,0,
0,18,18,52,40,0,0,0,0,0,0,39,53,18,18,0,
0,18,18,18,52,33,33,33,33,33,33,53,18,18,18,0,
0,18,8,18,18,18,18,18,18,18,18,18,18,18,18,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="water" width="16" height="16">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,29,0,0,0,0,32,0,0,0,0,0,
0,0,0,0,0,32,0,0,0,0,29,0,0,0,0,0,
0,0,0,0,0,32,0,0,0,0,32,0,0,0,0,0,
0,0,0,0,0,29,0,0,0,0,31,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,32,30,0,0,0,0,0,0,30,30,0,0,0,
0,0,0,0,31,30,0,0,0,0,31,29,0,0,0,0,
0,0,0,0,0,29,32,32,32,32,29,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="obstacles" width="16" height="16">
<data encoding="csv">
21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,17,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,44,0,0,0,0,0,0,43,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
27,26,26,26,26,26,26,26,26,26,26,26,26,26,26,25
</data>
</layer>
<layer name="movables" width="16" height="16">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="win" width="16" height="16">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,55,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,55,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
</map>

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

View File

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="20" height="20" tilewidth="32" tileheight="32" infinite="0" nextobjectid="1">
<tileset firstgid="1" source="forest.tsx"/>
<layer name="background" width="20" height="20" locked="1">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,39,33,33,33,33,33,40,0,0,39,33,33,33,33,40,0,0,0,
0,0,51,18,18,18,18,18,52,33,33,53,18,18,18,18,52,40,0,0,
0,0,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,0,
0,0,38,42,18,18,18,18,18,18,18,18,18,18,18,18,18,50,0,0,
0,0,0,38,42,18,18,18,18,18,18,18,18,18,18,18,18,50,0,0,
0,0,0,0,51,18,18,18,18,18,18,18,18,18,18,18,18,50,0,0,
0,0,0,0,51,18,18,18,18,18,18,18,18,18,18,18,18,50,0,0,
0,0,0,0,38,42,18,18,18,18,18,18,18,18,18,18,18,50,0,0,
0,0,0,0,0,38,42,18,18,18,18,18,18,18,18,18,18,50,0,0,
0,0,0,0,0,0,51,18,18,18,18,18,18,18,18,18,18,50,0,0,
0,0,0,0,0,39,53,18,18,18,18,18,18,18,18,18,18,50,0,0,
0,0,0,0,0,51,18,18,18,18,18,18,18,18,18,18,18,50,0,0,
0,0,0,0,0,38,42,18,18,18,18,18,18,18,18,41,36,37,0,0,
0,0,0,0,0,0,51,18,18,18,18,18,18,18,41,37,0,0,0,0,
0,0,0,0,0,0,38,36,36,36,42,18,18,41,37,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,38,36,36,37,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="obstacles" width="20" height="20">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,46,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,43,0,0,43,0,0,0,0,0,
0,0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0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="water" width="20" height="20" locked="1">
<data encoding="csv">
30,31,29,29,31,31,29,32,29,30,31,32,29,30,32,30,31,29,32,30,
29,30,30,29,32,32,30,30,31,32,31,32,29,31,32,29,30,31,29,31,
29,32,0,0,0,0,0,0,0,32,32,0,0,0,0,0,0,29,31,29,
31,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,30,
29,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,30,
29,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,31,
31,32,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,32,
32,32,31,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,32,
31,31,32,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,29,
31,31,31,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,31,
29,30,30,31,30,0,0,0,0,0,0,0,0,0,0,0,0,0,31,29,
29,32,29,29,29,31,0,0,0,0,0,0,0,0,0,0,0,0,29,31,
32,30,32,32,29,0,0,0,0,0,0,0,0,0,0,0,0,0,29,29,
30,29,32,31,31,0,0,0,0,0,0,0,0,0,0,0,0,0,31,32,
29,29,30,31,29,0,0,0,0,0,0,0,0,0,0,0,0,0,32,32,
29,31,32,29,32,32,0,0,0,0,0,0,0,0,0,0,31,31,31,32,
32,29,32,30,29,31,0,0,0,0,0,0,0,0,0,30,30,30,29,30,
32,30,32,30,30,31,29,29,30,30,0,0,0,0,30,30,31,32,30,32,
32,31,32,32,31,31,29,32,32,29,29,30,29,31,32,31,31,31,30,31,
30,32,32,29,30,31,30,29,29,30,29,32,32,32,31,29,31,29,32,30
</data>
</layer>
</map>

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="25" height="25" tilewidth="32" tileheight="32" infinite="0" nextobjectid="1">
<tileset firstgid="1" source="forest.tsx"/>
<layer name="background" width="25" height="25">
<data encoding="csv">
32,30,31,32,31,32,32,31,32,29,32,32,32,30,32,29,30,31,29,30,31,31,31,30,31,
31,29,29,30,31,31,31,32,29,30,29,29,32,31,30,29,29,30,31,31,29,32,32,32,30,
29,32,29,30,30,32,29,30,31,32,31,29,31,29,32,32,32,29,32,30,30,32,30,32,30,
32,31,29,39,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,40,31,31,32,
30,29,39,53,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,52,40,32,32,
30,30,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,29,31,
31,29,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,32,29,
29,30,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,32,32,
32,32,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,32,32,
30,31,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,32,31,
29,29,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,32,31,
3,30,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,32,32,
3,32,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,32,29,
3,30,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,30,31,
3,29,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,30,32,
3,29,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,32,32,
3,32,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,30,32,
3,31,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,32,29,
3,29,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,30,31,
29,31,51,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,50,31,29,
29,29,38,42,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,41,37,32,30,
31,29,30,38,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,37,31,29,30,
30,32,31,29,32,32,29,31,32,29,30,30,30,29,31,31,29,30,31,29,29,29,32,32,30,
29,31,32,31,30,32,29,31,32,31,29,30,32,29,32,29,29,30,31,32,32,29,32,29,29,
31,31,29,30,31,32,29,32,32,31,32,31,29,32,32,31,32,31,29,32,32,32,30,29,30
</data>
</layer>
</map>

View File

@ -0,0 +1,174 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="18" height="20" tilewidth="32" tileheight="32" infinite="0" nextobjectid="1">
<tileset firstgid="1" name="forest" tilewidth="32" tileheight="32" tilecount="65" columns="5">
<image source="map.png" width="160" height="416"/>
</tileset>
<layer name="background" width="18" height="20">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,18,18,18,0,0,0,0,18,18,18,18,18,0,18,18,0,0,
0,18,0,18,18,18,18,0,18,0,18,18,18,18,18,18,18,0,
0,18,18,0,0,0,18,0,0,0,18,0,18,18,0,18,18,0,
0,0,18,0,0,0,18,18,18,18,18,0,18,18,18,18,18,0,
0,18,18,0,0,0,18,0,0,0,0,0,18,0,0,0,18,0,
0,18,18,18,18,18,18,18,18,18,18,18,18,0,18,18,18,0,
0,18,18,0,18,0,18,0,0,0,18,18,18,0,18,0,0,0,
0,18,18,0,18,18,18,0,0,0,18,18,18,0,18,18,18,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,
0,0,0,0,18,18,18,0,0,0,18,18,18,0,18,18,18,18,
0,0,0,0,18,0,18,0,0,0,18,18,18,0,18,0,0,0,
0,18,18,18,18,18,18,18,18,18,18,18,18,0,18,18,18,0,
0,18,18,0,0,0,18,0,0,0,0,0,18,0,0,0,18,0,
0,0,18,0,0,0,18,18,18,18,18,0,18,18,18,18,18,0,
0,18,18,0,0,0,18,0,0,0,18,0,18,18,18,18,18,0,
0,18,0,18,18,18,18,0,18,0,18,18,18,18,18,18,18,0,
0,18,18,18,0,0,0,0,18,18,18,18,18,0,18,18,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="water" width="18" height="20">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="obstacles" width="18" height="20">
<data encoding="csv">
21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,
20,0,0,0,17,17,17,16,0,0,0,0,0,16,0,0,16,24,
20,0,17,0,0,0,0,17,0,17,0,17,0,0,0,0,0,24,
20,0,0,17,17,16,0,17,17,17,0,17,0,0,16,0,0,24,
20,17,0,17,17,17,0,0,0,0,0,17,0,0,0,0,0,24,
20,0,0,17,17,17,0,17,17,17,17,17,0,19,19,17,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,24,
20,0,0,17,0,17,0,17,17,17,0,0,0,16,0,17,17,24,
20,0,0,17,0,0,0,17,17,17,0,0,0,17,0,0,0,24,
20,19,19,17,17,16,17,17,17,17,17,17,17,17,17,17,0,24,
20,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,0,24,
20,49,49,16,0,0,0,17,17,16,0,0,0,16,0,0,0,24,
20,49,49,16,0,16,0,17,16,17,0,0,0,17,0,17,17,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,24,
20,0,0,17,19,54,0,17,17,17,17,17,0,17,17,54,0,24,
20,54,0,17,16,17,0,0,0,0,0,17,0,0,0,0,0,24,
20,0,0,17,19,17,0,17,17,17,0,16,0,0,16,0,0,24,
20,0,17,0,0,0,0,17,17,17,0,0,0,0,0,0,0,24,
20,0,0,0,17,17,17,17,16,0,0,0,0,16,0,0,16,24,
27,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,25
</data>
</layer>
<layer name="movables" width="18" height="20">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="win" width="18" height="20">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
</map>

View File

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="20" height="11" tilewidth="32" tileheight="32" infinite="0" nextobjectid="1">
<tileset firstgid="1" source="forest.tsx"/>
<layer name="background" width="20" height="11">
<data encoding="csv">
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,9,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,41,36,42,18,18,18,13,18,18,18,18,18,18,18,18,18,18,18,
18,18,50,18,51,8,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,9,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
</data>
</layer>
<layer name="water" width="20" height="11">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,29,0,0,0,0,0,0,0,29,0,0,
0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,29,29,29,0,0,0,0,0,0,0,0,0,
0,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,29,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="obstacles" width="20" height="11">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,
20,0,0,0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,24,
20,0,0,0,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,24,
20,17,17,45,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,24,
20,0,0,0,0,0,0,19,0,0,0,19,0,0,0,0,0,0,0,24,
20,0,0,17,0,0,0,0,0,0,0,0,0,19,19,19,19,0,0,24,
27,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,25,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="movables" width="20" height="11">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="holes" width="20" height="11">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
</map>

View File

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="20" height="20" tilewidth="32" tileheight="32" infinite="0" nextobjectid="1">
<tileset firstgid="1" source="forest.tsx"/>
<layer name="background" width="20" height="20">
<data encoding="csv">
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,18,18,18,18,
18,18,18,6,18,18,9,18,18,18,18,9,18,18,18,13,18,18,18,18,
18,18,18,18,13,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,10,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,7,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,10,18,18,18,18,
18,18,18,18,18,7,18,18,18,9,18,18,18,18,18,18,18,7,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,9,18,18,18,18,18,
18,18,18,18,18,18,18,10,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,10,18,18,18,18,18,18,
18,18,18,18,6,18,18,18,18,18,6,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,13,18,18,18,18,18,18,18,18,18,13,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,9,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,10,18,18,18,18,18,7,18,18,6,18,
18,18,7,18,18,13,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
</data>
</layer>
<layer name="water" width="20" height="20">
<data encoding="csv">
31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="obstacles" width="20" height="20">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
35,0,0,0,0,0,0,0,0,46,0,0,0,46,0,0,44,45,45,34,
20,19,0,0,0,0,0,0,0,0,43,0,0,0,0,0,0,16,16,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,16,0,0,0,0,0,0,19,19,19,0,0,0,0,0,0,0,0,24,
20,16,0,0,0,0,0,19,19,19,19,0,0,0,19,0,0,0,0,24,
20,17,17,0,0,0,0,19,19,0,19,0,0,0,17,17,0,0,0,24,
20,17,0,0,0,0,0,0,0,0,0,0,54,0,0,0,0,0,17,24,
20,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,17,24,
20,19,19,0,0,0,0,17,17,0,0,0,0,0,0,0,0,0,17,24,
20,19,19,19,0,0,0,17,17,0,0,0,0,0,17,19,17,0,0,24,
20,19,0,0,0,0,0,0,0,0,0,0,0,0,17,19,17,0,0,24,
20,0,0,19,19,19,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,19,19,19,16,0,0,0,19,17,0,0,0,0,0,0,0,24,
20,0,0,19,19,19,16,0,0,16,17,19,16,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,0,24,
27,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,25
</data>
</layer>
<layer name="movables" width="20" height="20">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,49,0,49,49,0,0,49,49,0,0,0,
0,0,0,0,0,0,0,0,0,49,0,0,0,0,49,49,0,0,0,0,
0,0,0,0,49,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,49,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,49,0,0,0,0,0,49,0,0,0,0,0,0,0,0,
0,0,0,0,49,49,0,0,0,0,49,49,0,0,49,0,49,0,0,0,
0,0,0,0,0,49,49,0,0,0,0,49,0,0,49,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,49,49,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,0,0,
0,0,0,0,0,0,49,49,0,0,0,0,49,49,0,0,0,0,0,0,
0,0,0,0,0,0,0,49,0,0,0,0,49,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="holes" width="20" height="20">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0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0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
</map>

Binary file not shown.

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="12" height="13" tilewidth="32" tileheight="32" infinite="0" nextobjectid="1">
<tileset firstgid="1" source="forest.tsx"/>
<layer name="background" width="12" height="13">
<data encoding="csv">
18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,13,18,18,18,18,18,
18,9,18,18,18,18,18,18,10,18,18,18,
18,18,18,8,18,18,18,18,18,18,18,18,
18,18,13,18,18,9,18,18,18,10,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,10,18,18,18,18,18,18,
18,18,8,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,
18,18,13,18,18,18,18,10,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,9,18,
18,18,18,18,18,18,18,18,18,18,18,18
</data>
</layer>
<layer name="water" width="12" height="13">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="obstacles" width="12" height="13">
<data encoding="csv">
21,22,22,22,22,22,22,22,22,22,22,23,
20,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,24,
20,17,17,17,17,17,17,17,17,17,17,24,
20,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,24,
20,0,0,0,0,0,0,0,0,0,0,24,
27,26,26,26,26,26,26,26,26,26,26,25
</data>
</layer>
<layer name="movables" width="12" height="13">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,49,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="holes" width="12" height="13">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="animals" width="12" height="13">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,
0,12,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,2,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="win" width="12" height="13">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,55,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,55,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
</map>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,15 @@
#!/bin/bash
if ! [ -x "$(which go-bindata)" ]; then
echo ''
echo 'Error: go-bindata is not installed.' >&2
echo 'Run "go get -u github.com/jteeuwen/go-bindata/..."' >&2
echo '(the "..." are important!)'
echo ''
echo 'Do not forget to add $GOPATH/bin to your $PATH :)'
echo ''
exit 1
fi
go-bindata -pkg assetsManager -o assets_manager/manager.go assets

View File

@ -0,0 +1,13 @@
#!/bin/bash
DESTINATION="/tmp/ASharedJourney"
make build_assets
go build main.go
chmod +x main
mkdir -p $DESTINATION
cp main $DESTINATION/ASharedJourney
cp -r ./assets $DESTINATION/
echo "Built!"
echo "You may now send" $DESTINATION "to your beautiful friends!"

View File

@ -0,0 +1,14 @@
#!/bin/bash
SOURCE="./build/Template.app"
DESTINATION="./build/ASharedJourney.app"
make build_assets
go build main.go
chmod +x main
rm -rf $DESTINATION
cp -r $SOURCE $DESTINATION
cp main $DESTINATION/Contents/MacOS/ASharedJourney
echo "Built!"
echo "You may now send" $DESTINATION "to your beautiful friends!"

View File

@ -0,0 +1,3 @@
#!bin/bash
go -d .

View File

@ -0,0 +1,71 @@
package main
import (
"time"
"github.com/gandrin/ASharedJourney/supervisor"
"github.com/faiface/pixel"
"github.com/faiface/pixel/pixelgl"
"github.com/gandrin/ASharedJourney/tiles"
"golang.org/x/image/colornames"
"github.com/gandrin/ASharedJourney/mechanics"
"github.com/gandrin/ASharedJourney/menu"
"github.com/gandrin/ASharedJourney/music"
"github.com/gandrin/ASharedJourney/shared"
)
const frameRate = 60
func run() {
cfg := pixelgl.WindowConfig{
Title: "A Shared Journey",
Bounds: pixel.R(0, 0, 800, 800),
VSync: true,
}
win, err := pixelgl.NewWindow(cfg)
if err != nil {
panic(err)
}
shared.Win = win
menu.Menu(menu.MainMenuImage, " Loading ...",pixel.V(200,150), false, music.SOUND_NONE)
music.Music.Start()
<-music.GameMusicLoader
menu.Menu(menu.MainMenuImage, "Press ENTER to PLAY ...", pixel.V(180,150),true, music.SOUND_EFFECT_START_GAME)
menu.Menu(menu.RulesMenuImage, "Press ENTER to START", pixel.V(180,150),true, music.SOUND_EFFECT_START_GAME)
world := tiles.NextLevel()
fps := time.Tick(time.Second / frameRate)
gameEventsChannel := supervisor.Start()
newWorldChannel := mechanics.Start(gameEventsChannel, world)
for !win.Closed() {
win.Clear(colornames.Black)
supervisor.Sup.Play()
mechanics.Mecha.Play()
upToDateWorld := <-newWorldChannel
tiles.DrawMap(upToDateWorld.BackgroundTiles)
tiles.DrawMap(upToDateWorld.Obstacles)
tiles.DrawMap(upToDateWorld.WinStars)
tiles.DrawMap(upToDateWorld.Water)
tiles.DrawMap(upToDateWorld.Movables)
tiles.DrawMap(upToDateWorld.Players)
tiles.DrawMap(upToDateWorld.Holes)
win.Update()
<-fps
}
}
func main() {
pixelgl.Run(run)
}

View File

@ -0,0 +1,135 @@
//defines the behavior of the game once we have defined the desired direction
package mechanics
import (
"fmt"
"log"
"time"
"github.com/gandrin/ASharedJourney/shared"
"github.com/gandrin/ASharedJourney/supervisor"
"github.com/gandrin/ASharedJourney/tiles"
"github.com/gandrin/ASharedJourney/menu"
"github.com/faiface/pixel"
"github.com/gandrin/ASharedJourney/music"
"image/color"
)
type Mechanics struct {
world tiles.World
//communication channel to animator
toAnimate chan *tiles.World
//communication channel from supervisor
gameEventChannel chan *supervisor.GameEvent
}
//game mechanics
var Mecha *Mechanics
//initialise the game mechanics structure
func Start(
gameEventChannel chan *supervisor.GameEvent,
baseWorld tiles.World,
) chan *tiles.World {
Mecha = new(Mechanics)
//build return channel to animator
var toAnim chan *tiles.World
toAnim = make(chan *tiles.World, 1)
Mecha.toAnimate = toAnim
Mecha.gameEventChannel = gameEventChannel
Mecha.world = baseWorld
//log.Print("Mecanics loaded")
return Mecha.toAnimate
}
//synchronisation objects
func (m *Mechanics) muxChannel() *supervisor.GameEvent {
select {
case nextGameEvent, ok := <-m.gameEventChannel:
if !ok {
fmt.Println("Channel closed!")
log.Fatal()
}
return nextGameEvent
default:
nextEvent := supervisor.Event("NONE")
nextGameEvent := new(supervisor.GameEvent)
nextGameEvent.PlayerDirections = new(supervisor.PlayerDirections)
nextGameEvent.PlayerDirections.Player1.X = 0
nextGameEvent.PlayerDirections.Player1.Y = 0
nextGameEvent.PlayerDirections.Player2.X = 0
nextGameEvent.PlayerDirections.Player2.Y = 0
nextGameEvent.Event = &nextEvent
fmt.Println("No player direction mecha is faster than supervisor ")
return nextGameEvent
//set motion to default values
}
}
//call mechanics
func (m *Mechanics) Play() {
for play := true; play; play = shared.Continue() {
//delay to not call and overload cpu
time.Sleep(shared.MechanicsRefreshDelayMs * time.Millisecond)
gameEvent := m.muxChannel()
m.toAnimate <- m.Move(gameEvent.PlayerDirections)
m.handleGameEvent(gameEvent.Event)
}
}
func (m *Mechanics) handleGameEvent(event *supervisor.Event) {
switch *event {
case "RESTART":
m.world = tiles.RestartLevel()
menu.Menu(menu.WinLevelMenuImage, "Reloading level ...", pixel.V(180, 150), true, music.SOUND_EFFECT_START_GAME)
shared.Win.Clear(color.Black)
break
case "KEY0":
tiles.SetNexLevel(0)
m.world = tiles.NextLevel()
break
case "KEY1":
tiles.SetNexLevel(1)
m.world = tiles.NextLevel()
break
case "KEY2":
tiles.SetNexLevel(2)
m.world = tiles.NextLevel()
break
case "KEY3":
tiles.SetNexLevel(3)
m.world = tiles.NextLevel()
break
case "KEY4":
tiles.SetNexLevel(4)
m.world = tiles.NextLevel()
break
case "KEY5":
tiles.SetNexLevel(5)
m.world = tiles.NextLevel()
break
case "KEY6":
tiles.SetNexLevel(6)
m.world = tiles.NextLevel()
break
case "KEY7":
tiles.SetNexLevel(7)
m.world = tiles.NextLevel()
break
case "KEY8":
tiles.SetNexLevel(8)
m.world = tiles.NextLevel()
break
case "KEY9":
tiles.SetNexLevel(9)
m.world = tiles.NextLevel()
break
default:
//No event
}
}

View File

@ -0,0 +1,155 @@
package mechanics
import (
"reflect"
"github.com/faiface/pixel"
"github.com/gandrin/ASharedJourney/menu"
"github.com/gandrin/ASharedJourney/music"
"github.com/gandrin/ASharedJourney/supervisor"
"github.com/gandrin/ASharedJourney/tiles"
)
//move function receives as input the data from a player direction channel
func (m *Mechanics) Move(playDir *supervisor.PlayerDirections) *tiles.World {
if m.world.Players[0].HasWon && m.world.Players[1].HasWon &&
!reflect.DeepEqual(m.world.Players[0].WinningPosition, m.world.Players[1].WinningPosition) {
music.Music.PlayEffect(music.SOUND_EFFECT_WIN_GAME)
m.world = tiles.NextLevel()
}
if m.world.Players[0].InTheWater || m.world.Players[1].InTheWater {
menu.Menu(menu.DrownedGameImage, "Oops ....", pixel.V(300, 150), true, music.SOUND_EFFECT_LOSE_GAME)
m.world = tiles.RestartLevel()
}
if playDir.Player1.X != 0 || playDir.Player1.Y != 0 {
// "Zzzz" tile...
m.world.Holes[len(m.world.Holes)-1].Position.X = -100
m.world.Holes[len(m.world.Holes)-1].Position.Y = -100
m.movePlayer(&m.world.Players[0], playDir.Player1.Next)
m.movePlayer(&m.world.Players[1], playDir.Player2.Next)
}
return m.copyToNewWorld()
}
func (m *Mechanics) movePlayer(player *tiles.SpriteWithPosition, getNextPosition func(pixel.Vec) pixel.Vec) {
var canPlayerMove = true
nextPlayerPosition := getNextPosition(player.Position)
/// In the hole
if player.InTheHole {
player.InTheHole = false
m.world.Holes[len(m.world.Holes)-1].Position = player.Position
return
}
// Obstacles
for _, obstacle := range m.world.Obstacles {
if obstacle.Position.X == nextPlayerPosition.X && obstacle.Position.Y == nextPlayerPosition.Y {
canPlayerMove = false
}
}
// Movables
if canPlayerMove {
for n, mov := range m.world.Movables {
if mov.Position.X == nextPlayerPosition.X && mov.Position.Y == nextPlayerPosition.Y {
// There's a movable in that position
movableNextPosition := getNextPosition(nextPlayerPosition)
for _, playerTile := range m.world.Players {
if playerTile.Position.X == movableNextPosition.X &&
playerTile.Position.Y == movableNextPosition.Y {
canPlayerMove = false
}
}
for _, obstacleTile := range m.world.Obstacles {
if obstacleTile.Position.X == movableNextPosition.X &&
obstacleTile.Position.Y == movableNextPosition.Y {
canPlayerMove = false
}
}
for _, movableTile := range m.world.Movables {
if movableTile.Position.X == movableNextPosition.X &&
movableTile.Position.Y == movableNextPosition.Y {
canPlayerMove = false
}
}
for _, winStarTile := range m.world.WinStars {
if winStarTile.Position.X == movableNextPosition.X && winStarTile.Position.Y == movableNextPosition.Y {
player.HasWon = true
player.WinningPosition = pixel.V(winStarTile.Position.X, winStarTile.Position.Y)
}
}
if canPlayerMove {
m.world.Movables[n].Position = movableNextPosition
}
for h, holeTile := range m.world.Holes {
if holeTile.Position.X == movableNextPosition.X && holeTile.Position.Y == movableNextPosition.Y {
// remove both obj (hole and movable)
m.world.Movables[n].Position.X = -100
m.world.Holes[h].Position.X = -100
music.Music.PlayEffect(music.SOUND_EFFECT_SNORE)
}
}
}
}
}
if canPlayerMove {
player.Position = nextPlayerPosition
// Water
for _, waterTile := range m.world.Water {
if waterTile.Position.X == nextPlayerPosition.X && waterTile.Position.Y == nextPlayerPosition.Y {
player.InTheWater = true
music.Music.PlayEffect(music.SOUND_EFFECT_WATER)
}
}
// Hole
for _, holeTile := range m.world.Holes {
if holeTile.Position.X == nextPlayerPosition.X && holeTile.Position.Y == nextPlayerPosition.Y {
player.InTheHole = true
m.world.Holes[len(m.world.Holes)-1].Position = nextPlayerPosition
music.Music.PlayEffect(music.SOUND_EFFECT_SNORE)
}
}
player.HasWon = false
// Winning rule
for _, winStarTile := range m.world.WinStars {
if winStarTile.Position.X == nextPlayerPosition.X && winStarTile.Position.Y == nextPlayerPosition.Y {
player.HasWon = true
player.WinningPosition = pixel.V(winStarTile.Position.X, winStarTile.Position.Y)
}
}
}
}
func (m *Mechanics) copyToNewWorld() *tiles.World {
var newWorld = new(tiles.World)
//copy player locations
//copy world
newWorld.BackgroundTiles = make([]tiles.SpriteWithPosition, len(m.world.BackgroundTiles))
newWorld.Movables = make([]tiles.SpriteWithPosition, len(m.world.Movables))
newWorld.Players = make([]tiles.SpriteWithPosition, len(m.world.Players))
newWorld.Obstacles = make([]tiles.SpriteWithPosition, len(m.world.Obstacles))
newWorld.Water = make([]tiles.SpriteWithPosition, len(m.world.Water))
newWorld.Holes = make([]tiles.SpriteWithPosition, len(m.world.Holes))
newWorld.WinStars = make([]tiles.SpriteWithPosition, len(m.world.WinStars))
copy(newWorld.BackgroundTiles, m.world.BackgroundTiles)
copy(newWorld.Movables, m.world.Movables)
copy(newWorld.Players, m.world.Players)
copy(newWorld.WinStars, m.world.WinStars)
copy(newWorld.Water, m.world.Water)
copy(newWorld.Obstacles, m.world.Obstacles)
copy(newWorld.Holes, m.world.Holes)
return newWorld
}

View File

@ -0,0 +1,10 @@
package mechanics
type PlayerType string
const (
FOX PlayerType = "fox"
MOUSE PlayerType = "mouse"
BEE PlayerType = "bee"
ELEPHANT PlayerType = "elephant"
)

View File

@ -0,0 +1,77 @@
package menu
import (
"bytes"
"fmt"
"image"
"log"
"time"
"github.com/gandrin/ASharedJourney/assets_manager"
"github.com/faiface/pixel"
"github.com/faiface/pixel/pixelgl"
"github.com/faiface/pixel/text"
"github.com/gandrin/ASharedJourney/music"
"github.com/gandrin/ASharedJourney/shared"
"golang.org/x/image/colornames"
"golang.org/x/image/font/basicfont"
)
//level image names
const MainMenuImage = "menu.png"
const WinLevelMenuImage = "win.png"
const FinishedGameImage = "end.png"
const DrownedGameImage = "oops.png"
const RulesMenuImage = "splashScreen.png"
//draw menu to screen while player while player hasn't pressed enter
func Menu(pictureName string, menuText string, positionText pixel.Vec, blocking bool, exitSoundEffect music.SoundEffect) {
basicAtlas := text.NewAtlas(basicfont.Face7x13, text.ASCII)
basicTxt := text.New(positionText, basicAtlas)
basicTxt.Color = colornames.White
fmt.Fprintln(basicTxt, menuText)
//get picture
pic, err := loadPicture(pictureName)
if err != nil {
log.Fatal(err)
}
sprite := pixel.NewSprite(pic, pic.Bounds())
mat := pixel.IM
mat = mat.Moved(shared.Win.Bounds().Center())
imageMatrix := mat.ScaledXY(shared.Win.Bounds().Center(), pixel.V(0.7, 0.7))
//clear background
shared.Win.Clear(colornames.Black)
sprite.Draw(shared.Win, imageMatrix)
//text
basicTxt.Draw(shared.Win, pixel.IM.Scaled(basicTxt.Orig, 3))
shared.Win.Update()
//menu loop
if blocking {
for !shared.Win.JustPressed(pixelgl.KeyEnter) && !shared.Win.Closed() {
time.Sleep(50 * time.Millisecond)
shared.Win.Update()
}
music.Music.PlayEffect(exitSoundEffect)
}
}
func loadPicture(path string) (pixel.Picture, error) {
byteImage, err := assetsManager.Asset("assets/" + path)
if err != nil {
return nil, err
}
img, _, err := image.Decode(bytes.NewReader(byteImage))
if err != nil {
return nil, err
}
return pixel.PictureDataFromImage(img), nil
}

View File

@ -0,0 +1,67 @@
package music
import (
"github.com/faiface/beep"
"github.com/faiface/beep/speaker"
)
type SoundEffect string
const (
SOUND_EFFECT_START_GAME SoundEffect = "MenuEffect.wav"
SOUND_EFFECT_WIN_GAME SoundEffect = "win2.mp3"
SOUND_EFFECT_WIN_FINAL_GAME SoundEffect = "win.mp3"
SOUND_EFFECT_SNORE SoundEffect = "snoring.mp3"
SOUND_EFFECT_LOSE_GAME SoundEffect = "lose2.mp3"
SOUND_EFFECT_WATER SoundEffect = "Acid_Bubble.mp3"
SOUND_NONE SoundEffect = "Acid_Bubble.mp3"
)
func (m *musicStreamers) PlayEffect(effectType SoundEffect) {
es, ok := m.gameEffects[effectType]
if ok {
speaker.Lock()
m.streamControl.Paused = true
speaker.Unlock()
//log.Print("Creating new stream entry")
LoopAudio := beep.Loop(1, es.Streamer(0, es.Len()))
speaker.Play(beep.Seq(LoopAudio)) //effect exists -> play
//log.Print("finished playing effect ")
speaker.Lock()
m.streamControl.Paused = false
speaker.Unlock()
//log.Print("stream of sound finished")
}
}
func (m *musicStreamers) loadEffects() {
m.gameEffects = make(map[SoundEffect]*beep.Buffer, 0)
//make new buffers and add to buffer
stream1, format1 := getStream(string(SOUND_EFFECT_START_GAME))
m.gameEffects[SOUND_EFFECT_START_GAME] = beep.NewBuffer(format1)
m.gameEffects[SOUND_EFFECT_START_GAME].Append(stream1)
stream2, format2 := getStream(string(SOUND_EFFECT_WIN_GAME))
m.gameEffects[SOUND_EFFECT_WIN_GAME] = beep.NewBuffer(format2)
m.gameEffects[SOUND_EFFECT_WIN_GAME].Append(stream2)
stream3, format3 := getStream(string(SOUND_EFFECT_WATER))
m.gameEffects[SOUND_EFFECT_WATER] = beep.NewBuffer(format3)
m.gameEffects[SOUND_EFFECT_WATER].Append(stream3)
stream4, format4 := getStream(string(SOUND_EFFECT_WIN_FINAL_GAME))
m.gameEffects[SOUND_EFFECT_WIN_FINAL_GAME] = beep.NewBuffer(format4)
m.gameEffects[SOUND_EFFECT_WIN_FINAL_GAME].Append(stream4)
stream5, format5 := getStream(string(SOUND_EFFECT_SNORE))
m.gameEffects[SOUND_EFFECT_SNORE] = beep.NewBuffer(format5)
m.gameEffects[SOUND_EFFECT_SNORE].Append(stream5)
}

View File

@ -0,0 +1,112 @@
package music
import (
"bytes"
"io"
"log"
"path/filepath"
"time"
"github.com/gandrin/ASharedJourney/assets_manager"
"github.com/faiface/beep"
"github.com/faiface/beep/mp3"
"github.com/faiface/beep/speaker"
"github.com/faiface/beep/wav"
)
type nopCloser struct {
io.Reader
}
func (nopCloser) Close() error { return nil }
//global synchronization channel
var GameMusicLoader chan int
func init() {
GameMusicLoader = make(chan int, 0)
}
const musicThemeFileName = "MainThemeMiroir.mp3"
type musicStreamers struct {
//list of loaded musics ( streamer )
mainThemeStreamer beep.Streamer
backgroundMusic *beep.Buffer
gameEffects map[SoundEffect]*beep.Buffer
streamControl beep.Ctrl
}
var Music musicStreamers
//called when package is called into scope the first time
func (m *musicStreamers) Start() {
var format beep.Format
go func() {
format = m.loadMainTheme()
err := speaker.Init(format.SampleRate, format.SampleRate.N(time.Second/10))
if err != nil {
log.Fatal(err)
}
m.streamControl.Streamer = m.mainThemeStreamer
m.playMainTheme()
}()
go m.loadEffects()
log.Print("Music loaded")
}
func (m *musicStreamers) loadMainTheme() beep.Format {
var format beep.Format
m.mainThemeStreamer, format = getStream(musicThemeFileName)
m.backgroundMusic = beep.NewBuffer(format)
m.backgroundMusic.Append(m.mainThemeStreamer)
m.streamControl.Paused = false
return format
}
func (m *musicStreamers) playMainTheme() {
log.Print("Starting music")
var streamer = m.backgroundMusic.Streamer(0, m.backgroundMusic.Len())
LoopAudio := beep.Loop(5, streamer)
go speaker.Play(beep.Seq(LoopAudio))
log.Print("Music finished")
GameMusicLoader <- 1
}
func getFileName(fileName string) string {
return "assets/" + fileName
}
func getStream(filename string) (beep.StreamCloser, beep.Format) {
absFilePath := getFileName(filename)
var newStreamer beep.StreamCloser
var format beep.Format
var err error
byteSound, err := assetsManager.Asset(absFilePath)
if err != nil {
log.Fatal("Music file ", err)
}
ext := filepath.Ext(filename)
nopCloser := nopCloser{bytes.NewReader(byteSound)}
if ext == ".mp3" {
newStreamer, format, err = mp3.Decode(nopCloser)
} else if ext == ".wav" {
newStreamer, format, err = wav.Decode(nopCloser)
}
if err != nil {
log.Fatal("Decorer error on file ", absFilePath, " ", err)
}
return newStreamer, format
}

View File

@ -0,0 +1,6 @@
package shared
const KeyPressedDelayMs = 10
const FrameRefreshDelayMs = 50
const MechanicsRefreshDelayMs = 20

View File

@ -0,0 +1,38 @@
package shared
//struct that holds all data about the current game state
type gameState struct {
//is the game to keep on playing ?
Playing bool
Level int //todo use this values as game state
NbAction int
Score int
}
var gState gameState
func StartGame(NewLevel int ){
gState.Playing = true
gState.Score = 0
gState.Level = NewLevel
gState.NbAction = 0
}
func GetCurrentLevel() int{
return gState.Level
}
func IncrementLevel() int{
//todo increment level value here
return 0
}
func StopGame(){
gState.Playing = false
}
func AddAction() {
gState.NbAction +=1
//log.Print("Actions ",gState.NbAction)
}
func Continue() bool {
return gState.Playing
}

View File

@ -0,0 +1,7 @@
//shared objects ( global )
package shared
import "github.com/faiface/pixel/pixelgl"
var Win *pixelgl.Window

View File

@ -0,0 +1,30 @@
package supervisor
import (
"github.com/faiface/pixel"
"github.com/gandrin/ASharedJourney/tiles"
)
//call motion
func Move() *PlayerDirections {
newDir := new(PlayerDirections)
newDir.Player1 = key()
newDir.mirror()
return newDir
}
//mirror motion of player 1 onto direction of player 2
func (dir *PlayerDirections) mirror() {
dir.Player2.X = dir.Player1.X
if dir.Player1.Y != 0 {
dir.Player2.Y = dir.Player1.Y * (-1)
}
}
//calculate next position based on direction
func (dir Direction) Next(currentPos pixel.Vec) pixel.Vec {
currentPos.X += float64(dir.X * tiles.TileSize)
currentPos.Y += float64(dir.Y * tiles.TileSize)
//log.Printf("Calculated next position ", currentPos)
return currentPos
}

View File

@ -0,0 +1,42 @@
package supervisor
import (
"log"
"github.com/faiface/pixel/pixelgl"
"github.com/gandrin/ASharedJourney/shared"
)
type Event string
//get the key values that was pressed
func catchEvent() *Event {
var event = new(Event)
//check if key was just pressed
if shared.Win.Pressed(pixelgl.KeyR) {
*event = "RESTART"
} else if shared.Win.Pressed(pixelgl.Key0) {
*event = "KEY0"
} else if shared.Win.Pressed(pixelgl.Key1) {
log.Printf("1")
*event = "KEY1"
} else if shared.Win.Pressed(pixelgl.Key2) {
*event = "KEY2"
} else if shared.Win.Pressed(pixelgl.Key3) {
*event = "KEY3"
} else if shared.Win.Pressed(pixelgl.Key4) {
*event = "KEY4"
} else if shared.Win.Pressed(pixelgl.Key5) {
*event = "KEY5"
} else if shared.Win.Pressed(pixelgl.Key6) {
*event = "KEY6"
} else if shared.Win.Pressed(pixelgl.Key7) {
*event = "KEY7"
} else if shared.Win.Pressed(pixelgl.Key8) {
*event = "KEY8"
} else if shared.Win.Pressed(pixelgl.Key9) {
*event = "KEY9"
}
return event
}

View File

@ -0,0 +1,53 @@
//retrieve player input and send the directions of motions to the mechanics
package supervisor
import (
"time"
"github.com/gandrin/ASharedJourney/shared"
)
type PlayerDirections struct {
Player1 Direction
Player2 Direction
}
type GameEvent struct {
PlayerDirections *PlayerDirections
Event *Event
}
type GameSupervisor struct {
GameEventsChannel chan *GameEvent
}
var Sup *GameSupervisor
//Start initialises the game and specify the game mode
func Start() chan *GameEvent {
Sup = new(GameSupervisor)
Sup.GameEventsChannel = make(chan *GameEvent, 1)
return Sup.GameEventsChannel
}
//Play launches game supervisor (should be launched last)
func (gameSupervisor *GameSupervisor) Play() {
var nextMove *PlayerDirections
var nextEvent *Event
nextGameEvent := new(GameEvent)
for play := true; play; play = shared.Continue() {
time.Sleep(shared.KeyPressedDelayMs * time.Millisecond)
nextEvent = catchEvent()
//get the players key move
nextMove = Move()
if nextMove.Player1.X != 0 || nextMove.Player1.Y != 0 {
//new move
shared.AddAction()
}
nextGameEvent.PlayerDirections = nextMove
nextGameEvent.Event = nextEvent
gameSupervisor.GameEventsChannel <- nextGameEvent
}
}

View File

@ -0,0 +1,68 @@
package supervisor
import (
"github.com/faiface/pixel/pixelgl"
"github.com/gandrin/ASharedJourney/shared"
)
//transition Direction in x , y coordinates
type Direction struct {
X int
Y int
}
//get the key values that was pressed
//old directions
var prevKeyPressed pixelgl.Button
var keyAlreadyPressed int
func key() Direction {
var pressed pixelgl.Button
var newDir = Direction{
X: 0,
Y: 0,
}
//check if key was just pressed
if shared.Win.Pressed(pixelgl.KeyLeft) {
pressed = pixelgl.KeyLeft
newDir.X = -1
goto end
} else if shared.Win.Pressed(pixelgl.KeyRight) {
pressed = pixelgl.KeyRight
newDir.X = 1
goto end
} else if shared.Win.Pressed(pixelgl.KeyDown) {
newDir.X = 0
newDir.Y = -1
pressed = pixelgl.KeyDown
goto end
} else if shared.Win.Pressed(pixelgl.KeyUp) {
newDir.X = 0
newDir.Y = 1
pressed = pixelgl.KeyUp
goto end
} else {
//no key pressed
prevKeyPressed = pixelgl.Key0 //default
return newDir
}
end:
//check if key repressed
if pressed == prevKeyPressed {
//time penalty
if keyAlreadyPressed == 5 {
keyAlreadyPressed = 0
return newDir
} else {
newDir = Direction{0, 0}
}
keyAlreadyPressed += 1
} else {
keyAlreadyPressed = 0
}
prevKeyPressed = pressed
return newDir
}

View File

@ -0,0 +1,291 @@
package tiles
//noinspection ALL
import (
"bytes"
"errors"
"image"
"os"
"github.com/gandrin/ASharedJourney/assets_manager"
tiled "github.com/lafriks/go-tiled"
"github.com/gandrin/ASharedJourney/shared"
_ "image/png"
"log"
"fmt"
"github.com/faiface/pixel"
"github.com/faiface/pixel/pixelgl"
"github.com/gandrin/ASharedJourney/menu"
"github.com/gandrin/ASharedJourney/music"
)
// Level names
const (
bonhommeMap = "bonhomme"
orgyIsIsland = "orgyIsland"
veryEasyLevel = "veryEasy"
mazeLevel = "maze"
theLongCorridorLevel = "theLongCorridor"
amazeingLevel = "amazeing"
forestLevel = "forest"
myLittlePonyLevel = "myLittlePony"
theLittlePigLevel = "theLittlePig"
theStruggleLevel = "theStruggle"
inTheHoleTileID = 61
)
// CurrentLevel played
var CurrentLevel = -1
// Levels list
var Levels = [...]string{
veryEasyLevel,
amazeingLevel,
mazeLevel,
forestLevel,
theLongCorridorLevel,
theLittlePigLevel,
bonhommeMap,
theStruggleLevel,
myLittlePonyLevel,
}
// Uncomment this for testing :)
// var Levels = [...]string{biggerLevel}
const tilesPath = "map.png" // path to your tileset
// TileSize tile in pixels of squares
var TileSize int
var mapWidth int
var mapHeight int
// World struct with global tiles and obj positions
type World struct {
BackgroundTiles []SpriteWithPosition
Players []SpriteWithPosition
Movables []SpriteWithPosition
Obstacles []SpriteWithPosition
Water []SpriteWithPosition
Holes []SpriteWithPosition
WinStars []SpriteWithPosition
}
//SpriteWithPosition holds the sprite and its position into the window
type SpriteWithPosition struct {
Sprite *pixel.Sprite
Position pixel.Vec
InTheWater bool
InTheHole bool
HasWon bool
WinningPosition pixel.Vec
}
// loadMap load the map
func loadMap() (pixel.Picture, error) {
//noinspection GoUnresolvedReference
byteImage, err := assetsManager.Asset("assets/" + tilesPath)
if err != nil {
return nil, err
}
img, _, err := image.Decode(bytes.NewReader(byteImage))
if err != nil {
return nil, err
}
return pixel.PictureDataFromImage(img), nil
}
func getTilesFrames(spritesheet pixel.Picture) []pixel.Rect {
var tilesFrames []pixel.Rect
for y := spritesheet.Bounds().Max.Y - float64(TileSize); y > spritesheet.Bounds().Min.Y-float64(TileSize); y -= float64(TileSize) {
for x := spritesheet.Bounds().Min.X; x < spritesheet.Bounds().Max.X; x += float64(TileSize) {
tilesFrames = append(tilesFrames, pixel.R(x, y, x+float64(TileSize), y+float64(TileSize)))
}
}
return tilesFrames
}
func getOrigin(win *pixelgl.Window) pixel.Vec {
centerPosition := win.Bounds().Center()
originXPosition := centerPosition.X - float64(mapWidth)/2*float64(TileSize)
originYPosition := centerPosition.Y + float64(mapHeight)/2*float64(TileSize) - float64(TileSize)
return pixel.V(originXPosition, originYPosition)
}
func getSpritePosition(spriteIndex int, origin pixel.Vec) pixel.Vec {
spriteXPosition := origin.X + float64((spriteIndex%mapWidth)*TileSize) + float64(TileSize)/2
spriteYPosition := origin.Y + float64(TileSize)/2 - float64((spriteIndex/mapWidth)*TileSize)
return pixel.V(spriteXPosition, spriteYPosition)
}
// extractAndPlaceSprites filters out empty tiles and positions them properly on the screen
func extractAndPlaceSprites(
layerTiles []*tiled.LayerTile,
spritesheet pixel.Picture,
tilesFrames []pixel.Rect,
originPosition pixel.Vec,
) (positionedSprites []SpriteWithPosition) {
for index, layerTile := range layerTiles {
if !layerTile.IsNil() {
sprite := pixel.NewSprite(spritesheet, tilesFrames[layerTile.ID])
spritePosition := getSpritePosition(index, originPosition)
positionedSprites = append(positionedSprites, SpriteWithPosition{
Sprite: sprite,
Position: spritePosition,
})
}
}
return positionedSprites
}
func findLayerIndex(layerName string, layers []*tiled.Layer) (layerIndex int, err error) {
for index, layer := range layers {
if layer.Name == layerName {
return index, nil
}
}
return -1, errors.New("Expected to find layer with name " + layerName)
}
// SetNextLevel called before NextLevel if you want to select it
func SetNexLevel(nextMapLevel int) {
if nextMapLevel == 0 {
CurrentLevel = len(Levels)
} else {
CurrentLevel = nextMapLevel - 1
}
}
// NextLevel goes to next level
func NextLevel() World {
CurrentLevel = (CurrentLevel + 1) % len(Levels)
var newWorlg = GenerateMap(Levels[CurrentLevel])
if CurrentLevel != 0 {
//if !(len(Levels) == CurrentLevel){
if !(len(Levels)-1 == CurrentLevel) {
//last level was finished
menu.Menu(menu.WinLevelMenuImage, "Level solved, continue ...", pixel.V(150, 200), true, music.SOUND_EFFECT_WIN_GAME)
} else {
//game was finished
music.Music.PlayEffect(music.SOUND_EFFECT_WIN_FINAL_GAME)
menu.Menu(menu.FinishedGameImage, "You WIN", pixel.V(300, 140), true, music.SOUND_EFFECT_WIN_GAME)
//reload main menu
menu.Menu(menu.MainMenuImage, "Press ENTER to PLAY ...", pixel.V(180, 150), true, music.SOUND_EFFECT_START_GAME)
}
}
return newWorlg
}
// RestartLevel reinitializes the current level
func RestartLevel() World {
return GenerateMap(Levels[CurrentLevel])
}
// GenerateMap generates the map from a .tmx file
func GenerateMap(levelFileName string) World {
//added support for relative file addressing
byteTiledMap, _ := assetsManager.Asset("assets/" + levelFileName + ".tmx")
gameMap, err := tiled.LoadFromReader("", bytes.NewReader(byteTiledMap))
if err != nil {
log.Fatal(err)
fmt.Println("Error parsing map")
os.Exit(2)
}
mapWidth = gameMap.Width
mapHeight = gameMap.Height
TileSize = gameMap.TileHeight
spritesheet, err := loadMap()
if err != nil {
panic(err)
}
tilesFrames := getTilesFrames(spritesheet)
originPosition := getOrigin(shared.Win)
var background []SpriteWithPosition
var players []SpriteWithPosition
var obstacles []SpriteWithPosition
var movables []SpriteWithPosition
var water []SpriteWithPosition
var winStars []SpriteWithPosition
var holes []SpriteWithPosition
backgoundIndex, err := findLayerIndex("background", gameMap.Layers)
if err == nil {
background = extractAndPlaceSprites(gameMap.Layers[backgoundIndex].Tiles, spritesheet, tilesFrames, originPosition)
}
playersLayerIndex, err := findLayerIndex("animals", gameMap.Layers)
if err == nil {
players = extractAndPlaceSprites(gameMap.Layers[playersLayerIndex].Tiles, spritesheet, tilesFrames, originPosition)
}
obstaclesLayerIndex, err := findLayerIndex("obstacles", gameMap.Layers)
if err == nil {
obstacles = extractAndPlaceSprites(gameMap.Layers[obstaclesLayerIndex].Tiles, spritesheet, tilesFrames, originPosition)
}
movablesLayerIndex, err := findLayerIndex("movables", gameMap.Layers)
if err == nil {
movables = extractAndPlaceSprites(gameMap.Layers[movablesLayerIndex].Tiles, spritesheet, tilesFrames, originPosition)
}
waterLayerIndex, err := findLayerIndex("water", gameMap.Layers)
if err == nil {
water = extractAndPlaceSprites(gameMap.Layers[waterLayerIndex].Tiles, spritesheet, tilesFrames, originPosition)
}
winStarsLayerIndex, err := findLayerIndex("win", gameMap.Layers)
if err == nil {
winStars = extractAndPlaceSprites(gameMap.Layers[winStarsLayerIndex].Tiles, spritesheet, tilesFrames, originPosition)
}
holesLayerIndex, err := findLayerIndex("holes", gameMap.Layers)
if err == nil {
holes = extractAndPlaceSprites(gameMap.Layers[holesLayerIndex].Tiles, spritesheet, tilesFrames, originPosition)
}
// Playable checks
if len(players) == 0 {
panic(errors.New("no animal tile was placed"))
}
if len(winStars) == 0 {
panic(errors.New("no win star tile was placed"))
}
// Zz special tile
sprite := pixel.NewSprite(spritesheet, tilesFrames[inTheHoleTileID])
spritePosition := pixel.V(-100, -100)
holes = append(holes, SpriteWithPosition{
Sprite: sprite,
Position: spritePosition,
})
world := World{
BackgroundTiles: background,
Players: players,
Movables: movables,
Obstacles: obstacles,
Water: water,
Holes: holes,
WinStars: winStars,
}
return world
}
//DrawMap draws into window the given sprites
func DrawMap(positionedSprites []SpriteWithPosition) {
for _, positionedSprite := range positionedSprites {
positionedSprite.Sprite.Draw(shared.Win, pixel.IM.Moved(positionedSprite.Position))
}
}