Skip to content

Commit

Permalink
Merge branch 'release/v2.3-sprite-anim'
Browse files Browse the repository at this point in the history
  • Loading branch information
hsandt committed May 16, 2019
2 parents bf59e6b + 83d96af commit e80e717
Show file tree
Hide file tree
Showing 98 changed files with 8,500 additions and 4,327 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
/intermediate
/build

# Log
/log

# Backup
/backup

Expand Down
8 changes: 4 additions & 4 deletions .luacov_all
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
return {

include = {
"src",
"tests/bustedhelper",
"tests/pico8api"
"src"
},

exclude = {
"src/engine/tests",
"src/engine/wtk",
"src/game/itests",
"src/game/test_data"
"src/game/test_data",
"src/game/tests"
}

}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ os:
- linux

env:
- LUA="lua 5.3" BUILD_VERSION="2.2"
- LUA="lua 5.3" BUILD_VERSION="2.3"

cache:
apt: true # private repositories only
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Long Nguyen Huu
Copyright (c) 2018-2019 Long Nguyen Huu

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
42 changes: 35 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ A partial clone of classic Sonic the Hedgehog games made with PICO-8

## Features

Version: 2.2
Version: 2.3

### Physics

* Character runs on flat ground and slopes
* Character is blocked by walls when running
* Character is blocked by walls when running, walls and ceiling when jumping
* Character jumps with variable height

### Rendering

* Character rendered with Idle and Spin sprite
* Character rendered with Idle and Spin static sprite, Run animated sprite
* Environment rendered with tilemap

## Build
Expand Down Expand Up @@ -56,13 +56,15 @@ It will install `luamin` (along with `luaparse`), which is used in `npm/luamin_f

### Build and run

First, make sure the `pico8` executable is in your path.

The most straightforward way to build and run the game on Unix platforms is:

* `cd path/to/sonic-pico8-repo`
* `./build.sh main release`
* `./run.sh main release`

or, if `pico8` is not in your path:
Instead of the last instruction, you can also enter directly:

* `pico8 -run build/sonic-pico8_v${BUILD_VERSION}_release.p8`

Expand Down Expand Up @@ -115,9 +117,31 @@ Those tests need to be built with picotool and run with PICO-8. We recommend the
* `./build.sh itestplayercharacter itest_light`
* `./run.sh itestplayercharacter itest_light`

### New project
## Modding

You can modify the spritesheet used in the build pipeline by running the custom Sublime Text build command `p8tool: edit data`, or in the shell: `pico8 -run data/data.p8`.

This will open the cartridge `data.p8` in PICO-8. This cartridge contains only assets, and no code at all. Make your changes, save the cartridge, then build the project to see your result.

For fast iterations, you can also directly modify assets while running the built game, but remember your changes are temporary and will be overwritten by the next build. To preserve your changes, you must save the cartridge, open it and copy the data parts (`__gfx__`, `__gff__`, `__map__`, `__sfx__` and `__music__`) and replace them in `data.p8` manually.

Alternatively, to edit the spritesheet in your favorite editor:

1. Export it from PICO-8 with the PICO-8 command `export spritesheet.png`
2. Edit it in your favorite editor
3. Import it back to PICO-8 with the PICO-8 command `import spritesheet.png`

## Development

If you use the scripts of this project to create a new game, in order to use build command *p8tool: edit data* you need to create a pico8 file at data/data.p8 first. To do this, open PICO-8, type *save data*, then copy the boilerplate file to data/data.p8.
### Documentation

Most of the documentation lies in code comment.

`<fun1, fun2>` means a duck-typed object that must implement functions named `fun1` and `fun2`

## New project

If you use the scripts of this project to create a new game, in order to use build command `p8tool: edit data` you need to create a pico8 file at data/data.p8 first. To do this, open PICO-8, type `save data`, then copy the boilerplate file to data/data.p8.

## Runtime third-party libraries

Expand Down Expand Up @@ -163,6 +187,10 @@ The `npm` folder has its own MIT license because I adapted a script from the `lu

### Assets

Most assets are derivative works of Sonic the Hedgehog, SEGA, especially the Master System and Mega Drive games. They have been created, either manually or with a conversion tool, for demonstration purpose. BGMs have been converted from Master System midi rips to PICO-8 format with [midi2pico](https://github.com/gamax92/midi2pico). I only retain copyright for the manual work of adaptation.
Most assets are derivative works of Sonic the Hedgehog (SEGA), especially the Master System and Mega Drive games. They have been created, either manually or with a conversion tool, for demonstration purpose. BGMs have been converted from Master System midi rips to PICO-8 format with [midi2pico](https://github.com/gamax92/midi2pico), an automated music format converter.

SEGA owns the Sonic the Hedgehog trademark and retains all copyrights on the original assets.

I only retain copyright for the manual work of adaptation (i.e. pixel art, but not music).

Assets that are not derivative works are under CC BY 4.0.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ minify=true

while [ "$1" != "" ]; do
case $1 in
-m | --no-minify ) shift
-m | --no-minify ) shift
minify=false
;;
* ) echo "unknown option: $1"
Expand Down
Loading

0 comments on commit e80e717

Please sign in to comment.