RETURN TO VARUNRAMESH.NET

Editing Gameplay Videos without Re-encoding using FFmpeg

Tuesday, December 26th 2017

I recently worked on a YouTube let’s play with my brother. It was recorded using Dxtory with the x264vfw codec, meaning that the saved recordings are H.264 streams in an AVI container. Our recordings are 1920x1080 at 60fps. Audio commentary was recorded separately in Audacity.

When it came time to edit the videos, I fired up Adobe Premiere, but quickly ran into a problem. Rendering the 1080p/60fps videos was taking upwards of an hour. Futhermore the output videos had significantly lower quality due to the re-encoding. I knew that after YouTube transcoded the videos for it’s internal format, the final output would look even worse. To fix this, I did some experimenting with FFmpeg, a command-line based video processor, and found a worflow for editing our let’s play without re-encoding.


How I Structure GameObjects - Components and Mixin-based Inheritance

Thursday, November 2nd 2017

Component-based GameObjects are similar to the concept of mixins/traits in some Object-Oriented langauges. In this article, I’ll discuss the relative advantages and disadvantages of both patterns, then describe how they can be unified in a way that takes the best of both patterns.


Lua Gotchas

Friday, October 20th 2017

Lua is an awesome language, but it has some unusual design choices that can cause endless frustration to beginners (and experts). This post goes over these gotchas.


Composable, Programmatic Animations for Games

Monday, September 4th 2017

When making a game, you often have animations that play during runtime. These animations often occur in relation to other animations - either in sequence or in parallel. To solidify this concept, let’s look at the following GIF of Candy Crush.


Unifying Dynamic Type Tests and Type Refinement

Sunday, September 3rd 2017

Programs often need to perform different actions based on the type of an object.


Stackless vs. Stackful Coroutines

Friday, August 18th 2017

It’s 2017 and coroutines are coming to a language near you. Javascript has generators, and is getting async/await functions, while C++ is getting coroutines as part of the N3858 proposal. However, coroutines in languages differ in that some languages support stackful coroutines, but others only support stackless coroutines.

This terminology is a little bit confusing - you might wonder how it’s possible for a coroutine to not have a stack.


Spaced Out - CS148 Ray tracing Project

Tuesday, June 6th 2017

This write-up was initially the README for a private repo only the TAs could see. I decided to repost the write-up here, separate from the code. The project is from 2014.

CS148 Final Ray Traced Image, created by Harrison Ho and Varun Ramesh.

Our idea was to represent a tabletop game that the players imagine is actually taking place in space.


Automatically Promoting Constructor Parameters to Fields

Thursday, March 30th 2017

When writing object-oriented code, you frequently want a constructor that takes in values and assigns them to object fields.


Runaway Robot - A Mobile Runner Game

Wednesday, March 29th 2017

This quarter, I worked with three other students on a mobile game called Runaway Robot. The game, made in Unity, is a side-scrolling runner featuring mechanics like gravity reversal. All of the music, all of the code, and a large portion of the art was made from scratch. The code is open source and can be found at https://github.com/Kahraymer/Runner-Game.


Pulling a Page's Modified Date from Git

Tuesday, March 28th 2017

This blog is a static site that’s generated from a series of markdown files. The ‘publish date’ for each of the blog posts is taken from a YAML frontmatter section in the post’s markdown source. Most blogging systems track when a post was last modified, and display that in the page, as well as in the page’s metadata. If I wanted to track the last modified date, it would be somewhat annoying to do manually, as I would have to edit the date in the frontmatter every time I wanted to change something in the post.