Code Monkey home page Code Monkey logo

upward-for-playdate's Introduction

UPWARD for Playdate

Overview

This repository contains the full source code and assets for the port of Matthias Falk's PICO-8 game, UPWARD, to Playdate.

Both this Playdate verion and the original PICO-8 version of UPWARD are available to play for free!

The code is released under GPLv3, but if you wish to write your own proprietary Playdate game in Zig, feel free to use my Zig-Playdate template, which is released to the public domain.

Compilation Requirements

  • Either macOS, Windows, or Linux.
  • Zig compiler 0.12.0-dev.3156+0b2e23b06 or newer. Pulling down the latest build is your best bet.
  • Latest Playdate SDK installed (2.4.1 as of this writing).

Compiling

  1. Make sure the Playdate SDK is installed, Zig is installed and in your PATH, and all other requirements are met.
  2. Run zig build -Doptimize=ReleaseFast which will compile the release version of the game.
    • If there any errors, double check PLAYDATE_SDK_PATH is correctly set and either binutils or the ARM Toolchain (depending on your OS) is properly installed and set in your PATH.
  3. The upward.pdx executable should be produced in the newly created zig-out folder.
    • Keep in mind, this executable will only run on the platform you compiled on, plus Playdate hardware. If you want your updward.pdx to be "universal", you will need to compile this codebase on macOS, Windows, and Linux, and have an upward.pdx that contains pdex.dylib, pdex.dll, and pdex.so.

Running on the Playdate Simulator

  1. Make sure the Playdate Simulator is closed.
  2. Run zig build -Doptimize=ReleaseFast run.
    • If there any errors, double check PLAYDATE_SDK_PATH is correctly set and either binutils or the ARM Toolchain (depending on your OS) is properly installed and set in your PATH.
  3. Optionally, connect your Playdate to the comupter and upload to the device by going to Device -> Upload Game to Device.. in the Playdate Simulator.

Profiler

While working on this project, I wrote a performance profiler to help me keep track of how fast each frame was and performance of certain complex code.

It is disabled in the final release, but, if you're curious to take a look at these metrics, you can renable the profiler by setting ENABLE_PROFILING to true in profiler.zig. Then, while running the game, you can toggle the profiler buy holding the A, B, and Up buttons.

Credits

  • Daniel Bokser - Ported UPWARD to Playdate.
  • Matthias Falk - Creator of the original UPWARD game on PICO-8 and contributed some UX ideas to the port.

upward-for-playdate's People

Contributors

danb91 avatar edayers avatar

Stargazers

Phillip Madden avatar Samu avatar Stefan Su avatar Felix Caraballo avatar Nathan Toups avatar Peter Tripp avatar Giorgio Pomettini avatar David Janda avatar Jesse Lucas avatar Pascal Ruscher avatar Michael Stevenson avatar Dave avatar Chrisman Brown avatar Guillaume Dumoulin avatar HTeuMeuLeu avatar

Watchers

 avatar Phillip Madden avatar

upward-for-playdate's Issues

toolbox.zig is out of date with current syntax

can't write a stack trace in the simulator on toolbox.zig because std.debug.detectTTYConfig() no longer exists. it's since been graduated to std.io.tty.detectConfig(file: File) as mentioned in this proposal.

Affected line:

std.debug.writeCurrentStackTrace(stream.writer(), debug_info, std.debug.detectTTYConfig(), null) catch {};

i normally wouldn't mention this in a finished project, but you mention it in zig playdate template when mentioning that you only get 10kb of stack space, i figured it was prudent to mention it here, for any beginners that might be looking to it as a reference.

You only get 10KB of stack space. That's it. I have not tested much of Zig's std on the Playdate, but std was not designed for a stack this small. See how far you can get, but you might want to write a lightweight "toolbox" library, like I did for UPWARD. std.fmt.bufPrintZ works well, though!

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.