Skip to content

Commit edb8186

Browse files
authored
feat: complete Phase 1 — procedural terrain generation
Terrain pipeline - Seeded simplex noise producing elevation, temperature & humidity fields - 26-biome classifier with per-tile noise jitter for organic boundaries - Minecraft-style noise zero-crossing rivers (primary + secondary) with domain warping, shore taper and mountain cutoff - Strategic point detection: river crossings, mountain passes, straits, peninsulas scored 0–10 Rendering & UI - Chunked ImageBitmap renderer with viewport culling and alpha:false ctx - Camera with pan (drag) and zoom-to-cursor (scroll wheel) - Five overlay modes (elevation, temperature, humidity, biome, strategic) switchable via bottom toolbar with SVG icons or keyboard shortcuts - Spatial-hash grid for O(1) strategic tooltip lookups - Precomputed chunk layout so view switching swaps bitmaps without recalculating positions - Full-screen canvas with backdrop-blur toolbar Infrastructure - Electron + Vite dual-target build (desktop & web) - GitHub Actions: CI (lint + typecheck + build), Pages deploy, release (Windows/macOS/Linux) - Issue templates (bug report, feature request), PR template, dependabot - SCSS theme system with design tokens, mixins and component styles - JSDoc module headers with @example blocks on every source file - Central Config.ts with all tunable parameters documented
1 parent 890f0bb commit edb8186

48 files changed

Lines changed: 13504 additions & 0 deletions

Some content is hidden

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

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [CodeByBryant]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug or unexpected behaviour
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Description
10+
11+
A clear and concise description of the bug.
12+
13+
## Steps to Reproduce
14+
15+
1. Go to '...'
16+
2. Click on '...'
17+
3. See error
18+
19+
## Expected Behaviour
20+
21+
What you expected to happen.
22+
23+
## Actual Behaviour
24+
25+
What actually happened. Include error messages or console output if available.
26+
27+
## Screenshots
28+
29+
If applicable, add screenshots or recordings.
30+
31+
## Environment
32+
33+
- **OS**: (e.g. Windows 11, macOS 14, Ubuntu 24.04)
34+
- **App version**: (e.g. 0.1.0 or commit hash)
35+
- **Runtime**: Electron desktop / Web browser (name & version)
36+
- **Node.js**: (output of `node -v`)
37+
38+
## Additional Context
39+
40+
Any other details — related issues, config changes, etc.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Discussions
4+
url: https://github.com/CodeByBryant/Sovereign/discussions
5+
about: Ask questions and share ideas in Discussions
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea or improvement
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Problem / Motivation
10+
11+
A clear description of the problem this feature would solve.
12+
Example: _I'm frustrated when [...]_
13+
14+
## Proposed Solution
15+
16+
Describe the solution you'd like to see.
17+
18+
## Alternatives Considered
19+
20+
Any alternative solutions or features you've thought about.
21+
22+
## Additional Context
23+
24+
Mockups, screenshots, links to similar features in other projects, etc.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Summary
2+
3+
<!-- What does this PR do? Keep it brief. -->
4+
5+
## Changes
6+
7+
-
8+
9+
## Related Issues
10+
11+
<!-- Link any related issues: Closes #123, Fixes #456 -->
12+
13+
## Type of Change
14+
15+
- [ ] Bug fix (non-breaking change that fixes an issue)
16+
- [ ] New feature (non-breaking change that adds functionality)
17+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
18+
- [ ] Refactor / cleanup (no functional changes)
19+
- [ ] Documentation update
20+
21+
## Checklist
22+
23+
- [ ] Code compiles without errors (`npm run build:web`)
24+
- [ ] Linting passes (`npm run lint`)
25+
- [ ] Type checking passes (`npm run typecheck`)
26+
- [ ] Tested locally in both Electron and web modes
27+
- [ ] Updated documentation / JSDoc where applicable

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'npm'
4+
directory: '/'
5+
schedule:
6+
interval: 'weekly'
7+
commit-message:
8+
prefix: 'deps'
9+
include: 'scope'
10+
versioning-strategy: 'auto'
11+
labels:
12+
- 'dependencies'
13+
open-pull-requests-limit: 10
14+
15+
- package-ecosystem: 'github-actions'
16+
directory: '/'
17+
schedule:
18+
interval: 'monthly'
19+
commit-message:
20+
prefix: 'ci'
21+
labels:
22+
- 'ci'

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Continuous Integration
2+
name: CI
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
lint-and-build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '20'
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Run linting
30+
run: npm run lint
31+
32+
- name: Run type checking
33+
run: npm run typecheck
34+
35+
- name: Build web version
36+
run: npm run build:web

.github/workflows/deploy-web.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Deploy web version to GitHub Pages
2+
name: Deploy to GitHub Pages
3+
4+
on:
5+
push:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: 'pages'
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
cache: 'npm'
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Build web version
35+
run: npm run build:web
36+
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v4
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: './dist'
44+
45+
deploy:
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
runs-on: ubuntu-latest
50+
needs: build
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

.github/workflows/release.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Build and release desktop apps
2+
name: Build & Release
3+
4+
on:
5+
release:
6+
types: [published]
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Version tag (e.g., v1.0.0)'
11+
required: false
12+
default: ''
13+
14+
permissions:
15+
contents: write
16+
17+
jobs:
18+
build-windows:
19+
runs-on: windows-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '20'
28+
cache: 'npm'
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build Windows app
34+
run: npm run build:win
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Upload Windows artifacts
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: windows-release
42+
path: |
43+
release/*.exe
44+
release/*.msi
45+
retention-days: 30
46+
47+
- name: Upload to Release
48+
if: github.event_name == 'release'
49+
uses: softprops/action-gh-release@v1
50+
with:
51+
files: |
52+
release/*.exe
53+
release/*.msi
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
57+
build-linux:
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Checkout
61+
uses: actions/checkout@v4
62+
63+
- name: Setup Node.js
64+
uses: actions/setup-node@v4
65+
with:
66+
node-version: '20'
67+
cache: 'npm'
68+
69+
- name: Install dependencies
70+
run: npm ci
71+
72+
- name: Build Linux app
73+
run: npm run build:linux
74+
env:
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
77+
- name: Upload Linux artifacts
78+
uses: actions/upload-artifact@v4
79+
with:
80+
name: linux-release
81+
path: |
82+
release/*.AppImage
83+
release/*.deb
84+
release/*.snap
85+
retention-days: 30
86+
87+
- name: Upload to Release
88+
if: github.event_name == 'release'
89+
uses: softprops/action-gh-release@v1
90+
with:
91+
files: |
92+
release/*.AppImage
93+
release/*.deb
94+
release/*.snap
95+
env:
96+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97+
98+
build-macos:
99+
runs-on: macos-latest
100+
steps:
101+
- name: Checkout
102+
uses: actions/checkout@v4
103+
104+
- name: Setup Node.js
105+
uses: actions/setup-node@v4
106+
with:
107+
node-version: '20'
108+
cache: 'npm'
109+
110+
- name: Install dependencies
111+
run: npm ci
112+
113+
- name: Build macOS app
114+
run: npm run build:mac
115+
env:
116+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117+
118+
- name: Upload macOS artifacts
119+
uses: actions/upload-artifact@v4
120+
with:
121+
name: macos-release
122+
path: |
123+
release/*.dmg
124+
release/*.zip
125+
retention-days: 30
126+
127+
- name: Upload to Release
128+
if: github.event_name == 'release'
129+
uses: softprops/action-gh-release@v1
130+
with:
131+
files: |
132+
release/*.dmg
133+
release/*.zip
134+
env:
135+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)