Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
GOB52 committed Apr 30, 2022
2 parents 022b27d + 3034a26 commit 0754093
Show file tree
Hide file tree
Showing 83 changed files with 8,754 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@
*.exe
*.out
*.app

# VsCode/PlatformIO
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch
200 changes: 200 additions & 0 deletions HowToMakeResources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
# How to make resources

**Since we cannot release the resources due to rights issues,**
we will provide information on how to make your own.
<ins>**We do not accept questions about resources, please be patient.**</ins>

## Overview
Resources required in the game are loaded from the SD card (exclude font source file).
Please place each resource in the designated location.

## Bitmap font entity source file
The df88_font entity must be prepared.
Source will comile and put to PROGMEM.

see also df88.hpp
```
extern const ::lgfx::GFXfont df88_gfx_font;
```

### Filename
Source : df88.cpp
Put source to ./src

### Font source image
ASCII CODE from 0x20 to 0x5F
```
'"#$%&'()*+,-./0123456789:;<=>?©ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
```
### Remarks
You can use [make_lgfxbmpfont.py](https://github.com/GOB52/bitmap_tools) to make source file from bitmap.

### e.g.

```C++
#include <pgmspace.h>
#include <cstddef>
#include <cstdint>
#include "df88.hpp"

static const std::uint8_t df88_bitmaps[] PROGMEM =
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ' '
0x1c,......
.
.
.

};
static const lgfx::GFXglyph df88_glyphs[] PROGMEM =
{
{ 0, 8, 8, 8, 0, -8 }, //' '
{ 8, 8, 8, 8, 0, -8 }, //'!'
.
.
.
};

const lgfx::GFXfont df88_font PROGMEM =
{
(std::uint8_t*)df88_bitmaps,
(lgfx::GFXglyph*)df88_glyphs,
0x20, // ' '
0x5f, // '_'
8,
};
```

## Graphics resources

### Format
Windows bitmap(v3) 4bit depth 16 colors.
Palette index 0 is transparent palette, so you can set 15 colors freely each bitmaps.

### Location
/res/td/

### Remarks
You can use [reorder_palette.py](https://github.com/GOB52/bitmap_tools) to sort the bitmap palette colors.

### Elements

#### Advertise
##### Logo
Filename: "logo.bmp"
Width: 224 Height: 64
![logo.bmp](./doc/logo_sample.png)

#### Character
##### My ship
Player ship and bullet.
Filename: "sh.bmp"
Width: 88 Height: 32
![sh.bmp](./doc/sh_sample.png)

##### Enemy
Mine, Yazuka, and Crash
Filename: "enemy.bmp"
Width: 96 Height: 48
![enemy.bmp](./doc/enemy_sample.png)

#### Background
##### Wave and spot
Filename: "bg0.bmp"
Width: 64 Height: 160
Wave cloud patern that horizontal direction must be connected bg0 anf bg1.
No transparent.
Those palette colors must exists in bitmap for animate palette.
![#306040](https://via.placeholder.com/15/306040/000000?text=+) `RGB(48,96,64)`
![#48A068](https://via.placeholder.com/15/48a068/000000?text=+) `RGB(72,160,104)`
![#70E090](https://via.placeholder.com/15/70E090/000000?text=+) `RGB(112,224,144)`

![bg0.bmp](./doc/bg0_sample.png)

Filename: "bg1.bmp"
Width: 96 Height: 160
Great spot patern that horizontal direction must be connected bg0 and bg1.
No transparent.
Those palette colors must exists in bitmap for animate palette.
![#306040](https://via.placeholder.com/15/306040/000000?text=+) `RGB(48,96,64)`
![#48A068](https://via.placeholder.com/15/48a068/000000?text=+) `RGB(72,160,104)`
![#70E090](https://via.placeholder.com/15/70E090/000000?text=+) `RGB(112,224,144)`

![bg1.bmp](./doc/bg1_sample.png)

##### Rock surface
Upper/lower rock surfaces.
Filename: "rock.bmp"
Width: 320 Height: 16
Rock surface that that horizontal direction must be connected.
No transparent.
![bg0.bmp](./doc/rock_sample.png)

##### Branch rock
Using when choose next stage.
Filename: "branch.bmp"
Width: 160 Height: 16
Branch rock that that horizontal direction must be connected.
![branch.bmp](./doc/branch_sample.png)

#### Information
##### Frame for zone,remaining
For information.
Filename: "zone.bmp"
Width: 80 Height: 40
No transparent.
![zone.bmp](./doc/zone_sample.png)

#### Effect
##### Explosion
Filename: "bomb.bmp"
Width: 256 Height: 64
![bomb.bmp](./doc/bomb_sample.png)

#### Boss
##### Coelacanth
Body,parts and bullet.
Filename: "kf.bmp"
Width: 224 Height: 232
Those palette colors must exists in bitmap.
Palette of colors will be grayscaled when the boss appears, leaves, and escapes.
![#00185a](https://via.placeholder.com/15/00185a/000000?text=+) `RGB(0,24,90)`
![#005abd](https://via.placeholder.com/15/005abd/000000?text=+) `RGB(0,90,189)`
![#00297b](https://via.placeholder.com/15/00297b/000000?text=+) `RGB(0,41,123)`

![kf.bmp](./doc/kf_sample.png)


## Sound resources

### Format
Wave file format, linear PCM, 8bit mono

### Location

/res/td/wav/

### BGM

|Title|Filename|
|:---|:---|
|Insert coin|IC.wav|
|Insert coin B|ICB.wav|
|Stage A,etc|CN.wav|
|Stage F,etc|CMT.wav|
|Stage C, etc|CAW.wav|
|Stage B, etc|IB.wav|
|Stage E,etc|TS.wav|
|Warning|W!.wav|
|Boss1|B1.wav|
|Boss2|B2.wav|
|Boss3|B3.wav|
|Boss4|B4.wav|
|Boss5|B5.wav|
|Boss6|B6.wav|
|Boss7|B7.wav|
|Round clear|RC.wav|
|Ending|ED.wav|
|Name entry|NAME.wav|
|Gameover|OVER.wav|

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) 2022 GOB

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.
110 changes: 110 additions & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# TinyDarius

開発中です。現在ステージAのみ。
自作ライブラリの[ドッグフーディング](https://ja.wikipedia.org/wiki/%E3%83%89%E3%83%83%E3%82%B0%E3%83%95%E3%83%BC%E3%83%87%E3%82%A3%E3%83%B3%E3%82%B0)も兼ねています。
<ins>**権利上の問題で、画像や音のリソースデータは含まれておりません。**</ins>
リソースを独自で作成する際の指針は[こちら](HowToMakeResources.md)


## 概要
アーケードゲーム"ダライアス"からボスラッシュを作りました。
エミュレーター上での動作ではなく、独自のコードで動作しています。
その為実際の挙動とは異なります。
オリジナルの開発者ならびに製作会社に対し敬意を評します。

## 動作ハード
M5Stack Basic,Gray

### 必要なもの
M5Stack Faces + GB Face

## ビルド方法
[ArduinoIDE](https://www.arduino.cc/en/software) または [Visual Studio Code](https://code.visualstudio.com/) + [PlatformIO](https://platformio.org/) にてビルド可能です。
各環境の整備方法などはそれぞれのページを参照してくだい。

### 必要なライブラリ
[M5Stack](https://github.com/m5stack/M5Stack) 0.4.0
[LovyanGFX](https://github.com/lovyan03/LovyanGFX) 0.4.17 (support v0,v1)
[SdFat](https://github.com/greiman/SdFat) 2.1.2
[goblib](https://github.com/GOB52/goblib) 0.1.0
[goblib_m5s](https://github.com/GOB52/goblib_m5s) 0.1.0

### platform.ini for PlatformIO

#### 設定

|項目 |設定値 |
|:---|:---|
|platform | espressif32@3.5.0 |
|board | m5stack-core-esp32 or m5stack-gray|


#### ビルド種別

|env|説明|備考|
|:---|:---|:---|
|master|マスタービルド (LovyanGFX v0)|デバッグ機能なし|
|master\_v1|マスタービルド (LovyanGFX v1)|デバッグ機能なし|
|release|リリースビルド (LovyanGFX v0)|デバッグ機能あり|
|release\_v1|リリースビルド (LovyanGFX v1)|デバッグ機能あり|
|debug|デバッグビルド (LovyanGFX v0)|デバッグ機能あり|
|debug|デバッグビルド (LovyanGFX v1)|デバッグ機能あり|

master または master\_v1 でのビルドを推奨します。
私は ArduinoIDE と PlatformIO で M5Stack を除くライブラリを [lib\_extra\_dirs](https://docs.platformio.org/en/latest/projectconf/section_env_library.html#lib-extra-dirs) を介して共有使用しています。(ライブラリのインストールは ArduinoIDE を使用)
ご自分の環境に合わせて platform.ini を書き換えてください。

### TinyDarius.ino for ArduinoIDE

TinyDarius.ino 自体は空のファイルです。 setup(),loop() は ./src/main.cpp にあります。
ビルドは platform.ini の release 相当のものとなります。
他の env 相当でのビルドにするには platform.txt を書き換える必要があります。
env の記述を参考にオプションを設定してください。

#### 設定

ボードマネージャー **M5Stack version 1.0.9**

[Menu] - [Tool]

|項目|設定値|
|:---|:---|
|Board|M5Stack-Core-ESP32|
|Flash Frequency|80|
|Flash Mode|QIO|
|Partation Scheme|Default|
|Core Debug|any |


## 遊び方

|ボタン|説明|
|:---|:---|
|セレクト|コイン投入|
|スタート|クレジットがあればゲーム開始|
|十字|自機の移動|
|A| 弾発射(ソフトウェアリピート付)|

1. コイン投入(Select押下)
1. スタート押下してゲーム開始
1. 敵が出てくるまで動けません(少々お待ちください)
1. ボスを倒します。(時間切れになるとボスは逃げます)
1. 自機の位置によって次のステージを選びます(障害物に注意)
1. 全てのボスを倒せばゲームクリア

## 実装予定
- ボスの追加
- ラウンドクリア時のタイムボーナス
- 効果音の追加
- スコアランキングの保存と読み込み
- 自機のミサイルとパワーアップは...作るかもしれないし、しないかも。

## 謝辞
**[@KojiSaito](https://twitter.com/kojisaito)** M5Stack 向けプログラミングをしているのを見て私も M5Stack を買ってしまいました。M5Stack への道を開いてくれたことに感謝します。
**[@Lovyan03](https://github.com/lovyan03)** クールで有用なライブラリを作り続けている御仁。 LovyanGFX があったからこそゲームを作ることができました。

開発中、様々な助言を頂いた皆様にも感謝申し上げます。


Have a happy coding :)

Loading

0 comments on commit 0754093

Please sign in to comment.