diff --git a/docs/.obsidian/app.json b/docs/.obsidian/app.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/docs/.obsidian/app.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/docs/.obsidian/appearance.json b/docs/.obsidian/appearance.json new file mode 100644 index 0000000..c8c365d --- /dev/null +++ b/docs/.obsidian/appearance.json @@ -0,0 +1,3 @@ +{ + "accentColor": "" +} \ No newline at end of file diff --git a/docs/.obsidian/core-plugins-migration.json b/docs/.obsidian/core-plugins-migration.json new file mode 100644 index 0000000..436f43c --- /dev/null +++ b/docs/.obsidian/core-plugins-migration.json @@ -0,0 +1,30 @@ +{ + "file-explorer": true, + "global-search": true, + "switcher": true, + "graph": true, + "backlink": true, + "canvas": true, + "outgoing-link": true, + "tag-pane": true, + "properties": false, + "page-preview": true, + "daily-notes": true, + "templates": true, + "note-composer": true, + "command-palette": true, + "slash-command": false, + "editor-status": true, + "bookmarks": true, + "markdown-importer": false, + "zk-prefixer": false, + "random-note": false, + "outline": true, + "word-count": true, + "slides": false, + "audio-recorder": false, + "workspaces": false, + "file-recovery": true, + "publish": false, + "sync": false +} \ No newline at end of file diff --git a/docs/.obsidian/core-plugins.json b/docs/.obsidian/core-plugins.json new file mode 100644 index 0000000..9405bfd --- /dev/null +++ b/docs/.obsidian/core-plugins.json @@ -0,0 +1,20 @@ +[ + "file-explorer", + "global-search", + "switcher", + "graph", + "backlink", + "canvas", + "outgoing-link", + "tag-pane", + "page-preview", + "daily-notes", + "templates", + "note-composer", + "command-palette", + "editor-status", + "bookmarks", + "outline", + "word-count", + "file-recovery" +] \ No newline at end of file diff --git a/docs/.obsidian/hotkeys.json b/docs/.obsidian/hotkeys.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/docs/.obsidian/hotkeys.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/docs/.obsidian/workspace.json b/docs/.obsidian/workspace.json new file mode 100644 index 0000000..741c68f --- /dev/null +++ b/docs/.obsidian/workspace.json @@ -0,0 +1,155 @@ +{ + "main": { + "id": "c3b677b484e906ad", + "type": "split", + "children": [ + { + "id": "260f01404e0fb104", + "type": "tabs", + "children": [ + { + "id": "09a660b2d2a74b3d", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "Todos.md", + "mode": "source", + "source": false + } + } + } + ] + } + ], + "direction": "vertical" + }, + "left": { + "id": "111700e2d75b975d", + "type": "split", + "children": [ + { + "id": "a3085c0b85030b6f", + "type": "tabs", + "children": [ + { + "id": "b18342ed8266f48d", + "type": "leaf", + "state": { + "type": "file-explorer", + "state": { + "sortOrder": "alphabetical" + } + } + }, + { + "id": "276c6f0e87ce1b64", + "type": "leaf", + "state": { + "type": "search", + "state": { + "query": "", + "matchingCase": false, + "explainSearch": false, + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical" + } + } + }, + { + "id": "b451d453747a6ae6", + "type": "leaf", + "state": { + "type": "bookmarks", + "state": {} + } + } + ] + } + ], + "direction": "horizontal", + "width": 300 + }, + "right": { + "id": "49f6c1aa8bf5c5e1", + "type": "split", + "children": [ + { + "id": "f8b97180adc28552", + "type": "tabs", + "children": [ + { + "id": "62bc200aa6769bb4", + "type": "leaf", + "state": { + "type": "backlink", + "state": { + "file": "Todos.md", + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical", + "showSearch": false, + "searchQuery": "", + "backlinkCollapsed": false, + "unlinkedCollapsed": true + } + } + }, + { + "id": "98a550bcc8f7b176", + "type": "leaf", + "state": { + "type": "outgoing-link", + "state": { + "file": "Todos.md", + "linksCollapsed": false, + "unlinkedCollapsed": true + } + } + }, + { + "id": "8c1256f4be0cc8cf", + "type": "leaf", + "state": { + "type": "tag", + "state": { + "sortOrder": "frequency", + "useHierarchy": true + } + } + }, + { + "id": "3caebc2ca88144af", + "type": "leaf", + "state": { + "type": "outline", + "state": { + "file": "Todos.md" + } + } + } + ] + } + ], + "direction": "horizontal", + "width": 300, + "collapsed": true + }, + "left-ribbon": { + "hiddenItems": { + "switcher:Open quick switcher": false, + "graph:Open graph view": false, + "canvas:Create new canvas": false, + "daily-notes:Open today's daily note": false, + "templates:Insert template": false, + "command-palette:Open command palette": false + } + }, + "active": "09a660b2d2a74b3d", + "lastOpenFiles": [ + "Gameplay.md", + "Level 1.md", + "Todos.md" + ] +} \ No newline at end of file diff --git a/docs/Gameplay.md b/docs/Gameplay.md new file mode 100644 index 0000000..21dea6d --- /dev/null +++ b/docs/Gameplay.md @@ -0,0 +1,29 @@ + +# Objective +- Discover more of the map around you, covered by fog of war + - Bees must **explore** into the fog for those tiles to become visible and targeted in the future +- Interact with entities / points of interest in discovered view + - Some useful like *Flowers* whose pollen will help spawn more bees + - Some harmful which may kill bees + - Some act as objectives, which must be brought back to base to advance +- Balance between having some bees explore the map, interacting with entities, and and protecting the home hive from other threats? + +# Player Actions +- Highlight in a region bee to control + - Left / Right click and drag spawns a highlight box +- Selected bees can then preform bee specific actions + - Click on ground = move towards that world coordinate + - Click on level entity = group up at and interact with entity + - Click on wonder button = bees slowly disperse in local area + - Click on **explore** button = bees more aggressively + +# Bee Behavior + +```rust +enum BeeBehaviorState { + Traveling (Move twoards players location), + Wondering (Stay put in radius around self), + Exploring (Prioritize fog of war), + Amalgamate (Waiting for other bees to interact with an entity) +} +``` \ No newline at end of file diff --git a/docs/Level 1.md b/docs/Level 1.md new file mode 100644 index 0000000..cc951a0 --- /dev/null +++ b/docs/Level 1.md @@ -0,0 +1,5 @@ +The bees are hungry and need to fuel their way back home + + + +Objective: Get enough pollen to be able to lift the flag out of the literal ground as bees and bring it back to the hive. \ No newline at end of file diff --git a/docs/Todos.md b/docs/Todos.md new file mode 100644 index 0000000..3619543 --- /dev/null +++ b/docs/Todos.md @@ -0,0 +1,30 @@ +## Debug boids +- [ ] Spawn a debug boid after loading level. It should have a different texture and still considered a bee +- [ ] Show it's sight radius around it with a 2D shape +```rust +// Circle + commands.spawn(MaterialMesh2dBundle { + mesh: meshes.add(shape::Circle::new(50.).into()).into(), + material: materials.add(ColorMaterial::from(Color::PURPLE)), + transform: Transform::from_translation(Vec3::new(-150., 0., 0.)), + ..default() + }); +``` +- [ ] Verify that it's sight is only in a cone in front of the boid + - `Dot product(ourDirection, otherBoidDirection) > visionConeThreshold` + +- [ ] Verify separation works as intended. This may fix our stacking problem + - All boids in range exert an opposing direction, intensity that decreases with the distance of the two + +- [ ] How hard would it be to display the edges of our QuadTree as part of a toggable debug ui? + +## Boid gameplay +- [ ] Each boid should have a destination position that it tries to navigate towards, if in traveling state, instead of just forwards + +- [ ] Introduce collision avoidance for walls and fog of war if not exploring + - Fetch overlapping colliders in a radius and just like the separation rule, colliders exert an opposed direction + +- [ ] Steering / Fog of war rule + - Each tile has a discovered boolean, determining if it is in fog or not + - If an exploring bee touches an undiscovered tile, it toggles preeminently to discovered + - Add a separation rule just like for collisions, but attracted to undiscovered tiles \ No newline at end of file