Git Product home page Git Product logo

picosystem-boilerplate's Introduction

PicoSystem C++ Boilerplate

This is a quick and dirty boilerplate repo to get you started quickly developing games for the PicoSystem.

Getting Started

  1. Install the tool chain.
$ sudo apt update
$ sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib build-essential
  1. Update the submodules. This pulls in Raspberry Pi's Pico SDK, Pimoroni's PicoSystem Sdk and pulls TinyUSB into pico-sdk.
$ git submodule update --init
$ cd pico-sdk
$ git submodule update --init
$ cd ..
  1. Create the build folder and build hello-world. After making you'll be able to drag the build/games/hello-world/hello-world.uf2 into the PicoSystem when it's booted into DFU mode.
$ mkdir build
$ cd build
$ cmake ..
$ make -j8

Adding your own games

  1. Create a new folder under games.
$ mkdir games/new-game
  1. Create your game entry file in the new folder, the following can be used as a template.
#include "picosystem.hpp"

using namespace picosystem;

void init()
{
}

void update(uint32_t time_ms)
{
}

void draw()
{
}
  1. Create a new CMakeLists.txt in the new folder, the following can be used as a template.
cmake_minimum_required(VERSION 3.13)

project({ProjectName})

picosystem_executable(
  {ProjectName}
  {GameFile}.cpp
)

pixel_double({ProjectName})
disable_startup_logo({ProjectName})

Replacing {ProjectName} with the name of the project and {GameFile} with the name of the file created in the previous step.

  1. Add the new folder into the games/CMakeLists.txt
add_subdirectory(hello-world)
add_subdirectory({NewFolder})
  1. Write your game!

  2. Build your game. After making you'll be able to drag the build/games/{ProjectName}/{ProjectName}.uf2 into the PicoSystem when it's booted into DFU mode.

$ cd build
$ cmake ..
$ make -j8

picosystem-boilerplate's People

Contributors

aiecee avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

fordi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.