Written by: Rayner Tan

Welcome! The goal of this workshop is to introduce some basic patterns in game programming through a simple exercise. Some concepts that you will go through:

At the end, you will create something that looks like this:

ScreenRecording2024-10-05at9.40.24AM-ezgif.com-optimize.gif

A green circle representing the player, that can move using WASD and shoot where the mouse is at upon left clicking. And red circles representing enemies that move towards the player, which upon contact, the player dies and the game is over. Player wins by killing all the enemies.

Let’s begin by downloading the starter project from here:

StarterProject.zip

<aside> đź’ˇ

For mac users:

For Windows users:

Code Overview

01 Player and Movement

02 Enemies and Movement

03 Collision Detection

04 Making Player go Pew Pew

05 Resetting the Level