element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Hack the Holidays
  • Challenges & Projects
  • Project14
  • Hack the Holidays
  • More
  • Cancel
Hack the Holidays
Hack the Holidays Forum A simple game on the RPI Pico
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Hack the Holidays to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 21 replies
  • Subscribers 37 subscribers
  • Views 4048 views
  • Users 0 members are here
Related

A simple game on the RPI Pico

scottiebabe
scottiebabe over 2 years ago

Pimoroni have recently included support for basic 8x8 pixel sprites in micropython https://github.com/pimoroni/pimoroni-pico/tree/55821d2896ac12732c4e84142ba1fb76d4382dc5/micropython/modules/picographics#sprites 

So, I would like to try and make a simple holiday game on a RPI Pico.

I am thinking of something along the lines of:

image

Where the objective of the game is to avoid airborne objects while dropping presents into chimneys.

Two buttons for Rudolf up/down. Then a third button for santa to drop a present.

I got this Pimoroni example to run with my Pico Display: https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/examples/tufty2040/awesome_game.py 

So, I can use that as a starting point. I'm still not sure how I will handle a scrolling scene.

I'll post a quick video of the example code running later.

Edit:

The 8-bit color gives such a cool retro vibe, I love it!

image

A *Very* early proof of concept:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Why can't I comment? ... lol

  • Sign in to reply
  • Cancel

Top Replies

  • baldengineer
    baldengineer over 2 years ago +6
    What a cute idea! Maybe start with a static screen where Santa goes back and forth dropping presents into a static set of chimneys. The challenge element could be "smoke" coming out of the chimney means…
  • beacon_dave
    beacon_dave over 2 years ago +5
    You could perhaps drop baubles onto the Xmas trees causing them to light up/decorate. Brussel sprouts would make good airborne objects to avoid. Perhaps some carrots for the reindeer to collect and mince…
  • dougw
    dougw over 2 years ago in reply to scottiebabe +5
    irfanview You can select the target number of pixels, edit each pixel, select the color depth, select the file format, etc.
Parents
  • ntewinkel
    ntewinkel over 2 years ago

    That’s really cool!

    This would be a great entry for the Hack The Holidays competition!

    It’s amazing how much power is available on that little board to give you those possibilities.

     There’s a Flappy Bird for the Pico, but it looks like it’s in C. But it might help with the scrolling background part?

    https://github.com/andreban/pico-bird

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • ntewinkel
    ntewinkel over 2 years ago

    That’s really cool!

    This would be a great entry for the Hack The Holidays competition!

    It’s amazing how much power is available on that little board to give you those possibilities.

     There’s a Flappy Bird for the Pico, but it looks like it’s in C. But it might help with the scrolling background part?

    https://github.com/andreban/pico-bird

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Jan Cumps
    Jan Cumps over 2 years ago in reply to ntewinkel
    ntewinkel said:
    It’s amazing how much power is available on that little board

    This is true. I tried to ignore it for a while, but then, I won a price and got a few Picos.
    Current status: in love.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • scottiebabe
    scottiebabe over 2 years ago in reply to ntewinkel

    Thanks :) I think its a fun festive idea for a hackathon. Hopefully it turns out okay!
    It really blows me away that this is a microcontroller running python!
    Flappy Bird for the Pico, that's amazing!

    Re: background. I still have to decide if I want to draw the background as a small number of "sprites" or a full 240x135 jpeg image.
    Right now, I am using a jpeg image as the background. I am just not sure yet if I can copy x from imgA and y from imgB in a fast way in micropython. I may end up having to write a fast routine in assembly. If microbython had better indexing and slicing that could would work.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • scottiebabe
    scottiebabe over 2 years ago in reply to ntewinkel

    Flappy bird on a pico (not my work):

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

    The c code doesn't look too scary... But I don't really want to write c code if I don't have too Slight smile

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • ntewinkel
    ntewinkel over 2 years ago in reply to scottiebabe

    Awesome! You made it work on your Pico!! Flappy Bird is just so brilliant Slight smile

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • dougw
    dougw over 2 years ago in reply to scottiebabe

    it looks like the display is fast enough...that is encouraging.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube