Compare commits
No commits in common. "main" and "v1.0.2" have entirely different histories.
31
.github/workflows/deploy.yml
vendored
@ -1,31 +0,0 @@
|
|||||||
name: Deploy to GitHub Pages
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
name: Deploy to GitHub Pages
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Clone fonts repository
|
|
||||||
run: git clone https://github.com/touying-typ/fonts.git fonts --depth=1
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.x'
|
|
||||||
- name: Install Touying Exporter
|
|
||||||
run: pip install touying
|
|
||||||
- name: Build HTML File
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
touying compile presentation.typ --output build/index.html --format html --font-paths fonts --font-paths assets/fonts
|
|
||||||
- name: Deploy to GitHub Pages
|
|
||||||
uses: JamesIves/github-pages-deploy-action@v4
|
|
||||||
with:
|
|
||||||
branch: gh-pages
|
|
||||||
folder: build
|
|
||||||
19
.github/workflows/typst.yml
vendored
@ -11,22 +11,17 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
packages: read
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
- name: Install Typst
|
- name: Typst
|
||||||
uses: typst-community/setup-typst@v3
|
uses: lvignoli/typst-action@main
|
||||||
with:
|
with:
|
||||||
typst-version: 0.12
|
source_file: |
|
||||||
cache-dependency-path: requirements.typ
|
main.typ
|
||||||
- name: Compile Typst files
|
|
||||||
run: |
|
|
||||||
typst compile --font-path=assets/fonts main.typ Cagulis_Kristians.Francis_kc22015.pdf
|
|
||||||
typst compile --font-path=assets/fonts documentary_page.typ reg_lapa_Cagulis_Kristians.Francis_kc22015.pdf
|
|
||||||
- name: Upload PDF file
|
- name: Upload PDF file
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@ -40,6 +35,4 @@ jobs:
|
|||||||
if: github.ref_type == 'tag'
|
if: github.ref_type == 'tag'
|
||||||
with:
|
with:
|
||||||
name: "${{ github.ref_name }} — ${{ env.DATE }}"
|
name: "${{ github.ref_name }} — ${{ env.DATE }}"
|
||||||
files: |
|
files: main.pdf
|
||||||
Cagulis_Kristians.Francis_kc22015.pdf
|
|
||||||
reg_lapa_Cagulis_Kristians.Francis_kc22015.pdf
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
"Anotācija",
|
"Anotācija",
|
||||||
)
|
)
|
||||||
Kvalifikācijas darbā ir izstrādāta spēle "Maze Ascension", kas piedāvā
|
Kvalifikācijas darbā ir izstrādāta spēle "Maze Ascension", kas piedāvā
|
||||||
spēlētājiem izaicinājumu iziet cauri procedurāli ģenerētiem sešstūrainam
|
spēlētājiem izaicinājumu iziet cauri proceduāli ģenerētiem sešstūrainam
|
||||||
labirintiem. Spēle ir veidota, izmantojot Rust programmēšanas valodu un Bevy
|
labirintiem. Spēle ir veidota, izmantojot Rust programmēšanas valodu un Bevy
|
||||||
spēļu dzinēju.
|
spēļu dzinēju.
|
||||||
|
|
||||||
@ -26,13 +26,13 @@ tīmekļa versija, izmantojot WebAssembly tehnoloģiju.
|
|||||||
first-line-indent: 0cm,
|
first-line-indent: 0cm,
|
||||||
[*Atslēgvārdi:*],
|
[*Atslēgvārdi:*],
|
||||||
)
|
)
|
||||||
Labirints,
|
Labirints
|
||||||
datorspēle,
|
datorspēle,
|
||||||
sistēmas prasības,
|
sistēmas prasības,
|
||||||
programmatūras prasību specifikācija,
|
programmatūras prasību specifikācija,
|
||||||
Bevy,
|
Bevy,
|
||||||
ECS,
|
ECS,
|
||||||
papildspējas.
|
papilspējas.
|
||||||
|
|
||||||
|
|
||||||
#text(
|
#text(
|
||||||
@ -46,7 +46,16 @@ papildspējas.
|
|||||||
numbering: none,
|
numbering: none,
|
||||||
"Abstract",
|
"Abstract",
|
||||||
)
|
)
|
||||||
The qualification work "Game development using Bevy game engine" includes the game "Maze Ascension", which offers
|
#align(
|
||||||
|
center,
|
||||||
|
heading(
|
||||||
|
level: 2,
|
||||||
|
outlined: false,
|
||||||
|
numbering: none,
|
||||||
|
text(13pt, "Game development using Bevy game engine"),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
The qualification work includes the game "Maze Ascension", which offers
|
||||||
players the challenge to pass through procedurally generated hexagons
|
players the challenge to pass through procedurally generated hexagons
|
||||||
mazes. The game is built using the Rust programming language and Bevy
|
mazes. The game is built using the Rust programming language and Bevy
|
||||||
game engine.
|
game engine.
|
||||||
@ -65,7 +74,7 @@ papildspējas.
|
|||||||
[*Keywords:*],
|
[*Keywords:*],
|
||||||
)
|
)
|
||||||
Maze,
|
Maze,
|
||||||
computer game,
|
comtuper game,
|
||||||
system requirements,
|
system requirements,
|
||||||
software requirements specification,
|
software requirements specification,
|
||||||
Bevy,
|
Bevy,
|
||||||
3
assets/code/maze-ascension/components.rs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#[derive(Component, Debug, Clone, Copy, PartialEq, Eq, Default, Reflect)]
|
||||||
|
#[reflect(Component)]
|
||||||
|
pub struct Player;
|
||||||
@ -39,6 +39,7 @@ pub(super) fn spawn_maze(
|
|||||||
Visibility::Visible,
|
Visibility::Visible,
|
||||||
))
|
))
|
||||||
.insert_if(CurrentFloor, || *floor == 1) // Only floor 1 gets CurrentFloor
|
.insert_if(CurrentFloor, || *floor == 1) // Only floor 1 gets CurrentFloor
|
||||||
|
.insert_if(NextFloor, || *floor != 1) // All other floors get NextFloor
|
||||||
.id();
|
.id();
|
||||||
|
|
||||||
let assets = MazeAssets::new(&mut meshes, &mut materials, &global_config);
|
let assets = MazeAssets::new(&mut meshes, &mut materials, &global_config);
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 199 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 33 MiB |
|
Before Width: | Height: | Size: 36 MiB |
|
Before Width: | Height: | Size: 952 B |
|
Before Width: | Height: | Size: 42 MiB |
|
Before Width: | Height: | Size: 31 MiB |
|
Before Width: | Height: | Size: 84 MiB |
|
Before Width: | Height: | Size: 986 B |
|
Before Width: | Height: | Size: 3.8 MiB |
|
Before Width: | Height: | Size: 3.6 MiB |
|
Before Width: | Height: | Size: 983 B |
@ -5,32 +5,23 @@
|
|||||||
#set figure(kind: "attachment", supplement: "pielikums")
|
#set figure(kind: "attachment", supplement: "pielikums")
|
||||||
|
|
||||||
#figure(
|
#figure(
|
||||||
caption: [Clippy rīka rezultāts "hexlab" bibliotēkai],
|
caption: [Pilns "hexlab" bibliotēkas testu rezultāts],
|
||||||
image("../assets/images/clippy/hexlab.png"),
|
image("assets/images/tests/hexlab-full.png", height: 90%),
|
||||||
) <clippy-hexlab>
|
) <tests-hexlab-full>
|
||||||
|
|
||||||
#figure(
|
|
||||||
caption: [Clippy rīka rezultāts "Maze Ascension" spēlei],
|
|
||||||
image("../assets/images/clippy/maze-ascension.png"),
|
|
||||||
) <clippy-maze-ascension>
|
|
||||||
|
|
||||||
#figure(
|
#figure(
|
||||||
caption: [Tarpaulin rīka rezultāts "hexlab" bibliotēkai],
|
caption: [Tarpaulin rīka rezultāts "hexlab" bibliotēkai],
|
||||||
image("../assets/images/tests/tarpaulin/hexlab.png"),
|
image("assets/images/tests/tarpaulin/hexlab.png"),
|
||||||
) <tarpaulin-hexlab>
|
) <tarpaulin-hexlab>
|
||||||
|
|
||||||
|
|
||||||
#figure(
|
#figure(
|
||||||
caption: [Tokei rīka rezultāts "Maze Ascension" spēlei],
|
caption: [Tokei rīka rezultāts "Maze Ascension" spēlei],
|
||||||
image("../assets/images/tokei/maze-ascension.png"),
|
image("assets/images/tokei/maze-ascension.png"),
|
||||||
) <tokei-maze-ascension>
|
) <tokei-maze-ascension>
|
||||||
|
|
||||||
#figure(
|
#figure(
|
||||||
caption: [Tokei rīka rezultāts "hexlab" bibliotēkai],
|
caption: [Tokei rīka rezultāts "hexlab" bibliotēkai],
|
||||||
image("../assets/images/tokei/hexlab.png"),
|
image("assets/images/tokei/hexlab.png"),
|
||||||
) <tokei-hexlab>
|
) <tokei-hexlab>
|
||||||
|
|
||||||
#figure(
|
|
||||||
caption: [Pilns "hexlab" bibliotēkas testu rezultāts],
|
|
||||||
image("../assets/images/tests/hexlab-full.png", height: 90%),
|
|
||||||
) <tests-hexlab-full>
|
|
||||||
@ -2,19 +2,19 @@
|
|||||||
|
|
||||||
#codeblock(
|
#codeblock(
|
||||||
[Labirinta būvētāja implementācijas piemērs],
|
[Labirinta būvētāja implementācijas piemērs],
|
||||||
"../assets/code/hexlab/builder.rs",
|
"assets/code/hexlab/builder.rs",
|
||||||
)
|
)
|
||||||
#codeblock(
|
#codeblock(
|
||||||
[Labirinta sienu reprezentācijas piemērs],
|
[Labirinta sienu reprezentācijas piemērs],
|
||||||
"../assets/code/hexlab/walls.rs",
|
"assets/code/hexlab/walls.rs",
|
||||||
)
|
)
|
||||||
|
|
||||||
#codeblock(
|
#codeblock(
|
||||||
[Labirinta stāvu implementācijas piemērs],
|
[Labirinta stāvu implementācijas piemērs],
|
||||||
"../assets/code/maze-ascension/floor.rs",
|
"assets/code/maze-ascension/floor.rs",
|
||||||
)
|
)
|
||||||
|
|
||||||
#codeblock(
|
#codeblock(
|
||||||
[Labirinta ģenerācijas implementācijas piemērs],
|
[Labirinta ģenerācijas implementācijas piemērs],
|
||||||
"../assets/code/maze-ascension/maze_generation.rs",
|
"assets/code/maze-ascension/maze_generation.rs",
|
||||||
)
|
)
|
||||||
@ -1,55 +1,12 @@
|
|||||||
#import "@preview/tablex:0.0.9": tablex
|
#import "@preview/tablex:0.0.9": tablex
|
||||||
#import "src/layout.typ": project, indent-par
|
#import "@preview/dashy-todo:0.0.1": todo
|
||||||
#import "src/layout.typ": indent
|
|
||||||
|
|
||||||
#set page(
|
|
||||||
margin: (
|
|
||||||
left: 30mm,
|
|
||||||
right: 20mm,
|
|
||||||
top: 20mm,
|
|
||||||
bottom: 20mm,
|
|
||||||
),
|
|
||||||
number-align: center,
|
|
||||||
paper: "a4",
|
|
||||||
)
|
|
||||||
#set text(
|
|
||||||
font: "Times New Roman",
|
|
||||||
size: 12pt,
|
|
||||||
hyphenate: auto,
|
|
||||||
lang: "lv",
|
|
||||||
region: "lv",
|
|
||||||
)
|
|
||||||
|
|
||||||
#set par(
|
|
||||||
justify: true,
|
|
||||||
leading: 1.5em,
|
|
||||||
first-line-indent: indent,
|
|
||||||
spacing: 1.5em,
|
|
||||||
)
|
|
||||||
#show heading: set block(spacing: 1.5em)
|
|
||||||
#show heading: it => {
|
|
||||||
if it.level == 1 {
|
|
||||||
pagebreak(weak: true)
|
|
||||||
text(
|
|
||||||
14pt,
|
|
||||||
align(
|
|
||||||
center,
|
|
||||||
upper(it),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
text(12pt, it)
|
|
||||||
}
|
|
||||||
""
|
|
||||||
v(-1cm)
|
|
||||||
}
|
|
||||||
|
|
||||||
#let vspace = 1fr
|
#let vspace = 1fr
|
||||||
#let fill = box(width: 1fr, repeat(sym.space))
|
#let fill = box(width: 1fr, repeat(sym.space))
|
||||||
#let long-underline = underline(box(width: 1fr, repeat(sym.space)))
|
#let long-underline = underline(box(width: 1fr, repeat(sym.space)))
|
||||||
#set page(numbering: none)
|
#set page(numbering: none)
|
||||||
|
|
||||||
#heading(level: 1, outlined: false, numbering: none, "Dokumentārā lapa")
|
#heading(numbering: none, outlined: false, "Dokumentārā lapa")
|
||||||
|
|
||||||
Kvalifikācijas darbs "*Spēles izstrāde, izmantojot Bevy spēļu dzinēju*" ir
|
Kvalifikācijas darbs "*Spēles izstrāde, izmantojot Bevy spēļu dzinēju*" ir
|
||||||
izstrādāts Latvijas Universitātes Eksakto zinātņu un tehnoloģiju fakultātē,
|
izstrādāts Latvijas Universitātes Eksakto zinātņu un tehnoloģiju fakultātē,
|
||||||
@ -62,24 +19,25 @@ izdrukai un/vai recenzentam uzrādītajai darba versijai.
|
|||||||
|
|
||||||
|
|
||||||
#context {
|
#context {
|
||||||
|
|
||||||
set par(
|
set par(
|
||||||
first-line-indent: 1cm,
|
first-line-indent: 1cm,
|
||||||
hanging-indent: 1cm,
|
hanging-indent: 1cm,
|
||||||
)
|
)
|
||||||
|
|
||||||
v(vspace / 2)
|
v(vspace / 2)
|
||||||
[Autors: *Kristiāns Francis Cagulis, kc22015 ~~06.01.2025.*]
|
[Autors: *Kristiāns Francis Cagulis, kc22015 ~~\_\_.01.2025.*]
|
||||||
|
|
||||||
v(vspace)
|
v(vspace)
|
||||||
[Rekomendēju darbu aizstāvēšanai\
|
[Rekomendēju darbu aizstāvēšanai\
|
||||||
Darba vadītājs: *Mg. dat. Jānis Iljins ~~06.01.2025.*]
|
Darba vadītājs: *prof. Mg. dat. Jānis Iljins ~~\_\_.01.2025.*]
|
||||||
|
|
||||||
v(vspace)
|
v(vspace)
|
||||||
[Recenzents: *Artūrs Driķis*]
|
[Recenzents: *Artūrs Driķis*]
|
||||||
|
|
||||||
|
|
||||||
v(vspace)
|
v(vspace)
|
||||||
[Darbs iesniegs *06.01.2025.*\
|
[Darbs iesniegs *\_\_.01.2025.*\
|
||||||
Kvalifikācijas darbu pārbaudījumu komisijas sekretārs (elektronisks paraksts)
|
Kvalifikācijas darbu pārbaudījumu komisijas sekretārs (elektronisks paraksts)
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -19,6 +19,7 @@
|
|||||||
date: "",
|
date: "",
|
||||||
body,
|
body,
|
||||||
) = {
|
) = {
|
||||||
|
|
||||||
set document(author: authors)
|
set document(author: authors)
|
||||||
|
|
||||||
set page(
|
set page(
|
||||||
@ -32,23 +33,13 @@
|
|||||||
paper: "a4",
|
paper: "a4",
|
||||||
)
|
)
|
||||||
set text(
|
set text(
|
||||||
font: (
|
font: "Times New Roman",
|
||||||
"Times New Roman",
|
|
||||||
"New Computer Modern",
|
|
||||||
),
|
|
||||||
size: 12pt,
|
size: 12pt,
|
||||||
hyphenate: auto,
|
hyphenate: auto,
|
||||||
lang: "lv",
|
lang: "lv",
|
||||||
region: "lv",
|
region: "lv",
|
||||||
)
|
)
|
||||||
show raw: set text(
|
show raw: set text(features: (calt: 0))
|
||||||
font: (
|
|
||||||
"JetBrainsMono NF",
|
|
||||||
"JetBrains Mono",
|
|
||||||
"Fira Code",
|
|
||||||
),
|
|
||||||
features: (calt: 0),
|
|
||||||
)
|
|
||||||
|
|
||||||
show math.equation: set text(weight: 400)
|
show math.equation: set text(weight: 400)
|
||||||
|
|
||||||
@ -166,7 +157,9 @@
|
|||||||
|
|
||||||
align(
|
align(
|
||||||
center,
|
center,
|
||||||
upper(text(date)),
|
upper(
|
||||||
|
text(date),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
/* Title page config end */
|
/* Title page config end */
|
||||||
|
|
||||||
@ -214,11 +207,9 @@
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (
|
if it.kind in (
|
||||||
it.kind in (
|
|
||||||
"i-figured-raw",
|
"i-figured-raw",
|
||||||
"i-figured-\"attachment\"",
|
"i-figured-\"attachment\"",
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
return align(
|
return align(
|
||||||
end,
|
end,
|
||||||
@ -256,7 +247,7 @@
|
|||||||
let supplement_map = (
|
let supplement_map = (
|
||||||
i-figured-table: "tab.",
|
i-figured-table: "tab.",
|
||||||
i-figured-image: "att.",
|
i-figured-image: "att.",
|
||||||
attachment: "pielikumu",
|
attachment: "pielikums",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -272,12 +263,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let number = if kind == "attachment" {
|
let number = if kind == "attachment" {
|
||||||
(
|
|
||||||
numbering(
|
numbering(
|
||||||
el.numbering,
|
el.numbering,
|
||||||
..counter(figure.where(kind: kind)).at(el.location()),
|
..counter(figure.where(kind: kind)).at(el.location()),
|
||||||
) + "."
|
) + "." // Only add dot for attachments
|
||||||
) // Only add dot for attachments
|
|
||||||
} else {
|
} else {
|
||||||
numbering(
|
numbering(
|
||||||
el.numbering,
|
el.numbering,
|
||||||
@ -330,6 +319,7 @@
|
|||||||
/* ToC config end */
|
/* ToC config end */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// show link: set text(fill: blue.darken(20%))
|
// show link: set text(fill: blue.darken(20%))
|
||||||
|
|
||||||
// Main body
|
// Main body
|
||||||
283
presentation.typ
@ -1,283 +0,0 @@
|
|||||||
#import "@preview/touying:0.5.5": *
|
|
||||||
#import themes.university: *
|
|
||||||
#import "@preview/cetz:0.3.1"
|
|
||||||
#import "@preview/fletcher:0.5.3" as fletcher: node, edge
|
|
||||||
#import "@preview/ctheorems:1.1.3": *
|
|
||||||
#import "@preview/numbly:0.1.0": numbly
|
|
||||||
#import "src/diagrams.typ": *
|
|
||||||
|
|
||||||
#set text(
|
|
||||||
font: (
|
|
||||||
"Times New Roman",
|
|
||||||
"New Computer Modern",
|
|
||||||
),
|
|
||||||
size: 12pt,
|
|
||||||
hyphenate: auto,
|
|
||||||
lang: "lv",
|
|
||||||
region: "lv",
|
|
||||||
)
|
|
||||||
#show raw: set text(
|
|
||||||
font: (
|
|
||||||
"JetBrainsMono NF",
|
|
||||||
"JetBrains Mono",
|
|
||||||
"Fira Code",
|
|
||||||
),
|
|
||||||
features: (calt: 0),
|
|
||||||
)
|
|
||||||
|
|
||||||
// cetz and fletcher bindings for touying
|
|
||||||
#let cetz-canvas = touying-reducer.with(
|
|
||||||
reduce: cetz.canvas,
|
|
||||||
cover: cetz.draw.hide.with(bounds: true),
|
|
||||||
)
|
|
||||||
#let fletcher-diagram = touying-reducer.with(
|
|
||||||
reduce: fletcher.diagram,
|
|
||||||
cover: fletcher.hide,
|
|
||||||
)
|
|
||||||
|
|
||||||
#set figure(supplement: none)
|
|
||||||
|
|
||||||
// Theorems configuration by ctheorems
|
|
||||||
#show: thmrules.with(qed-symbol: $square$)
|
|
||||||
#let theorem = thmbox("theorem", "Theorem", fill: rgb("#eeffee"))
|
|
||||||
#let corollary = thmplain(
|
|
||||||
"corollary",
|
|
||||||
"Corollary",
|
|
||||||
base: "theorem",
|
|
||||||
titlefmt: strong,
|
|
||||||
)
|
|
||||||
#let definition = thmbox(
|
|
||||||
"definition",
|
|
||||||
"Definition",
|
|
||||||
inset: (x: 1.2em, top: 1em),
|
|
||||||
)
|
|
||||||
#let example = thmplain("example", "Example").with(numbering: none)
|
|
||||||
#let proof = thmproof("proof", "Proof")
|
|
||||||
|
|
||||||
#show: university-theme.with(
|
|
||||||
aspect-ratio: "16-9",
|
|
||||||
config-info(
|
|
||||||
title: [Spēles izstrāde, izmantojot Bevy spēļu dzinēju],
|
|
||||||
subtitle: [Kvalifikācijas darbs],
|
|
||||||
author: [Kristiāns Francis Cagulis kc22015],
|
|
||||||
date: [2025],
|
|
||||||
institution: [Latvijas Universitāte],
|
|
||||||
),
|
|
||||||
config-colors(
|
|
||||||
primary: rgb("#575279"),
|
|
||||||
secondary: rgb("#797593"),
|
|
||||||
tertiary: rgb("#286983"),
|
|
||||||
neutral-lightest: rgb("#faf4ed"),
|
|
||||||
neutral-darkest: rgb("#575279"),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
#title-slide()
|
|
||||||
|
|
||||||
#slide[
|
|
||||||
= Pārskats
|
|
||||||
- Entitāšu komponenšu sistēma (ECS)
|
|
||||||
- Maze Ascension
|
|
||||||
- Hexlab bibliotēka
|
|
||||||
- Sešstūru implementācija
|
|
||||||
- Saskarne
|
|
||||||
- Rezultāti un secinājumi
|
|
||||||
]
|
|
||||||
|
|
||||||
= Entitāšu komponenšu sistēma (ECS)
|
|
||||||
|
|
||||||
== Kas ir ECS?
|
|
||||||
|
|
||||||
- Koncentrējas uz kompozīciju, nevis mantošanu.
|
|
||||||
- Datu orientēta arhitektūra.
|
|
||||||
- Nodalīti dati (komponentes) un uzvedība (sistēmas).
|
|
||||||
|
|
||||||
== Datu izkārtojums
|
|
||||||
|
|
||||||
// Here is an illustration to help you visualize the logical structure. The
|
|
||||||
// checkmarks show what component types are present on each entity. Empty cells
|
|
||||||
// mean that the component is not present. In this example, we have a player, a
|
|
||||||
// camera, and several enemies.
|
|
||||||
#context {
|
|
||||||
show raw: set text(size: 16pt)
|
|
||||||
table(
|
|
||||||
columns: 7,
|
|
||||||
[*Entity (ID)*],
|
|
||||||
[*Transform*],
|
|
||||||
[*Player*],
|
|
||||||
[*Enemy*],
|
|
||||||
[*Camera*],
|
|
||||||
[*Health*],
|
|
||||||
[*...*],
|
|
||||||
|
|
||||||
`...`, "", "", "", "", "", "",
|
|
||||||
"107",
|
|
||||||
[#emoji.checkmark.heavy `<translation>`\ `<rotation>`\ `<scale>`],
|
|
||||||
emoji.checkmark.heavy,
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
[#emoji.checkmark.heavy `<50.0>`],
|
|
||||||
"",
|
|
||||||
|
|
||||||
"108",
|
|
||||||
[#emoji.checkmark.heavy `<translation>`\ `<rotation>`\ `<scale>`],
|
|
||||||
"",
|
|
||||||
emoji.checkmark.heavy,
|
|
||||||
"",
|
|
||||||
[#emoji.checkmark.heavy `<25.0>`],
|
|
||||||
"",
|
|
||||||
|
|
||||||
"109",
|
|
||||||
[#emoji.checkmark.heavy `<translation>`\ `<rotation>`\ `<scale>`],
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
[#emoji.checkmark.heavy `<camera data>`],
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
|
|
||||||
`...`,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
== Piemērs
|
|
||||||
#context {
|
|
||||||
show raw: set text(size: 16pt)
|
|
||||||
```rust
|
|
||||||
#[derive(Component)]
|
|
||||||
struct Player;
|
|
||||||
|
|
||||||
#[derive(Component)]
|
|
||||||
struct Health {
|
|
||||||
current: u32,
|
|
||||||
max: u32
|
|
||||||
}
|
|
||||||
|
|
||||||
fn heal_player(
|
|
||||||
mut query: Query<&mut Health, With<Player>>,
|
|
||||||
time: Res<Time>,
|
|
||||||
) {
|
|
||||||
for mut health in query.iter_mut() {
|
|
||||||
let new_health = health.current + 2. * time.delta_secs();
|
|
||||||
health.current = new_health.min(health.max);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
}
|
|
||||||
|
|
||||||
= Maze Ascension
|
|
||||||
|
|
||||||
== 1. Līmeņa DPD
|
|
||||||
|
|
||||||
#figure(image("assets/images/diagrams/dpd1.png"))
|
|
||||||
|
|
||||||
== Stāva modulis
|
|
||||||
|
|
||||||
#figure(image("assets/images/diagrams/floor.png", width: 50%))
|
|
||||||
|
|
||||||
|
|
||||||
= Hexlab bibliotēka
|
|
||||||
|
|
||||||
#pagebreak()
|
|
||||||
|
|
||||||
#figure(
|
|
||||||
caption: link("https://crates.io/crates/hexlab"),
|
|
||||||
image("assets/images/crates/hexlab.png", height: 92%),
|
|
||||||
)
|
|
||||||
|
|
||||||
== Labirinta ģenerēšanas funkcijas projektējums
|
|
||||||
#grid(
|
|
||||||
columns: (1fr, 1fr),
|
|
||||||
figure(image("assets/images/diagrams/maze-gen.png")),
|
|
||||||
figure(image("assets/images/diagrams/recursive.png")),
|
|
||||||
)
|
|
||||||
|
|
||||||
== Ģenerēšanas algoritms
|
|
||||||
// recursive backtracking
|
|
||||||
#figure(
|
|
||||||
caption: link("https://en.wikipedia.org/wiki/Maze_generation_algorithm"),
|
|
||||||
image("assets/videos/hexmaze/hexmaze.gif", height: 92%),
|
|
||||||
)
|
|
||||||
|
|
||||||
= Sešstūru implementācija
|
|
||||||
== Attēlošana
|
|
||||||
|
|
||||||
#grid(
|
|
||||||
columns: 2,
|
|
||||||
figure(image("assets/images/game/tile-spreadout.png", height: 100%)),
|
|
||||||
figure(image("assets/images/game/tile.png", height: 100%)),
|
|
||||||
)
|
|
||||||
|
|
||||||
#figure(image("assets/images/game/grid.png", height: 100%))
|
|
||||||
|
|
||||||
= Saskarne
|
|
||||||
#pagebreak()
|
|
||||||
|
|
||||||
#grid(
|
|
||||||
columns: 2,
|
|
||||||
figure(image("assets/images/game/main-menu.png")),
|
|
||||||
)
|
|
||||||
|
|
||||||
#figure(image("assets/videos/game/maze-game.gif"))
|
|
||||||
|
|
||||||
#grid(
|
|
||||||
columns: (1fr, 1fr),
|
|
||||||
figure(image("assets/images/game/debug.png")),
|
|
||||||
figure(image("assets/images/game/dev-tools.png")),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
#figure(image("assets/videos/game/big-maze.gif"))
|
|
||||||
|
|
||||||
= Secinājumi
|
|
||||||
== Rezultāti
|
|
||||||
|
|
||||||
- 3D spēle izmantojot Bevy un Rust:
|
|
||||||
- Procedurāla sešstūraina labirints ģenerēšana, izmantojot DFS.
|
|
||||||
- Izveidota atkārtoti lietojama atvērtā pirmkoda bibliotēka "hexlab".
|
|
||||||
- Efektīva līmeņa pārvaldība:
|
|
||||||
- Vienmērīga pāreja starp labirinta līmeņiem.
|
|
||||||
|
|
||||||
== Turpmākie darbi
|
|
||||||
|
|
||||||
- Īstenot vairāk labirintu ģenerēšanas paņēmienus/algoritmus.
|
|
||||||
- Ieviest jaunas mehānikas un papildspējas.
|
|
||||||
- Uzlabot vizuālo kvalitāti un spēlētāja izskatu.
|
|
||||||
- Izstrādāt daudzspēlētāju režīmu.
|
|
||||||
|
|
||||||
= Paldies par uzmanību!
|
|
||||||
|
|
||||||
Jautājumi?
|
|
||||||
|
|
||||||
#show: appendix
|
|
||||||
|
|
||||||
= Galavārds
|
|
||||||
== ECS vs OOP
|
|
||||||
#grid(
|
|
||||||
columns: (1fr, 1fr),
|
|
||||||
gutter: 1em,
|
|
||||||
[
|
|
||||||
*ECS*
|
|
||||||
- Plakana hierarhija
|
|
||||||
- Datu orientēta
|
|
||||||
- Kešatmiņai piemērots
|
|
||||||
- Paralēla apstrāde
|
|
||||||
],
|
|
||||||
[
|
|
||||||
*OOP*
|
|
||||||
- Dziļa mantojamība (inheritance)
|
|
||||||
- Objektorientēta
|
|
||||||
- Kešatmiņa izkliedēts
|
|
||||||
- Secīga apstrāde
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
== Iedvesma
|
|
||||||
#figure(
|
|
||||||
caption: link("https://www.redblobgames.com/grids/hexagons/"),
|
|
||||||
grid(
|
|
||||||
columns: 2,
|
|
||||||
figure(image("assets/images/redblogmages/axial-coords.png", height: 92%)),
|
|
||||||
figure(image("assets/videos/coords/coords.gif", height: 92%)),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
#import "@preview/dashy-todo:0.0.1"
|
|
||||||
#import "@preview/fletcher:0.5.3"
|
|
||||||
#import "@preview/headcount:0.1.0"
|
|
||||||
#import "@preview/i-figured:0.2.4"
|
|
||||||
#import "@preview/tablex:0.0.9"
|
|
||||||
#import "@preview/touying:0.5.5"
|
|
||||||
#import "@preview/wordometer:0.1.3"
|
|
||||||