c++

Projects using C++

Screen space ray casting and basic collision in C++

Submitted by zach on Thu, 06/29/2023 - 18:54
In my last post I talked about a world editor tool that I've been working on for a while, and how I implemented a C++ rendering system in a C# UI. With a robust user input system now in place, I have the ability to move around throughout the editor. The next step is to enable user input so they can move objects around, edit their properties, and so on. In the tech demo I worked on to prove the concept of this editor, I had the ability to select an object from a list and edit its properties, but most game editors worth their salt allow the user to simply click on an item in the viewport to edit its properties. To achieve this, I needed two things: 1) A way to cast a ray from the camera, through the mouse, and into the world 2) A way to test if that ray hits an object in the world. Both of these are not terribly complex concepts, but having never implemented them it was a fun challenge! Check out the rest of the article to see how I tackled this task and achieved my goal!

Tags

Exploring .Net interoperability to implement Vulkan rendering in C#

Submitted by zach on Mon, 06/12/2023 - 18:27
For about a year now I've been somewhat quietly working on a new game project. This has been a really fun project based on the idea of the "Backrooms", a strange space where you go when you clip through reality. I fell down the rabbit hole when I saw a youtube video by Kane Pixels, and almost immediately wanted to build a game based on the idea. Right away I had some challenges to tackle. The world in the "Backrooms" is a sprawling maze that seems to go on forever, and generating an infinite maze in Unreal Engine was not a challenge I wanted to tackle. Primarily I wanted to create a rich gameplay experience based on this concept, and making this happen in a procedural world would be a huge undertaking. So I thought outside the box a bit, and realized that if I could create a maze big enough and use world partitioning to slice it up, it could seem infinite to the player. So the first step then was to see what it would take to actually generate a maze in code. It turns out that generating a perfect maze is pretty straight forward with a modified depth-first approach. Once I had a basic maze generator built, the feature set of the tool exploded as I was able to add more and more features to create a richer world. Check out the full article to join me on my journey from a simple 2D tool, to a more complex 3D tool using C# and WPF!

Tags

The magic of quad trees (spatial partitioning)

Submitted by zach on Wed, 05/18/2022 - 01:26

Quad trees (or more commonly octrees or k-d trees) are ubiquitous in the world of games and are a very efficient method of spatial partitioning. They allow the application developer to organize a set of points or objects in 2D or 3D space based on their location within that space, which can then be used to retrieve that object or nearby objects. For a full description of what a quad tree is and how they work, check out the wikipedia article on them. 

Tags

Metroid Clone Redux

Submitted by zach on Mon, 03/29/2021 - 04:57
Here's a quick video demonstration of some improvements I made to my previous Metroid clone project. All of the technical details are the same as the previous project, so if you're looking for code snippets check out this article. This version is primarily an artistic improvement with some better models and a few updates that I wanted to make in the original project. Check out the video in the full article!

Tags

Custom Memory Allocator: StackAllocator

Submitted by zach on Tue, 11/24/2020 - 03:51

When it comes to high performance software, using the built in memory allocators like new and malloc can cause performance issues due to the underlying kernel calls required to fulfill the allocation requests. Games are very much high performance software as the time spent processing frames effects the overall experience that the user has. Since the desired time between frames is usually somewhere between 1/30 and 1/60 of a second, every bit of time that can be avoided during frame processing is highly desired.

Tags

Glass The Planet

Submitted by zach on Wed, 10/21/2020 - 03:42

Here's a project I've been working on for a while now that I'm calling Glass The Planet. I've always enjoyed large capital class space ships in games, I don't know why but something about them has always fascinated me. I loved the Covenant super carriers in Halo, the super star destroyers in Star Wars, and I especially love being able to pilot capital ships in EVE Online. So I wanted to create a basic game that allows the player to take control over some awesome ships and go to down causing destruction on a large scale. This is what I have so far and it's coming along quite well!

Project Spock Vulkan framework

Submitted by zach on Sat, 10/10/2020 - 04:02
Spock is a project I've been working on for a while now to make using Vulkan in smaller projects a lot easier. I've been fascinated with Vulkan since I first dived into the API in a graphics class. The option to submit multiple queues at once in a parallel fashion was enticing for performance and overall very interesting. However after about the first 3 weeks of the class I was finding that setting up Vulkan for use in a project was a serious undertaking and I wanted to change that.

Tags

OpenGL Final Project - Metroid Clone

Submitted by zach on Thu, 09/17/2020 - 07:30
This is the grand finale of my OpenGL classwork and the project I had the most fun working on. This project was fun because I had to do more problem solving and engineering to really get it to work the way I wanted. In my class on GLSL shaders I tried to create a scene from one of my all time favorite games Metroid Prime. I was happy with the results of that project but since I had all the shaders and models I decided I would build on them and create an interactive scene. Check out the video and the nitty gritty after the break!

OpenGL Project 6 - Bezier Curves

Submitted by zach on Thu, 09/17/2020 - 07:17
This project was really simple but was a good introduction into bezier curves and their uses. I didn't have a lot of inspiration for this project but the result was fun and it looked cool. This introduction to bezier curves was a great experience because it gave me an insight into how a lot of graphical tools create curves and splines. Check out the video and the code after the break!

OpenGL Project 4 - City Scene

Submitted by zach on Thu, 09/17/2020 - 07:04
This project is where I really let my creativity out of the box during my OpenGL class. This project was really about lighting, but I took things a step further by implementing my own OBJ file loader to load in a model I created in blender. All we really had to do was create two colored lights and a moving object that would move between the lights. Having done the helicopter in a previous project I thought it would be really fun to use that to animate a little city scene and the result was pretty good. It was with this project that I realized how much power OpenGL really had and what I could do with it. After this project I really started to connect the dots on how game engines work and how I could create a simple engine. Check out the video in the full article!