|
2 | 2 |
|
3 | 3 | Flying Ninja is a 2D side-scroller game where players interact with the flying ninja character using their keyboard's space bar to move up and down. The goal is to avoid the obstacles and obtain points for each obstacle you dodge. When the game ends, the user can add their score to the leaderboard.
|
4 | 4 |
|
5 |
| -The game's logic is written in [Motoko](https://internetcomputer.org/docs/motoko/main/getting-started/motoko-introduction), a programming language designed specifically for developing canisters on ICP. |
6 |
| - |
7 |
| -## Project structure |
8 |
| - |
9 |
| -The `/backend` folder contains the Motoko canister, `app.mo`. The `/frontend` folder contains web assets for the application's user interface. The user interface is written using the React framework. Edit the `mops.toml` file to add [Motoko dependencies](https://mops.one/) to the project. |
| 5 | +## Build and deploy from the command-line |
10 | 6 |
|
11 |
| -## Deploying from ICP Ninja |
| 7 | +### 1. [Download and install the IC SDK.](https://internetcomputer.org/docs/building-apps/getting-started/install) |
12 | 8 |
|
13 |
| -When viewing this project in ICP Ninja, you can deploy it directly to the mainnet for free by clicking "Deploy" in the upper right corner. Open this project in ICP Ninja: |
| 9 | +### 2. Download your project from ICP Ninja using the 'Download files' button on the upper left corner, or [clone the GitHub examples repository.](https://github.com/dfinity/examples/) |
14 | 10 |
|
15 |
| -[](https://icp.ninja/i?g=https://github.com/dfinity/examples/motoko/flying_ninja) |
| 11 | +### 3. Navigate into the project's directory. |
16 | 12 |
|
17 |
| -## Build and deploy from the command-line |
| 13 | +### 4. Deploy the project to your local environment: |
18 | 14 |
|
19 |
| -To migrate your ICP Ninja project off of the web browser and develop it locally, follow these steps. These steps are necessary if you want to deploy this project for long-term, production use on the mainnet. |
| 15 | +``` |
| 16 | +dfx start --background --clean && dfx deploy |
| 17 | +``` |
20 | 18 |
|
21 |
| -### 1. Download your project from ICP Ninja using the 'Download files' button on the upper left corner under the pink ninja star icon. |
| 19 | +## Security considerations and best practices |
22 | 20 |
|
23 |
| -### 2. Open the `BUILD.md` file for further instructions. |
| 21 | +If you base your application on this example, it is recommended that you familiarize yourself with and adhere to the [security best practices](https://internetcomputer.org/docs/building-apps/security/overview) for developing on ICP. This example may not implement all the best practices. |
0 commit comments