2D/3D Orthographic Platformer for the PC
Kevin Ubay-Ubay
In game screenshot during an isometric rotation
Introduction
My final project is inspired by the awesome game Fez which was developed by Polytron. I saw a demo of the game when it was first announced 5 years ago and thought it was very clever. Unfortunately, Fez is only available for the Xbox as of the time of this writing. Because of that, I set out to write my own PC version.
Features
- Cool 8-bit retro game style
- Sprite animation
- Fast downward collision (falling) via stencil and depth buffers
- Levels are managed by an octree allowing spatial queries to find nearby blocks given a bounding volume
- Orthographic and isometric rotation modes supported
- Console allows blocks to be inserted into octree, serving as a basic level editor
- Plays chiptune music!
Gameplay
Like the game Fez, the world is essentially cube-like: you face one side of the world at a time. Due to orthographic projection, the objects are flattened and are perceived to be 2 dimensional since this form of perspective eliminates depth.
In game screenshot
However, by doing a 3D rotation of the world about the Y axis, you can switch which side of the world you're viewing therefore allowing you traverse among objects that may lie on different positions along the X or Z axis. The player can use this to his/her advantage to overcome obstacles and to maneuver around the world. Blocks that would be too far to jump to two dimensionally may be solved by switching to another 2D view of the world.
In game screenshot of world being rotated
How To Play
- Keys
A & D are used to rotate the world
- Left & right arrow keys are used to move the character around
- Left CTRL makes the character jump
- Tab key brings up command console
Typing in help into the console will display a list of commands available. To exit out of the console, press TAB twice.
Screenshot of my Commodore 64-ish console
draw_octree true will render the active child nodes of the octree that have data sorted into them
quasi_iso true will enable isometric rotation
zoom_in truewill zoom into and enlarge a portion of the scene
insert_block blockNum x y z will insert a block with number blockNum at x, y, z and update the octree
get_loc prints current world coordinates of player
clear_log clears the command history log
Credits
The soundtrack used in the game comes from a album called "8-Bit Magic: A Module Chiptune Collection". The soundtrack is available via public domain here:
http://feryl.bandcamp.com/album/8-bit-magic-a-module-chiptune-collection
Audio, window management, user input and OpenGL contexts are handled using SDL 2.0 with the SDL extensions SDL_mixer (for audio) and SDL_ttf (for fonts/text).
And finally a big thanks to Professor Zoe Wood. 5 years ago I thought Fez was mind blowing. Now after taking this class, I can write my own Fez clone.