Ray Tracer in C++

April 2016

This is a course project for CSCI 420 - Computer Graphics at USC. Given an input scene that specifies a list of triangles and spheres, it renders and generates .jpg pictures to the disk. I added a lot of extra features, including:

  • Adaptive anti-aliasing and multi-threading implementation
  • Reflection and refraction using Snell's Law and Fresnel's Equations
  • Custom camera positioning and simple 3D-model loader
  • Settable material properties for both spheres and triangles

For more information, please check this project on GitHub. If you just want to see some pretty pictures, click here.

RollerCoaster Simulator in C++ and OpenGL 4.0

March 2016

This is a course project for CSCI 420 - Computer Graphics at USC. Given an input track (i.e. control points of a spline), it renders and simulates a ride on a spatial roller-coaster from scratch. I implemented a lot of extra features, including:

  • Phong shading model in GLSL
  • Multiple-camera views (first-person view is the main one)
  • Sky dome with spheres efficiently generated by code
  • Rendering of railway with support (automatically built from spline)
  • Settable material properties for both spheres and triangles
  • Editable track by mouse

The code is in a private repository on BitBucket and is available by email upon request.

Heightmap Renderer in C++ and OpenGL 4.0

March 2016

This is a course project for CSCI 420 - Computer Graphics at USC. Given an input greyscale image, it renders its terrain in 3D. I implemented a lot of features, including:

  • Heightmap and optional texture loading
  • Different visualization modes: solid, wireframe and point-cloud
  • [EXTRA] Realistic lighting using Phong shading model
  • [EXTRA] Automatic color-scheme for different heights

The code is in a private repository on BitBucket and is available by email upon request.

OpenGL Object-Oriented Interface (gloo)

July 2016 - Today

In OpenGL 3.2, Khronos Group removed a large number of functionalities, such as on-the-fly per-vertex rendering calls or default lighting. Nowadays, the application should provide shaders and implement lighting from scratch. In order to make all these tasks easier, I'm coding gl-oo-interface in C++11 as a wrapper for OpenGL 4.0 for my future real-time graphics applications. It is currently under development, but it already has the following features:

  • Custom mesh manipulation (automatic VBO, EBO and VAO management for user-defined attributes)
  • .obj file loader (currently under development)
  • GLUT interface module (keyboard and mouse events)
  • Shader Manipulation module
  • Renderer module: wireframe, phong shading, normal mapping
  • Multiple texture loading on shaders
  • Tools: camera, transformations, frequent meshes

Code available on GitHub (~5.5k lines of code).

Webphysics in Javascript

Dec 2015

This is a 2D-physics simulator coded in HTML5 and Javascript. I developed this during 2015 Winter Break for fun. It runs well on Chrome browsers, but it was not tested on other browsers. The main features are:

  • Six interaction modes
  • Add particles with custom mass, velocity and position
  • Connect particles with springs and dampers
  • Create and connect realistic springs to other springs or particles
  • [UNDER DEVELOPMENT] Elastic clothing simulation

If you want to play it online, click here. You can also check the project page on GitHub.

Game of Life in Netwide Assembly x86

April 2014

Game of Life is a type of Cellular Automaton that contains simple rules of state transition between "alive" and "dead" cells. This is my implementation in NASM x86, combined with a very simple bootloader (real mode). You can emulate it on QEMU.

  • Draws everything from scratch, pixel by pixel (VGA mode)
  • WASD keys to move the cursor (little yellow square)
  • The user can put new cells or kill existing ones
  • Press y to get next iteration

The core code is available here.

ZombieCInvasion (Tower Defense) in pure C

August 2013

This is my course project for Introduction to Programming at Federal University of Pernambuco. It is a tower defense game held in my hometown university where zombies come from caves to the Center for Informatics. The player has to buy/upgrade towers (university buildings) and strategically place them to save the Computer Science students. For graphics, this game uses Allegro library.

  • Zombie waves come as specified in the input file (with custom levels and types)
  • There are 5 kinds of towers, each one with a different power
  • Priority targets are settable by the player
  • When a zombie is killed, money is earned as reward
  • User interaction by mouse

Code available on GitHub.

PortalSnake in pure C

October 2012

Back in 2012, when I was in high-school, I was writing my first few lines of code by myself. This Snake version is my first implementation of an actual game and by this time I haven't had classes on programming (so don't expect best practices lol). For 2D-graphics, I used Allegro library. Main features:

  • Create/Edit up to 10 different stages with walls and obstacles
  • Navigate and select stages by through miniature visualization
  • Count score and record the best score in a file
  • PACMAN-based animation of snake's bite + Portal 2's portals

If you really want to see this code, click here.