Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark authored Aug 26, 2024
0 parents commit 9dc1a38
Show file tree
Hide file tree
Showing 132 changed files with 4,154 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @remarkablemark
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "weekly"
8 changes: 8 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pull_request_rules:
- name: automatic merge for Dependabot pull requests
conditions:
- author=dependabot[bot]
- check-success=build
actions:
merge:
method: squash
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: build
on: [push, pull_request]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Ren'Py
uses: remarkablegames/setup-renpy@v1
with:
web: true

- name: Build web
run: |
renpy-launcher web_build . --destination web
cp web-presplash.jpg web/web-presplash.jpg
- name: Deploy
if: github.ref_name == 'master'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: web

- name: Upload artifacts
if: github.ref_name == 'master'
uses: actions/upload-artifact@v4
with:
name: web_build
path: web
14 changes: 14 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: commitlint
on: [push, pull_request]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Commitlint
uses: remarkablemark/commitlint@v1
15 changes: 15 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: lint
on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Ren'Py
uses: remarkablegames/setup-renpy@v1

- name: Lint script
run: renpy-cli game lint
70 changes: 70 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: release-please
on:
push:
branches:
- master

permissions:
contents: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}

steps:
- name: Release Please
uses: googleapis/release-please-action@v4
id: release

deploy:
needs: release
runs-on: ubuntu-latest
if: ${{ needs.release.outputs.release_created }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Ren'Py
uses: remarkablegames/setup-renpy@v1
with:
web: true

- name: Remove extraneous files packages
run: rm -rf screenshots

- name: Build packages
run: renpy-launcher distribute . --dest ../dists

- name: Rename packages
run: |
# e.g., "../dists/psych-101-1.2.3-linux.tar.bz2" -> "../dists/linux.tar.bz2"
for filename in ../dists/*; do mv "$filename" "../dists/${filename##*-}"; done
- name: Build web
run: |
renpy-launcher web_build . --destination ../dists/web
cp web-presplash.jpg ../dists/web/web-presplash.jpg
- name: Setup butler
uses: remarkablegames/setup-butler@v1

# https://www.renpy.org/doc/html/build.html#var-build.itch_channels
- name: Upload to itch.io
run: |
for i in "web web" "linux.tar.bz2 linux" "mac.zip osx" "market.zip win-osx-linux" "pc.zip win-linux" "win.zip win"
do
set -- $i
butler push ../dists/$1 ${{ github.repository }}:$2 --userversion-file version.txt
done
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}

- name: Upload Release Artifact
run: gh release upload ${{ needs.release.outputs.tag_name }} $(ls ../dists/*.zip)
env:
GITHUB_TOKEN: ${{ github.token }}
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Ren'Py
saves/
tmp/

# Compiled source
*.pyc
*.rpyb
*.rpyc
*.rpymc
__pycache__/
cache/

# Log files
errors.txt
files.txt
log.txt
traceback.txt

# Generated by MacOS
.DS_Store

# Vim
*.swp
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.0.0-alpha"
}
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2024 Menglin "Mark" Xu <mark@remarkablemark.org>

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.
90 changes: 90 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<p align="center">
<img src="https://raw.githubusercontent.com/remarkablegames/renpy-template/master/game/gui/window_icon.png" alt="Ren'Py Template">
</p>

# renpy-template

![release](https://img.shields.io/github/v/release/remarkablegames/renpy-template)
[![build](https://github.com/remarkablegames/renpy-template/actions/workflows/build.yml/badge.svg)](https://github.com/remarkablegames/renpy-template/actions/workflows/build.yml)
[![lint](https://github.com/remarkablegames/renpy-template/actions/workflows/lint.yml/badge.svg)](https://github.com/remarkablegames/renpy-template/actions/workflows/lint.yml)

📖 Write visual novels with Ren'Py Template.

Play the game on:

- [remarkablegames](https://remarkablegames.org/renpy-template)

## Prerequisites

Download [Ren'Py SDK](https://www.renpy.org/latest.html):

```sh
git clone https://github.com/remarkablegames/renpy-sdk.git
```

Symlink `renpy`:

```sh
sudo ln -sf "$(realpath renpy-sdk/renpy.sh)" /usr/local/bin/renpy
```

## Install

Clone the repository to the `Projects Directory`:

```sh
git clone https://github.com/remarkablegames/renpy-template.git
cd renpy-template
```

Rename the project:

```sh
git grep -l 'Renpy Template' | xargs sed -i '' -e 's/Renpy Template/My Novel/g'
```

```sh
git grep -l 'renpy-template' | xargs sed -i '' -e 's/renpy-template/my-novel/g'
```

Replace the assets:

- `web-presplash.jpg`
- `game/gui/main_menu.png`
- `game/gui/window_icon.png`

## Run

Launch the project:

```sh
renpy .
```

Or open the `Ren'Py Launcher`:

```sh
renpy
```

Press `Shift`+`R` to reload the game.

Press `Shift`+`D` to display the developer menu.

Clean the cache:

```sh
find game -name "*.rpyc" -delete
```

## Lint

Lint the game:

```sh
renpy game lint
```

## License

[MIT](LICENSE)
Binary file added game/audio/click_003.ogg
Binary file not shown.
Binary file added game/audio/drop_002.ogg
Binary file not shown.
Binary file added game/audio/drop_003.ogg
Binary file not shown.
Binary file added game/audio/drop_004.ogg
Binary file not shown.
Binary file added game/audio/mouseclick1.ogg
Binary file not shown.
Binary file added game/audio/mouserelease1.ogg
Binary file not shown.
Binary file added game/audio/rollover2.ogg
Binary file not shown.
Binary file added game/audio/switch13.ogg
Binary file not shown.
Binary file added game/audio/switch29.ogg
Binary file not shown.
Binary file added game/audio/switch37.ogg
Binary file not shown.
Loading

0 comments on commit 9dc1a38

Please sign in to comment.