Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdubbelboer committed Oct 3, 2023
0 parents commit 84862c7
Show file tree
Hide file tree
Showing 66 changed files with 7,131 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}
1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
last 2 versions, not dead, > 1%
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
public/index.js
public/menu.js
10 changes: 10 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"parser": "@babel/eslint-parser",
"extends": ["eslint:recommended", "prettier"],
"env": {
"browser": true
},
"globals": {
"PokiSDK": "readonly"
}
}
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build and Deploy
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Install and Build 🔧
run: |
yarn install --frozen-lockfile
yarn build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
dist/
node_modules/
public/index.js
public/index.js.map
public/menu.js
public/menu.js.map
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
public/
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"tabWidth": 4,
"useTabs": false,
"printWidth": 140
}
6 changes: 6 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "stylelint-config-standard",
"rules": {
"no-descending-specificity": null
}
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Erik Dubbelboer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Poki PixiJS Template

Welcome to the **poki-pixijs-template**! This is a quick and dirty template to help developers swiftly build hypercasual PixiJS games.

## Philosophy

The idea behind this template is to support short-term projects that span a couple of months. The aim is to maintain a high project velocity. You should be able to keep everything in mind without heavily structuring your code. Think of it as "move fast and maybe break things", but with fun.

## Features

- **Progressive Loading**: The game menu loads first, making initial user interaction swift.
- **Optimized Assets**: The template supports various image and audio formats, ensuring the smallest asset size.
- **Image Spritesheet**: The template leverages [TexturePacker](https://www.codeandweb.com/texturepacker) to combine all images into a spritesheet.
- **HTML UI**: By default, the game uses HTML for the menu and in-game UI. However, PixiJS can also be utilized for this.
- **Audio Integration**: [howler.js](https://github.com/goldfire/howler.js) is used for game sounds and a native Audio element for music streaming.

## File Structure

Here's a brief overview of the project's file structure:

- **Configuration**: `.babelrc`, `.browserslistrc`, `.eslint*`, `.prettier*`, `.stylelintrc.json`, `rollup.config.mjs`, `package.json`
- **Art Assets**: Inside the `images/` directory.
- **Web Assets**: Housed in the `public/` directory.
- **Game Logic & Modules**: All `.js` files within the `src/` directory.
- **Helpers**: `updateimages.sh`, `updatesouds.sh`
- **Dependencies**: `yarn.lock`

## Getting Started

1. Clone this repository:

```bash
git clone git@github.com:erikdubbelboer/poki-pixijs-template.git
cd poki-pixijs-topdown-template
```

2. Install dependencies:

```bash
yarn install
```

3. Start the development server:

```bash
yarn watch
```

4. For production, build the game:
```bash
yarn build
```
This will produce a `dist` directory that can be uploaded to the [Poki Inspector](https://inspector.poki.dev/) or [Poki for Developers](https://app.poki.dev/).

## Contribution

Feel free to dive in! Open an issue, submit a PR, or provide suggestions to improve the template.

## License & Credits

Please check `credits.txt` for the example game assets' credits. The codebase itself is under the MIT License.

---

Happy game building! Hope this template helps streamline your development process and lets you focus on making games fun.
5 changes: 5 additions & 0 deletions credits.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Art by Kenney Vleugels (Kenney.nl)

Music: Battle Loop by Alexander Nakarada (www.creatorchords.com)
Licensed under Creative Commons BY Attribution 4.0 License
https://creativecommons.org/licenses/by/4.0/
Binary file added images/asteroid0.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/asteroid1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/asteroid2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/asteroid3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/exchaust.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/laser.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/particle.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 84862c7

Please sign in to comment.