init
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/node_modules/
|
||||
/public/build/
|
||||
|
||||
.DS_Store
|
7
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"cSpell.words": [
|
||||
"Alea",
|
||||
"amogus",
|
||||
"PIXI"
|
||||
]
|
||||
}
|
107
README.md
Normal file
@ -0,0 +1,107 @@
|
||||
# This repo is no longer maintained. Consider using `npm init vite` and selecting the `svelte` option or — if you want a full-fledged app framework — use [SvelteKit](https://kit.svelte.dev), the official application framework for Svelte.
|
||||
|
||||
---
|
||||
|
||||
# svelte app
|
||||
|
||||
This is a project template for [Svelte](https://svelte.dev) apps. It lives at https://github.com/sveltejs/template.
|
||||
|
||||
To create a new project based on this template using [degit](https://github.com/Rich-Harris/degit):
|
||||
|
||||
```bash
|
||||
npx degit sveltejs/template svelte-app
|
||||
cd svelte-app
|
||||
```
|
||||
|
||||
*Note that you will need to have [Node.js](https://nodejs.org) installed.*
|
||||
|
||||
|
||||
## Get started
|
||||
|
||||
Install the dependencies...
|
||||
|
||||
```bash
|
||||
cd svelte-app
|
||||
npm install
|
||||
```
|
||||
|
||||
...then start [Rollup](https://rollupjs.org):
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Navigate to [localhost:8080](http://localhost:8080). You should see your app running. Edit a component file in `src`, save it, and reload the page to see your changes.
|
||||
|
||||
By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the `sirv` commands in package.json to include the option `--host 0.0.0.0`.
|
||||
|
||||
If you're using [Visual Studio Code](https://code.visualstudio.com/) we recommend installing the official extension [Svelte for VS Code](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode). If you are using other editors you may need to install a plugin in order to get syntax highlighting and intellisense.
|
||||
|
||||
## Building and running in production mode
|
||||
|
||||
To create an optimised version of the app:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
You can run the newly built app with `npm run start`. This uses [sirv](https://github.com/lukeed/sirv), which is included in your package.json's `dependencies` so that the app will work when you deploy to platforms like [Heroku](https://heroku.com).
|
||||
|
||||
|
||||
## Single-page app mode
|
||||
|
||||
By default, sirv will only respond to requests that match files in `public`. This is to maximise compatibility with static fileservers, allowing you to deploy your app anywhere.
|
||||
|
||||
If you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for *any* path. You can make it so by editing the `"start"` command in package.json:
|
||||
|
||||
```js
|
||||
"start": "sirv public --single"
|
||||
```
|
||||
|
||||
## Using TypeScript
|
||||
|
||||
This template comes with a script to set up a TypeScript development environment, you can run it immediately after cloning the template with:
|
||||
|
||||
```bash
|
||||
node scripts/setupTypeScript.js
|
||||
```
|
||||
|
||||
Or remove the script via:
|
||||
|
||||
```bash
|
||||
rm scripts/setupTypeScript.js
|
||||
```
|
||||
|
||||
If you want to use `baseUrl` or `path` aliases within your `tsconfig`, you need to set up `@rollup/plugin-alias` to tell Rollup to resolve the aliases. For more info, see [this StackOverflow question](https://stackoverflow.com/questions/63427935/setup-tsconfig-path-in-svelte).
|
||||
|
||||
## Deploying to the web
|
||||
|
||||
### With [Vercel](https://vercel.com)
|
||||
|
||||
Install `vercel` if you haven't already:
|
||||
|
||||
```bash
|
||||
npm install -g vercel
|
||||
```
|
||||
|
||||
Then, from within your project folder:
|
||||
|
||||
```bash
|
||||
cd public
|
||||
vercel deploy --name my-project
|
||||
```
|
||||
|
||||
### With [surge](https://surge.sh/)
|
||||
|
||||
Install `surge` if you haven't already:
|
||||
|
||||
```bash
|
||||
npm install -g surge
|
||||
```
|
||||
|
||||
Then, from within your project folder:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
surge public my-project.surge.sh
|
||||
```
|
2553
package-lock.json
generated
Normal file
35
package.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "svelte-app",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"dev": "rollup -c -w",
|
||||
"start": "sirv public --no-clear"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^24.0.0",
|
||||
"@rollup/plugin-node-resolve": "^15.0.0",
|
||||
"@rollup/plugin-terser": "^0.4.0",
|
||||
"@tsconfig/svelte": "^5.0.4",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"postcss": "^8.4.38",
|
||||
"rollup": "^3.15.0",
|
||||
"rollup-plugin-css-only": "^4.3.0",
|
||||
"rollup-plugin-livereload": "^2.0.0",
|
||||
"rollup-plugin-svelte": "^7.1.2",
|
||||
"svelte": "^3.55.0",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"tslib": "^2.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@rollup/plugin-typescript": "^11.1.6",
|
||||
"alea": "^1.0.1",
|
||||
"howler": "^2.2.4",
|
||||
"mathjs": "^12.4.1",
|
||||
"noisejs": "^2.1.0",
|
||||
"sirv-cli": "^2.0.0",
|
||||
"svelte-preprocess": "^5.1.3"
|
||||
}
|
||||
}
|
6
postcss.config.cjs
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('tailwindcss')('./tailwind.config.js'),
|
||||
require('autoprefixer')
|
||||
],
|
||||
};
|
BIN
public/assets/images/amogus.png
Normal file
After Width: | Height: | Size: 281 B |
BIN
public/assets/images/amogus_b.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
public/assets/images/amogus_g.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
public/assets/images/amogus_gb.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
public/assets/images/amogus_p.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
public/assets/images/buildings/buildings.png
Normal file
After Width: | Height: | Size: 1013 B |
BIN
public/assets/images/selection.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
public/assets/images/world/vegetation_ts.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
public/assets/images/world/world_terrain_atlas.png
Normal file
After Width: | Height: | Size: 630 B |
BIN
public/assets/sound/chip_loop.mp3
Normal file
BIN
public/favicon.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
1
public/global.css
Normal file
@ -0,0 +1 @@
|
||||
|
21
public/index.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
|
||||
<title>Amogus factory</title>
|
||||
|
||||
<link rel="icon" type="image/png" href="/favicon.png" />
|
||||
<link rel="stylesheet" href="/global.css" />
|
||||
<link rel="stylesheet" href="/build/bundle.css" />
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=VT323&display=swap" rel="stylesheet" />
|
||||
|
||||
<script defer src="/build/bundle.js"></script>
|
||||
</head>
|
||||
|
||||
<body></body>
|
||||
</html>
|
BIN
resources/MiniWorldSprites/AllAssetsPreview.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
resources/MiniWorldSprites/Animals/Boar.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
resources/MiniWorldSprites/Animals/Chick.png
Normal file
After Width: | Height: | Size: 994 B |
BIN
resources/MiniWorldSprites/Animals/Chicken.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
resources/MiniWorldSprites/Animals/HornedSheep.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
resources/MiniWorldSprites/Animals/Horse(32x32).png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
resources/MiniWorldSprites/Animals/MarineAnimals.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
resources/MiniWorldSprites/Animals/Pig.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
resources/MiniWorldSprites/Animals/Sheep.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
resources/MiniWorldSprites/Buildings/Cyan/CyanBarracks.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
resources/MiniWorldSprites/Buildings/Cyan/CyanChapels.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
resources/MiniWorldSprites/Buildings/Cyan/CyanDocks.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
resources/MiniWorldSprites/Buildings/Cyan/CyanHouses.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
resources/MiniWorldSprites/Buildings/Cyan/CyanHuts.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
resources/MiniWorldSprites/Buildings/Cyan/CyanKeep.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
resources/MiniWorldSprites/Buildings/Cyan/CyanMarket.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
resources/MiniWorldSprites/Buildings/Cyan/CyanResources.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
resources/MiniWorldSprites/Buildings/Cyan/CyanShip.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
resources/MiniWorldSprites/Buildings/Cyan/CyanTaverns.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
resources/MiniWorldSprites/Buildings/Cyan/CyanTower.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
resources/MiniWorldSprites/Buildings/Cyan/CyanWell.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
resources/MiniWorldSprites/Buildings/Cyan/CyanWorkshops.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
resources/MiniWorldSprites/Buildings/Enemy/Mausoleum.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 20 KiB |
BIN
resources/MiniWorldSprites/Buildings/Enemy/SpearWall.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
resources/MiniWorldSprites/Buildings/Lime/LimeBarracks.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
resources/MiniWorldSprites/Buildings/Lime/LimeChapels.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
resources/MiniWorldSprites/Buildings/Lime/LimeDocks.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
resources/MiniWorldSprites/Buildings/Lime/LimeHouses.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
resources/MiniWorldSprites/Buildings/Lime/LimeHuts.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
resources/MiniWorldSprites/Buildings/Lime/LimeKeep.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
resources/MiniWorldSprites/Buildings/Lime/LimeMarket.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
resources/MiniWorldSprites/Buildings/Lime/LimeResources.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
resources/MiniWorldSprites/Buildings/Lime/LimeShip.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
resources/MiniWorldSprites/Buildings/Lime/LimeTaverns.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
resources/MiniWorldSprites/Buildings/Lime/LimeTower.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
resources/MiniWorldSprites/Buildings/Lime/LimeWell.png
Normal file
After Width: | Height: | Size: 7.9 KiB |
BIN
resources/MiniWorldSprites/Buildings/Lime/LimeWorkshops.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
resources/MiniWorldSprites/Buildings/Purple/PurpleBarracks.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
resources/MiniWorldSprites/Buildings/Purple/PurpleChapels.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
resources/MiniWorldSprites/Buildings/Purple/PurpleDocks.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
resources/MiniWorldSprites/Buildings/Purple/PurpleHouses.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
resources/MiniWorldSprites/Buildings/Purple/PurpleHuts.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
resources/MiniWorldSprites/Buildings/Purple/PurpleKeep.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
resources/MiniWorldSprites/Buildings/Purple/PurpleMarket.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
resources/MiniWorldSprites/Buildings/Purple/PurpleResources.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
resources/MiniWorldSprites/Buildings/Purple/PurpleShip.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
BIN
resources/MiniWorldSprites/Buildings/Purple/PurpleTaverns.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
resources/MiniWorldSprites/Buildings/Purple/PurpleTower.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
resources/MiniWorldSprites/Buildings/Purple/PurpleWell.png
Normal file
After Width: | Height: | Size: 8.0 KiB |
BIN
resources/MiniWorldSprites/Buildings/Purple/PurpleWorkshops.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
resources/MiniWorldSprites/Buildings/Red/RedBarracks.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
resources/MiniWorldSprites/Buildings/Red/RedChapels.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
resources/MiniWorldSprites/Buildings/Red/RedDocks.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
resources/MiniWorldSprites/Buildings/Red/RedHouses.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
resources/MiniWorldSprites/Buildings/Red/RedHuts.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
resources/MiniWorldSprites/Buildings/Red/RedKeep.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
resources/MiniWorldSprites/Buildings/Red/RedMarket.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
resources/MiniWorldSprites/Buildings/Red/RedResources.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
resources/MiniWorldSprites/Buildings/Red/RedShip.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
BIN
resources/MiniWorldSprites/Buildings/Red/RedTaverns.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
resources/MiniWorldSprites/Buildings/Red/RedTower.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
resources/MiniWorldSprites/Buildings/Red/RedWell.png
Normal file
After Width: | Height: | Size: 8.0 KiB |
BIN
resources/MiniWorldSprites/Buildings/Red/RedWorkshops.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
resources/MiniWorldSprites/Buildings/Wood/Barracks.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
resources/MiniWorldSprites/Buildings/Wood/CaveV2.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
resources/MiniWorldSprites/Buildings/Wood/Chapels.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
resources/MiniWorldSprites/Buildings/Wood/Docks.png
Normal file
After Width: | Height: | Size: 8.9 KiB |
BIN
resources/MiniWorldSprites/Buildings/Wood/Houses.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
resources/MiniWorldSprites/Buildings/Wood/Huts.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
resources/MiniWorldSprites/Buildings/Wood/Keep.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
resources/MiniWorldSprites/Buildings/Wood/Market.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
resources/MiniWorldSprites/Buildings/Wood/Resources.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
resources/MiniWorldSprites/Buildings/Wood/Taverns.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
resources/MiniWorldSprites/Buildings/Wood/Tower.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
resources/MiniWorldSprites/Buildings/Wood/Tower2.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
resources/MiniWorldSprites/Buildings/Wood/Workshops.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
resources/MiniWorldSprites/Characters/Champions/Arthax.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/MiniWorldSprites/Characters/Champions/Börg.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
resources/MiniWorldSprites/Characters/Champions/Gangblanc.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
resources/MiniWorldSprites/Characters/Champions/Grum.png
Normal file
After Width: | Height: | Size: 5.4 KiB |