Platformer Engine Week 2

This week we did a little code to finish our engine and spent the rest of the time working on our own platformer games using it.  The code changes we made to last week’s game engine were:

Hit Boxes:

Fixed the platformer so that our character doesn’t get snagged on edges by its whiskers.  This we did by learning about hitboxes. The hitbox is just a costume which is rectangular in shape.  Before we do our animation, we switch to the hitbox costume and after we switch back to the costume we want.

hitbox

Head Bumping:

Fixed the platformer so that we can bump our heads against the platforms without popping up.  This was by adding a couple of lines to the “stay above ground block” sprite to move down if we are touching the ground while moving upwards.

The entire code for the platformer is below:

platform_code

DOWNLOAD THE FULL PLATFORM ENGINE CODE HERE!!!

Example Game: Mentor Dash

Finally Mark showed an example game pulling all the elements in together – “Mentor Dash”.  It has the same code as we covered, but adds a bit of animation, level changes, sound and some sillyness.

mentor_dash

DOWNLOAD MENTOR DASH HERE

There were lots of brilliant ideas from the ninjas on their own games .. looking forward to seeing what you can do!

Scratch Advanced: General Purpose Wireframe 3D Engine

This week in Scratch advanced we took on the ambitious task of writing a general-purpose 3d wireframe engine.  The goal here was to build an engine that we could use to view any structure in 3-dimensions as though we had x-ray vision.   We didn’t really know how it might turn out but were delighted with the results!  If you just want the code, skip to the bottom!

We didn’t quite know how to start this so we Googled 3D and Wireframe, and we found this article on wikipedia that really helped us understand what it was:https://en.wikipedia.org/wiki/Wire-frame_model

wireframe examples

Continue reading

“Tick” Technique in Scratch – Illusions and 3D printing!

Today in scratch advanced, Mark covered a very useful method to organize your programs better if there are lots of moving sprites – which he calls the “tick” technique.tick_loop The idea is that a single master loop ticks time and the Sprites react to this tick in their own way.

We showed two examples of using this tick – an optical illusion that shows that things can move in circles while just doing straight lines and a technique for building 3D models by layering sprites the same way that a 3D printer layers resin.

illusion_path

 

The FULL Instructions for today’s projects are here – Enjoy!!

It would be great if you tried out some of your own Tick projects, and demonstrated them next week at Scratch Advanced!

Scratch Advanced: Week 3 Top Down Game Engine Part 1

A “Game Engine” is a piece of code you can use to build different types of games.  This week we looked at doing a top down scrolling game engine.  It’s still pretty basic at the moment but it’s enough to get started on some projects of your own.   What can you build with it?

Top Down Scrolling Game Part 1 Notes

screenshot-week1

Download the code for part 1 here.

Scratch Advanced: Twister Part 2

There was a huge group for today’s class where we took the Shape block from last week and built an amazing Twister project out of it.

We learnt:

  • more about angles and Sine and Cos
  • some basics of creating 3D illusions on a computer screen

week2

Twister Notes Week Two.

We didn’t get it quite finished, but managed to get to some 3D. Follow the notes to get to the end and check out this sample project that has all the pieces from the doc and a few extra features in. It’s addictive playing with the twister!

Download the completed project here!

Scratch Advanced: Twister Part 1

In Scratch advanced this week we learned some cool math formulas that are really handy for doing interesting stuff in programming.

week1

The things we went through!

  • We revised X and Y and reminded ourselves how it works
  • We drew a house using X and Y
  • We learnt about circles and radius
  • We learnt about the math formulas Sin and Cos and how they can be used to get X and Y positions on a circle
  • We learnt about Custom Blocks in Scratch
  • We wrote our own Custom Block that could draw a shape of any size and number of sides, using Sin and Cos to figure out the points!
  • We used that Custom block to make lots of neat patterns (some by accident!)

