Monthly Archives: March 2020

#FreePCB via Twitter to 2 random RTs

via Dangerous Prototypes

Every Tuesday we give away two coupons for the free PCB drawer via Twitter. This post was announced on Twitter, and in 24 hours we’ll send coupon codes to two random retweeters. Don’t forget there’s free PCBs three times a every week:

  • Hate Twitter and Facebook? Free PCB Sunday is the classic PCB giveaway. Catch it every Sunday, right here on the blog
  • Tweet-a-PCB Tuesday. Follow us and get boards in 144 characters or less
  • Facebook PCB Friday. Free PCBs will be your friend for the weekend

Some stuff:

  • Yes, we’ll mail it anywhere in the world!
  • Check out how we mail PCBs worldwide video.
  • We’ll contact you via Twitter with a coupon code for the PCB drawer.
  • Limit one PCB per address per month please.
  • Like everything else on this site, PCBs are offered without warranty.

We try to stagger free PCB posts so every time zone has a chance to participate, but the best way to see it first is to subscribe to the RSS feed, follow us on Twitter, or like us on Facebook.

Resources for Learning at Home

via SparkFun: Commerce Blog

We know that learning from home can be a stressful transition for you and the student(s) in your home. Between our Spring Kit Sale and resources from our SparkFun.com and SparkFunEducation.com sites, we’re here to help make the transition go as smoothly as it can.

If you're in need of some materials, be sure to shop our Spring Kit Sale - available through April 17th! Designed with beginners in mind, these kits offer a springboard into electronics through circuit building, creating e-textile projects, measuring the weather, practicing soldering, and exploring the Internet of Things (IoT).

Spring Kit Sale

If you’re looking for a particular item or ecosystem, check out our Education Materials page for a more robust list of our education-focused items.

We know teaching isn’t easy, but we have some handy resources that will hopefully help. With lessons on the basics of electronics to more advanced learning with coding, you will be able to help kids continue to learn from home.

Resources:

Between our current sale and our ever-growing list of resources, hopefully we can help make learning at home a little easier.

comments | comment feed

Code Hyper Sports’ shooting minigame | Wireframe #35

via Raspberry Pi

Gun down the clay pigeons in our re-creation of a classic minigame from Konami’s Hyper Sports. Take it away, Mark Vanstone

Hyper Sports

Hyper Sports’ Japanese release was tied in with the 1984 Summer Olympics.

Hyper Sports

Konami’s sequel to its 1983 arcade hit, Track & Field, Hyper Sports offered seven games – or events – in which up to four players could participate. Skeet shooting was perhaps the most memorable game in the collection, and required just two buttons: fire left and fire right.

The display showed two target sights, and each moved up and down to come into line with the next clay disc’s trajectory. When the disc was inside the red target square, the player pressed the fire button, and if their timing was correct, the clay disc exploded. Points were awarded for being on target, and every now and then, a parrot flew across the screen, which could be gunned down for a bonus.

Making our game

To make a skeet shooting game with Pygame Zero, we need a few graphical elements. First, a static background of hills and grass, with two clay disc throwers each side of the screen, and a semicircle where our shooter stands – this can be displayed first, every time our draw() function is called.

We can then draw our shooter (created as an Actor) in the centre near the bottom of the screen. The shooter has three images: one central while no keys are pressed, and two for the directions left and right when the player presses the left or right keys. We also need to have two square target sights to the left and right above the shooter, which we can create as Actors.

When the clay targets appear, the player uses the left and right buttons to shoot either the left or right target respectively.

To make the clay targets, we create an array to hold disc Actor objects. In our update() function we can trigger the creation of a new disc based on a random number, and once created, start an animation to move it across the screen in front of the shooter. We can add a shadow to the discs by tracking a path diagonally across the screen so that the shadow appears at the correct Y coordinate regardless of the disc’s height – this is a simple way of giving our game the illusion of depth. While we’re in the update() function, looping around our disc object list, we can calculate the distance of the disc to the nearest target sight frame, and from that, work out which is the closest.

When we’ve calculated which disc is closest to the right-hand sight, we want to move the sight towards the disc so that their paths intersect. All we need to do is take the difference of the Y coordinates, divide by two, and apply that offset to the target sight. We also do the same for the left-hand sight. If the correct key (left or right arrows) is pressed at the moment a disc crosses the path of the sight frame, we register a hit and cycle the disc through a sequence of exploding frames. We can keep a score and display this with an overlay graphic so that the player knows how well they’ve done.

