Back to portfolio
Case Study · June 2026

Sightline

A stealth shooter built solo in Java with Greenfoot for my grade 11 Intro to Computer Science class, my first full game. Eleven enemies share a dark house with you, and a flashlight decides who sees who first.

Role
Code & design
Tools
Java, Greenfoot
Built for
Grade 11 Intro to CS
Sightline title screen: two SWAT operators breaching a dark doorway with a flashlight beam, tagline 'Fear what you cannot see'
Title screen

The game's own title card. Like every sprite and background in Sightline, it's AI-generated art (ChatGPT), not photography or hand-drawn work.

Gameplay screenshot of Sightline: a cone-shaped flashlight beam is the only lit area in an otherwise black screen, revealing part of a wooden room, with HP and Ammo readouts at the top
Actual gameplay

What you actually see while playing: everything outside the flashlight cone, walls, furniture, enemies, is simply black until it crosses the beam.

The idea

I'd been playing a lot of Ready or Not, a slow, tense SWAT game where you clear a room one doorway at a time and the dark does half the work. The assignment called for something top-down, so I couldn't copy its camera, just the feeling: not knowing what's on the other side of a wall until it's too late.

The build

Just me, start to finish. One world, one house, eleven enemies, placed by hand in the Greenfoot editor before I pulled their positions into code. Past that there was nothing to work from, the walls, the player, the flashlight all had to be written from scratch.

Two sightlines, not one

From above, a wall can't block your view the way it does at eye level, you can just see over it. Darkness and a flashlight were the closest thing I could build to a wall that actually blocks sight. The name is literal: two vision systems run at once, yours and theirs, and the game is just what happens when they cross.

Your flashlight

A black overlay follows you around and turns toward the mouse, with a flashlight-shaped hole cut into it. Anything outside that cone doesn't exist as far as you can tell, walls, furniture, an enemy standing right next to you.

Their sightline

Every enemy fires an invisible ray at you, every single frame, and it dies the instant it hits a wall. If it reaches you clean, they spot you and open fire. Get close enough before that happens and clicking stabs them instead, no ammo spent.

Built in Greenfoot

Every enemy is a Grunt, built off one shared Enemy class that keeps track of how many are left and decides when I've actually won. A couple of pieces I didn't write myself: two utility classes for movement and on-screen text came from my teacher, and I leaned on Claude to work through the raycasting system for enemy vision, since that was new to me. The art is all AI-generated through ChatGPT, and the gunshot and stab sounds are pulled straight from CS:GO, with music from Trauma Team (Atlus, 2010). There's still one bug I never fully fixed, you can get stuck in a wall sometimes, and the only way out is to aim at it and move around erratically until it lets go.

Picking one mechanic and building everything else around it turned out to be the easy part. Getting the raycasting, the collision, and eleven enemies to all behave at once was the actual class.