Swift
Swift is Apple's delightful replacement for Objective-C. It's such a nifty language it's even begun expanding beyond the Apple eco-system.
December 4, 2023
Metal Indexed Rendering
Indexed rendering allows you to get more bang for your buck when rendering by allowing the code to make a single command with the same vertices and a list of transformations per instance.
ReadSeptember 24, 2022
Surface Normals
I think this is what I want because it gives the surface a top and bottom and a left a right for the lighting to shade. The red is the darkest on the right because where the value of x is the highest.
ReadAugust 3, 2022
Sprite Sheets in Metal Shader
I got it working to render the textures for the weapons from a sprite sheet rather than from a separate texture for each animation frame.
ReadOctober 16, 2021
Rendering a Bunch of Cubes
In some ways this wasn't as hard as I thought it would be. I simply put a bunch of cubes on the screen!
ReadOctober 5, 2021
Moving the Cube
The big adjustment here was separating the model from the location of the object. This meant I translated the location of the object on the CPU but translated the object itself on GPU.
ReadSeptember 23, 2021
Moving a Dot with MetalKit
The key part of this project for me was figuring out how to set up a game loop that gets along with MetalKit.
ReadSeptember 18, 2021
Swift First Swing at Generic Array Extension
When you need to create a generic for `Array` you may either need `Sequence` or `Collection` or just `Array`. I might lack some understanding here because it seems trickier to understand which to use then I expect it to be.
Read