And that’s it! You may want to add multiple players and perhaps a parrot bonus, but we’ll leave that up to you.

Here’s Mark’s code snippet, which creates a simple shooting game in Python. To get it working on your system, you’ll need to install Pygame Zero. And to download the full code and assets, go here.

Get your copy of Wireframe issue 35

You can read more features like this one in Wireframe issue 35, available now at Tesco, WHSmith, and all good independent UK newsagents.

Or you can buy Wireframe directly from Raspberry Pi Press — delivery is available worldwide. And if you’d like a handy digital version of the magazine, you can also download issue 35 for free in PDF format.

Make sure to follow Wireframe on Twitter and Facebook for updates and exclusive offers and giveaways. Subscribe on the Wireframe website to save up to 49% compared to newsstand pricing!

The post Code Hyper Sports’ shooting minigame | Wireframe #35 appeared first on Raspberry Pi.

Digital Making at Home: Making games

via Raspberry Pi

When you’re part of the Raspberry Pi Foundation community, you’re a part of a global family of young creators who bring things to life with the power of digital making. We imagine that, given the current changes we’re all navigating, there are probably more of you who are interested in creating new and exciting things at home. And we want to help you! One of the best things we can do right now is to tap into what connects us as a community, and that’s digital making. So, welcome to Digital Making at Home from the Raspberry Pi Foundation!

Welcome to Digital Making at Home from the Raspberry Pi Foundation

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspbe…

What is Digital Making at Home?

Whether you wrote your first line of code years ago or minutes ago, or you’ve yet to get started, with Digital Making at Home we’re inviting you on a digital making adventure each week.

Digital Making at Home from the Raspberry Pi Foundation V1

At the start of each week, we will share a theme that’s designed to jumpstart your journey of creative expression and problem solving where you create a digital making project you’re proud of. Every week, we’ll have code-along videos led by people from our team. They will walk you through projects from our free projects collection, to give you a place to start and a friendly face to accompany you!

a girl using Scratch on a laptop at home

For those of you whose mother language isn’t English, our free project guides are available in up to 30 languages so far.

Share your digital making project with us!

Each week, when you’ve made something you love using digital making, you can share it us! Just make sure you have your parent’s or guardian’s permissions first. Then share your project by filling out this form. You might find one of your projects featured in a future blog post for the whole community to see, but no matter what, we want to see what you created!

Just because we’re all at home, that doesn’t mean we can’t create together, so let’s kick off Digital Making at Home with this week’s theme:

This week, we’re making games

Playing a game is a fun way to pass the time, but why not take it to the next level and make your own game? This week, we invite you to create a game that you can play with your friends and family!

Let your imagination run free, and if you’re not sure where to start, here are three code-along videos to help you.

Beginner level

If you’re new to coding, we want to introduce you to Scratch, a block-based coding language that is perfect to start with.

Try out Archery, led by Mr C and his sidekick Xavier:

Digital Making at Home – [Archery] (beginner)

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspbe…

Go to the free Archery project guide (also available in Polish).

Intermediate level

If you’re looking to go beyond the Scratch surface, dive a little deeper into the coding language with.

Try out CATS!, led by Christina:

Digital Making at Home – [Cats] (intermediate)

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspbe…

Go to the free CATS! project guide (available in 30 languages).

Advanced level

If you’re all Scratched out, move on to Python, a text-based coding language, to take things up a notch.

Try out Turtle Race, led by Marc:

Digital Making at Home – [Turtle Race] (advanced)

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspbe…

Go to the free Turtle Race project guide (available in 16 languages).

More inspiration for making games

If you’re creating a game in Scratch, check out the extra videos from Mr C in the ‘Digital Making at Home: Making games’ playlist. These will show you how to add a timer, or a score, or a game over message, or a cool starter screen to any Scratch game!

A girl with her Scratch project

And if you’re into Python coding and hungry for more creative inspiration, we’ve got you covered. Our own Wireframe magazine, which you can download for free, has a ton of resources about making games. The magazine’s Source Code series shows you how to recreate an aspect of a classic game with a snippet of Python code, and you can read articles from that series on the Raspberry Pi blog. And if that’s still not enough, take a look at our Code the Classics book, which you can also download for free!

Alright friends, you’ve got all you need, so let’s get digital making!

Share your feedback

We’d love to know what you think of Digital Making at Home, so that we can make it better for you! Let us know your thoughts by filling in this form.

The post Digital Making at Home: Making games appeared first on Raspberry Pi.