Skip to content

Commit 19ae33b

Browse files
authored
Migrate from Arche to Ark (#267)
1 parent 7e0b14d commit 19ae33b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+597
-613
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ jobs:
2525
- name: Setup Go
2626
uses: actions/setup-go@v3
2727
with:
28-
go-version: '1.21.x'
28+
go-version: '1.25.x'
2929
- name: Install dependencies
3030
run: go get ./...
3131

3232
- name: Build WebAssembly
3333
run: |
34-
go build -ldflags="-s -w" -tags tiny -o docs/html/main.wasm .
34+
go build -ldflags="-s -w" -tags ark_tiny -o docs/html/main.wasm .
3535
3636
- name: Deploy to GitHub Pages
3737
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Go
1717
uses: actions/setup-go@v3
1818
with:
19-
go-version: '1.21.x'
19+
go-version: '1.25.x'
2020
- name: Install dependencies
2121
run: |
2222
sudo apt-get update -y
@@ -47,7 +47,7 @@ jobs:
4747
- name: Setup Go
4848
uses: actions/setup-go@v3
4949
with:
50-
go-version: '1.21.x'
50+
go-version: '1.25.x'
5151
- name: Install dependencies
5252
run: go get ./...
5353
- name: Build
@@ -75,7 +75,7 @@ jobs:
7575
- name: Setup Go
7676
uses: actions/setup-go@v3
7777
with:
78-
go-version: '1.21.x'
78+
go-version: '1.25.x'
7979
- name: Build
8080
run: GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 go build .
8181
- name: Build APP Bundle
@@ -109,7 +109,7 @@ jobs:
109109
- name: Setup Go
110110
uses: actions/setup-go@v3
111111
with:
112-
go-version: '1.21.x'
112+
go-version: '1.25.x'
113113
- name: Build
114114
run: GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build .
115115
- name: Build APP Bundle

.github/workflows/test-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup Go
2121
uses: actions/setup-go@v3
2222
with:
23-
go-version: '1.21.x'
23+
go-version: '1.25.x'
2424
- name: Install dependencies
2525
run: |
2626
sudo apt-get update -y
@@ -49,7 +49,7 @@ jobs:
4949
- name: Setup Go
5050
uses: actions/setup-go@v3
5151
with:
52-
go-version: '1.21.x'
52+
go-version: '1.25.x'
5353
- name: Install dependencies
5454
run: go get ./...
5555
- name: Build
@@ -75,7 +75,7 @@ jobs:
7575
- name: Setup Go
7676
uses: actions/setup-go@v3
7777
with:
78-
go-version: '1.21.x'
78+
go-version: '1.25.x'
7979
- name: Build
8080
run: GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 go build .
8181
- name: Build APP Bundle
@@ -107,7 +107,7 @@ jobs:
107107
- name: Setup Go
108108
uses: actions/setup-go@v3
109109
with:
110-
go-version: '1.21.x'
110+
go-version: '1.25.x'
111111
- name: Build
112112
run: GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build .
113113
- name: Build APP Bundle

.github/workflows/tests-wasm.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup Go
2323
uses: actions/setup-go@v3
2424
with:
25-
go-version: '1.21.x'
25+
go-version: '1.25.x'
2626
- name: Install dependencies
2727
run: go get ./...
2828
- name: Build WebAssembly
@@ -36,7 +36,7 @@ jobs:
3636
- name: Set up Go
3737
uses: actions/setup-go@v2
3838
with:
39-
go-version: '1.21.x'
39+
go-version: '1.25.x'
4040
- name: Check out code
4141
uses: actions/checkout@v2
4242
- name: Install dependencies
@@ -55,7 +55,7 @@ jobs:
5555
- name: Setup Go
5656
uses: actions/setup-go@v3
5757
with:
58-
go-version: '1.21.x'
58+
go-version: '1.25.x'
5959
- name: Install dependencies
6060
run: |
6161
go get ./...

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup Go
1919
uses: actions/setup-go@v3
2020
with:
21-
go-version: '1.21.x'
21+
go-version: '1.25.x'
2222
- name: Install dependencies
2323
run: |
2424
sudo apt-get update -y
@@ -35,7 +35,7 @@ jobs:
3535
- name: Set up Go
3636
uses: actions/setup-go@v2
3737
with:
38-
go-version: '1.21.x'
38+
go-version: '1.25.x'
3939
- name: Check out code
4040
uses: actions/checkout@v2
4141
- name: Install dependencies
@@ -56,7 +56,7 @@ jobs:
5656
- name: Setup Go
5757
uses: actions/setup-go@v3
5858
with:
59-
go-version: '1.21.x'
59+
go-version: '1.25.x'
6060
- name: Install dependencies
6161
run: |
6262
sudo apt-get update -y

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [[v0.2.2]](https://github.com/mlange-42/tiny-world/compare/v0.2.1...v0.2.2)
4+
5+
* Migrate from the Arche ECS to [Ark](https://github.com/mlange-42/ark) (#267)
6+
37
## [[v0.2.1]](https://github.com/mlange-42/tiny-world/compare/v0.2.0...v0.2.1)
48

59
### Bugfixes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A tiny, slow-paced world and colony building game.
44

5-
Made with [Ebitengine](https://github.com/hajimehoshi/ebiten) and the [Arche](https://github.com/mlange-42/arche) Entity Component System.
5+
Made with [Ebitengine](https://github.com/hajimehoshi/ebiten) and the [Ark](https://github.com/mlange-42/ark) Entity Component System.
66

77
<div align="center" width="100%">
88
<img alt="Tiny World screenshot" src="https://github.com/mlange-42/tiny-world/assets/44003176/b3384739-af7c-4f44-996f-8f1cb5097fa3"></img>

game/comp/components.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package comp
33
import (
44
"image"
55

6-
"github.com/mlange-42/arche/ecs"
6+
"github.com/mlange-42/ark/ecs"
77
"github.com/mlange-42/tiny-world/game/resource"
88
"github.com/mlange-42/tiny-world/game/terr"
99
)

game/game.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ package game
22

33
import (
44
"github.com/hajimehoshi/ebiten/v2"
5-
"github.com/mlange-42/arche-model/model"
5+
"github.com/mlange-42/ark-tools/app"
66
"github.com/mlange-42/tiny-world/game/res"
77
)
88

99
// Game container
1010
type Game struct {
11-
Model *model.Model
11+
Model *app.App
1212
Screen res.Screen
1313
Mouse res.Mouse
1414

1515
canvasHelper *canvasHelper
1616
}
1717

1818
// NewGame returns a new game
19-
func NewGame(mod *model.Model) Game {
19+
func NewGame(mod *app.App) Game {
2020
return Game{
2121
Model: mod,
2222
Screen: res.Screen{Image: nil, Width: 0, Height: 0},

game/menu/draw_ui.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
package menu
22

33
import (
4-
"github.com/mlange-42/arche/ecs"
5-
"github.com/mlange-42/arche/generic"
4+
"github.com/mlange-42/ark/ecs"
65
"github.com/mlange-42/tiny-world/game/res"
76
)
87

98
// DrawUI is a system to render the user interface.
109
type DrawUI struct {
11-
screen generic.Resource[res.Screen]
12-
ui generic.Resource[UI]
13-
sprites generic.Resource[res.Sprites]
10+
screen ecs.Resource[res.Screen]
11+
ui ecs.Resource[UI]
12+
sprites ecs.Resource[res.Sprites]
1413
}
1514

1615
// InitializeUI the system
1716
func (s *DrawUI) InitializeUI(world *ecs.World) {
18-
s.ui = generic.NewResource[UI](world)
19-
s.screen = generic.NewResource[res.Screen](world)
20-
s.sprites = generic.NewResource[res.Sprites](world)
17+
s.ui = s.ui.New(world)
18+
s.screen = s.screen.New(world)
19+
s.sprites = s.sprites.New(world)
2120
}
2221

2322
// UpdateUI the system

0 commit comments

Comments
 (0)