Git Product home page Git Product logo

lmnc_longgames's Introduction

lmnc_longgames

Warning This is still under development. The code is messy, the comments are wrong, the documentation is lacking. Enter at your own risk, there be dragons 🐉

Goal

20ish unicorn boards plugged into 3 usb hubs plugged into a raspberry pi

all to run pong :D

YouTube: https://www.youtube.com/watch?v=cm83RIhDbwo

How does it work?

The 220 by 53 pixel display is made up of 20 Pimoroni Galactic Unicorns. Each one is controlled with a built-in Raspberry Pi Pico microcontroller running a custom firmware that displays whatever pixels it's sent over USB. The Unicorn displays are all connected to a Raspberry Pi 4 through a few USB hubs. The Raspberry Pi runs all of the game software, written in Python. It reads the player's controller input over GPIO and renders each full 220 by 53 pixel frame on the Pi as a 2d matrix of RGB values. As each full frame is rendered, it is split into 20 sub matrices, one for each Unicorn display. This data is sent to each Unicorn over the USB serial connection, where the custom Pico firmware takes the RGB pixel data and updates each of its LEDs. This happens anywhere from 60 times a second to 120 times a second. Because we're able to display any frame we want, we're not just limited to games. We can also send it video frames, or even frames from a webcam.

Installation

Dependencies can be installed by running:

scripts/install.sh

Configure your Screens

scripts/setup_config.sh

Running Long Pong

scripts/game.sh

or

scripts/game_headless.sh

Development

TODO

Credits

Special Thanks goes to:

  • Chris Riggs (VKTx/criggs)
  • Dax
  • Gadgetoid
  • FineQuasar17
  • TheEPROM9 LaTeX
  • LMNC
  • This Museum Is (Not) Obsolete
  • Pimoroni
  • LMNC Patreon Supporters
  • 24 sausage and egg baguettees

Relevant Links

lmnc_longgames's People

Contributors

criggs avatar

Stargazers

 avatar Nestor Vera avatar Pat Hartl avatar Jonathon avatar  avatar alfed avatar Zack Sargent avatar Timmy O'Mahony avatar Alex Herington avatar Darren Jones avatar Robin Houston avatar Loïc avatar William Booth avatar MarcAlx avatar Tam avatar  avatar Dan Evans avatar Michał Kutzner avatar  avatar

Watchers

 avatar Philip Howard avatar

Forkers

charliesears

lmnc_longgames's Issues

Video Framerate is Slow

The video framerate will always lag a little bit slow. We're using the pygame clock.tick(fps) to limit to a max frame rate, but this will always run a bit slower than the set framerate. We can switch to a method that calculates how much we need to offset based on our frame draw time, and also track drift over time (i.e. we should have 60 frames every second, if we got 62, slow down a bit, if we got 58, speed up).

Alternatively, we could set the max framerate to 2x the video framerate, and calculate/draw frames from the dt time, rather than the pygame clock.

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.