A Turing Game
This
game
was
made
using
Turing
for
Windows.
It’s
a
local
multiplayer
game
where
players
try
to
survive
as
long
as
possible by stopping asteroids from impacting the ground. It was coded in 2014 as a final computer science summative.
Features
Splash Screen
The
program
launches
with
an
animated
splash
screen
including
a
loading
bar
to
allow
time
for
assets
to
load
in.
Music.PlayFileLoop
was
used
to
add
loopable
music
to
the
splash screen and game menu.
Source Code
To
download
the
source
code
and
try
it
for
yourself
visit
my
github
by clicking the link below.
For additional information email me at
OmidGhayouri@outlook.com
Menu
The
interactive
menu
system
uses
pic.draw
to
create
a
custom
graphical
interface.
Button
presses
are
determined
using
the
mousewhere
procedure
to
get
the
current
location
of
the
mouse.
pic.free
is
used
to
clear
memory
allocated
when
each
picture
is
loaded
in.
This
function
is
crucial
as
Turing
only
allows
a
limited
number
of
images
to
be stored in memory at any given time.
Game Classes
The
game
consists
of
three
original
classes;
characterClass,
fireClass
and
the
asteroidClass.
The
character
class
allows
players
to
move
left
or
right
and
changes
the
direction
the
player
faces
depending
on
which
key
is
being
pressed.
The
fire
class
allows
players
to
shoot
a
fireball
originating
from
the
characters
position
moving
positive
along
the
y-Axis.
The
asteroid
class
is
set
up
in
an
array
which
spawns
asteroids
along
the
x-Axis
at
random.
Asteroids then travel downward along the y-Axis.
Collision Detection
Collision
detection
was
built
using
a
destruct
function
to
check
whether
two
objects
intersect
each
other.
Depending
on
which
objects
are
colliding,
different
outcomes
occur.
For
instance,
asteroids
destruct
when
intersecting the ground or a fireball, and fireballs destruct when touching an asteroid or going off screen.
Score System & End Screen
The
score
system
incorporates
player
health
and
score
using
basic
counters.
The
count
is
triggered
by
the
collision
of
objects.
Once
the
players
health
count
reaches
0
the
game
enters
its
end
sequence.
Here
the
player’s
scores
are
displayed
and
the
user
is
presented
with
the
option
to
play
again.
Omid G
2018