vulkan

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

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