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:
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.
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:
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.
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!
This week was quite busy in the Advancers group.
Talk on Coolest Projects
- Oliver gave a talk on the “Coolest projects” and many of us are planning on targetting it this year –
- the deadlines are Mid-March for submission of ideas and Mid-June to attend the event itself!
- Mark and Oliver are going to dedicate the last 30 min of each week to helping people with their projects.
We started a platform Engine and got most of the code done – next week we’ll finish up the engine (not much code, honest!) and see what it would take to make it into games. A Platform Engine is something that’s useful in lots of types of games or interactive adventures – be they mario-style or escape-room style, etc. Once we have this platform engine done, we can easily apply it to other cases. Think about ideas for platformers for your coolest project!
Things we got working:
- Gravity so the player falls
- Stopping when we hit the ground
- Not falling “into” the ground
- Walking along bumpy ground
- Not walking over bumps that are too high (like walls)
Things we didn’t get working (yet):
- “popping” up over walls
- Animating our walk
- Snagging on edges
- Scores, lives, etc.
Next week we can look at the above to see how we might do it, and also what it might take to make it look pretty, add a loading screen, etc.
The full code for today is below (click to view large):
Code from Week 1
We will finish this next week and make a game out of it! You can download the project from here
This week we tried something different with some text based coding. We learned that for text based coding, we need a good text editor. The text editor we picked was called “Atom” as it’s a free, powerful text editor that works on Mac, Linux and Windows.
Unfortunately.. with some network and pc problems.. it took longer than I hoped to get things installed on people’s PCs, but even then we managed to make a great start on some code and actually built some quite cool stuff.
For anyone that missed last week.. it would be great if you could run through the steps below and we will be ready for the next stage!
This week at Advancers, we took some time out from programming to review image editing, and play around using the highest quality free image editor in the world, the GNU Image Manipulation Program, also known as “The Gimp“.
Mastering Gimp, or a tool like it, is essential to be able to produce the images you will need for high quality games. It’s also very useful for touching up photographs, chopping people’s heads off and sticking them on others, etc!
After taking some time to get it installed on most people’s laptops, we reviewed the most important parts of this incredibly powerful program:
- Installation of Gimp
- The basics of how to open and create a new image file
- The Gimp toolbox, how to change colors and use the brushes to paint.
- Layers and how they can make your life so much easier when it comes to image editing
- Selections, what they are used for and how to use them
On windows or Mac, GIMP can be installed by browsing to https://www.gimp.org/ and selecting “Download”. On linux it can be installed from the app store/package manager on your distribution. Note: some people last week had Chromebooks and I mistakenly told them that gimp wasn’t available on those devices – I since checked and it is available, though as it’s a web-app it is not as good as a locally installed version – check out this video for instructions on installation: https://www.youtube.com/watch?v=NtdcukXILJg . It is also not quite free too since you need to pay to save your files. Click read more for more details!