/
talk.slide
162 lines (98 loc) · 2.83 KB
/
talk.slide
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
Creating a multiplayer game in Go, from zero
16:30 03 Feb 2024
Tags: ebiten, golang, game
Francesc Gil
https://maze-wars.com
@xescugc
@MazeWars
xescugil@gmail.com
* Before we start!
It's still under development so bugs can happen and also the sever may not hold, but it's fine, break it :)
Check it on [[https://maze-wars.com]]
* A bit of myself
* Why did I do it
Inspied in a Warcraft 3 mod named "Line Tower Wars"
.image wc3.jpg 500 350
* Beginnings
- Lua and [[https://love2d.org/][LÖVE]]
- GO and [[https://ebitengine.org/][Ebiten]]
* Examples
.code ebiten_go
* First steps
A few games to learn [[https://github.com/xescugc/games]]:
- [[https://github.com/xescugc/games/tree/master/shoot_the_enemy][Shoot the enemy]]
- [[https://github.com/xescugc/games/tree/master/snake][Snake]]
- [[https://github.com/xescugc/games/tree/master/space][Space Invaders]]
- [[https://github.com/xescugc/games/tree/master/tiles][Tiles]]
* Shoot the enemy
.image shoot_the_enemy.png 500 700
* Snake
.image snake.png 500 700
* Space Invaders
.image space.png 500 700
* Tiles
.video tiles.mp4 video/mp4 500 700
* The real thing, Maze Wars
.image game_sample.png 500 700
* Items
- Assets
- Map
- Code Architecture
- Summon Units
- Place towers
- Gold, Income and Lives
- Multiplayer Server
- UX/UI
* Assets
[[https://pixel-boy.itch.io/ninja-adventure-asset-pack][Ninja Adventure Asset Pack]]
.image na_asset.png 500 700
* Map
Tiled: Is a 2D level editor that helps you develop the content of your game
.image tiled.png 500 700
* Code Architecture
Wanted to use [[https://facebookarchive.github.io/flux/][Flux]] so I created [[https://github.com/xescugc/go-flux]]
- State Update
- Potential for replaying games
.image flux.png 300 900
* Summon Units
Pathing evolution:
- Y++
- Dijkstra
- A*
- A* plus
.video units.mp4 video/mp4 300 500
* Pathing with Dijkstra
.video dijkstra.mp4 video/mp4 400 600
* Pathing with A*
.video astar.mp4 video/mp4 400 600
* Place Towers
- Do not block the path
- Attack units
.video towers.mp4 video/mp4 400 600
* Gold, Income and Lives
* Multiplayer Server
- [[https://www.gabrielgambetta.com/client-server-game-architecture.html][Fast-Paced Multiplayer (Part I): Client-Server Game Architecture]] for documentation reference
- Using Authoritative Server with client prediction
- Websockets for Client<->Server communication
- Server also using Flux
* UX/UI
Migration to [[https://ebitenui.github.io/][Ebitenui]]
- User sign up
- Lobby
- Waiting Room
- Game
.image eary_ui.png 300 400
* Cross compilation
- Linux
- Darwin
- Windows
Browser with WASM and Android on the future
* Future of Maze Wars
There are still a lot of things to do and improvements:
- Improves A*
- Add more units
- Add more towers
- And much much much much much ... much more
* Q&A
.link https://maze-wars.com
.link https://github.com/xescugc/maze-wars