Flying ninja
Flying Ninja is a 2D side-scroller game where players interact with the flying ninja character using their keyboard's spacebar to move the ninja character 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.
This variation of "Flying Ninja" is written in Rust.
Project structure
The /backend
folder contains the Rust smart contract:
Cargo.toml
, which defines the crate that will form the backendlib.rs
, which contains the actual smart contract, and exports its interface
The /frontend
folder contains web assets for the application's user interface. The user interface is written using the React framework.
Deploying from ICP Ninja
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. To open this project in ICP Ninja, click here.
To download or reset the project files, click the menu option next to the deploy button.
Editing files
To make adjustments to this project, you can edit any file that is unlocked. Then, redeploy your application to view your changes.
To edit files that are immutable in ICP Ninja, you can export the project to GitHub or download the project to your local environment using the "Download files" option.
Build and deploy from the command-line
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.