Deadline for Registering for Coolest Projects 2018 is 25 March

Coolest-Projects-large.png

25 March 2018 is the deadline if you would like to enter Coolest Projects, which will take place in Dublin on 26 May. You can find out information and register here: http://coolestprojects.org/

We have had lots of great participation from CoderDojo Athenry at Coolest Projects in the past few years, from our youngest members to our oldest, in all of our groups. People who enter find it a fun and rewarding day.

Here is a presentation from 2 years ago about entering:

https://coderdojoathenry.org/2016/03/03/information-about-coolest-projects-2016/

Week 6 2018 Explorers – Greeting Card

Hi everyone,

Good to see everyone after our unplanned extended break, but it was nice to see some snow too!

This week we did a Greeting Card, I did a birthday card but some of you did a Mothers Day, I’m sure all your  Moms loved them.

I have uploaded the finished card up to the scratch website. You will find the log in details in the notes below.

Here are this weeks notes in PDF CDA-S7-Week 6-GreetingCard.PDF

Enjoy the break!

 

Martha

Advancers: Motorway Madness

This week in advancers, we simulated a true story!  Once Mark was driving past Athlone and encountered a car driving the wrong way down the motorway.  In this case it was a poor old gentleman who had somehow ended up turning down the sliproad, but we wrote a game which simulated the incident from a crazier drivers point of view!

The idea of the game was to drive as far as possible the wrong way down a 4-lane motorway before you crash.

The finished game is here if you want to play with it or look at the code!

Step 1: Draw the car

Out first step was to draw a car – we did this by switching to “Vector” mode and dragging a few boxes together – this is mark’s car below:

motor-01-draw-car

Step 2: Draw the road

The next step was to draw the road – the road was drawn the same way, using vectors.  One key point here was to space out the lanes more or less evenly, and to use the “Shift” button to ensure that the lines on the road were at 90 degree angles.  We drew the gaps in the white line using grey lines the same colour as the road.  A few bushes and buildings completed the scene!

motor-02-road

Step 2: Make the road scroll!

In this game, we wanted the road to scroll from top to bottom.  This meant that the ySpeed of the road was negative.  We also wanted the road to move back to the top whenever it got to the bottom.  We had done side-scrolling with multiple sprites year ago in Explorers, and this was the same idea – however we managed to do it with just one sprite by using clones in the code below:

motor-03-road-scroll

 

Step 4: Make the Car Move!

In this step we started off with basic movement – we were going to get to more realistic physics, but ran out of time!  I’ll see if I can show the code for this at the bottom and you can add it in yourself!

To make it move, we just checked for left and right arrows and added speed accordingly:

motor-04-player-code

Step 5: Enemies!

The game was already starting to feel fun, but it’s a lot better with some unsuspecting traffic on the road!  We cloned the “player” sprite, and created a bunch of costumes to represent different styles of vehicle:

Next we wrote some code VERY similar to the scrolling background code for the enemy – this also reappears at the top when it reaches the edge – the difference being that it appears in a random lane and with a new costume.  This turned out great!

Final Step: Game Over

The final step was a “Game Over” text sprite – this shows whenever the player crashes!

This was a really fun game – I enjoyed making it a lot!

Exercise: Realistic Turning Physics

I said I’d have a go at realistic turning physics for the car – this code works and looks great – try adding it to your game to see what you think – basically it turns the front of the car realistically and the back skids around like a real front-wheel-drive car.  It was a bit tricky so I’m glad I didn’t push it as people would have gotten really tired as I tried and failed a few times!  Just pop this code into your “player” script anywhere near the end!

motor-07-realistic-physics

The game looks quite cool when finished!