The notes are attached in PDF and if you follow them you will have a project ready to go for this Saturday – we are going to take that custom block and do some really cool things with it.    Don’t worry if you don’t have the time to do it or can’t follow the notes though – we’ll have this shared out so you can just take off where we finished!

Twister Notes Week1

Download the Scratch Code here!

CoderDojo Athenry at Coolest Projects 2015

Congratulations to everybody from CoderDojo Athenry who participated in the CoderDojo Coolest Projects event on 13 June 2015. It was a very impressive event, held in the RDS Dublin, with over 500 projects from CoderDojo ninjas from Ireland and worldwide.

Here are photos of the participants from CoderDojo Athenry.

Games Category:

James from the Minecraft Modders group with his technically impressive XyZ Mod with World Gen and Gauntlets:

20150613_113536

Eoin from the Minecraft Modders group who entered the detailed and very well structured Global Cuisine mod:

20150613_113817

Ruaidhrí and Luke from the Minecraft Modders group who entered the Weapons, Armour and Money mod:

20150613_112829

Hardware Category:

Michael and Mikey from the CoderDojo Athenry PiDojo who entered their clever and topical Shower Evaluator project that times your shower and displays the amount of water used, cost of water, and cost of energy:

20150613_123344

Alaidh from the PiDojo group who entered the very innovative Sensor Guide for the visually impaired, which was impressively backed up with scientific evaluation:

20150613_122611

Scratch Over 10s:

Emily and Chloe from the Scratch Advanced group had a Scratch program with great environmental potential, Cúisneor, that helps to reduce food waste:

20150613_154335

Scratch Under 10s:

Rachel from the Scratch Beginners/Intermediate Group was our youngest entrant from CoderDojo Athenry, aged 8, and had a fantastic Scratch app for helping young children to learn the letters of the alphabet:

20150613_154521

Well done to everybody who entered!

We should also mention that three projects won prizes:

  • Ruaidhrí and Luke won a prize for best use of Microsoft technologies (Microsoft owns Minecraft, of course)
  • Alaidh won a prize for being a finalist in the Hardware category
  • Mikey and Michael also won a prize for being a finalist in the Hardware category.

Information about the 2014-15 Season at CoderDojo Athenry

2014-overview

From Saturday 11 Oct 2014, we are starting a new season of CoderDojo Athenry, at our usual time and place. (The Saturday before, on 4 Oct, we will be having an introduction session for new mentors and other volunteers.)

Here is a the overview presentation (PDF): 1-CoderDojoAthenry-InfoSession-2014-Sept

This season, we will have the following streams:

We look forward to seeing you there!

–  Michael and the CoderDojo Athenry mentors.

CoderDojo Athenry Belts Awarded May 2014

BeltsMay2014b

We awarded a record number of 87 belts at CoderDojo Athenry in May 2014:

  • 3 White belts for ongoing participation
  • 55 Yellow Scratch belts for competent  coders
  • 15 Blue Advanced Scratch belts
  • 1 Yellow Python belt
  • 3 Blue Python belts
  • 10 Green Minecraft Modding belts for creating and ublishing Java/JavaScript mods online

In keeping with the CoderDojo ethos, these belts were earned by our young people meeting agreed standards in different coding disciplines. Belts are not for winning competitions against each other, but celebrate personal achievement, and are never given away without being earned.

Congratulations to all the young people who earned their belts!

 

Week 1, 2014 Scratch Beginners – Storytelling

Happy new year

We had a great turnout today for our first session of 2014. A very special welcome to our 14 new ninjas who joined us for their first coding session today. I hope you enjoyed your first visit to Coderdojo Athenry.

To ease everyone back in (including myself) we took a look at doing some storytelling. This involved again learning about the X, Y position of the stage, some movement of the sprites using the Glide command and of course testing our code to ensure that our timings were correct.

xy

We look forward to seeing you all next week, when we will be using scrolling backgrounds.

The PDF version of todays session are available to download here: CDA-S3-Challenge08-Storiestelling.pdf

Martha