RSSAmplifier

Blog

memdump

Recent content on memdump

philippegroarke.comRSS feed ↗29 posts

Latest posts

Data-Driven, Descriptor Based Generative C++

Today I’d like to share with you an idiom I’ve been enjoying more and more. I doubt it is novel, but I haven’t heard about it before. It all started while authoring a new domain-specific scripting language and its compiler/data-generator. I was fighting with google flatbuffers limitations when a virus (aka idea) entered my mind. Why use a separate schema notation and schema…

C++ UI Libraries

A list of free, cross-platform GUI solutions for C++. If you don’t like Qt, or other major GUI frameworks like wxWidgets or GTK, the choices available to you are a bit overwhelming.

Enforcing Signatures On Templated Callbacks

A lot of times, I find myself using std::function to document APIs and prescribe specific callback signatures. The problem with std::function is its type-erasure, which makes it quite slow compared to other callback techniques. If you need ABI stability, say you are exporting a function for a DLL, you cannot use standard types anyways. They do not ascribe to any ABI standard. So in that case,…

I Accidentaly Wrote A Compile-Time Executable State Machine

Yes, you read that title right. While working on a new way to create finite state machines (fsm), I inadvertently designed a state machine you can execute at compile-time. With branching and everything. Today, allow me to pull you down my rabbit hole. It’s always nicer with company down here. 
 Let’s go, Alice!

Funky CMake

A long long time ago, after years and years of fighting with software that doesn’t build, I made a life changing decision. Any and every software I write must download, install and setup its dependencies without requiring user interaction. All of them. Allways. When combined with other build best-practices, not pasting dependencies in your source tree and locally installing your…

Games

Professional Capacity 
 Ancestors: The Humankind Odyssey 
 
 RollerCoaster Tycoon World 
 
 Blocks Quiz 
 
 
 
 Game Jams 
 Mtl Jam Nations - Amour ou Patrie 
 
 Ludum Dare 34 - Power Disney Princess Simulator 5000 
 
 OneHourGameJam - MayMayMator 2006 
 
 OneHourGameJam - No Scope Shopper 
 
 
 
 Open Source 
…

Using SG14 Libraries - A Simple and Performant Event Stack

There’s recently been some outcry from the gaming industry regarding C++’s direction. I share some of the views expressed, but since I mostly write functional code for my engine, my expectations are somewhat different. I have certainly drunk the Kool-Aid. 
 To me, if constexpr and aligned new are real demonstrations the standard committee understands our woes. Once we get static…

Chrono For Humans

I’ll be honest with you right off the bat, I hold a particular grudge for std::chrono . In fact, it’s safe to say one of my favorite hobbies over the past few years has been ranting about std::chrono to whomever will listen. And so, assuming I was wrong about the library, I’ve forced myself to use it every single time I need to work with duration values for the past year or so. I…

Easy Defensive Programming - Up To Eleven

I recently posted about defensive programming, and how you can create an easy to use, low friction library of high level defensive rules. These rules prevent “silent” modification of your class constructors and help enforce a class design by declaring compile-time validation rules. The idea was well received, but some astute readers correctly pointed out the rule of 5 implementation…

Easy Defensive Programming

A few months back, I learned about defensive programming at a local C++ meetup. The idea took a little while to sink in. I now rarely write any code without using defensive programming in some way or another. However, it does become tedious to write, especially if you write good error messages. Before delving too deep into the subject, lets discuss the basics.

Software

Professional Capacity 
 3ds Max 
 
 Work revolves mostly around performance. 
 Stingray 
 
 Point Cloud research & development. 
 SFLPhone 
 
 Research & Development. 
 
 
 Personal Projects 
 wsay 
 Windows equivalent of macOS say. Simple command line text-to-speech with easy file output, voice selection and more. 
 bench_util 
 A…

Declarative Functional APIs - A.K.A. Abusing Lambda Parameters

Functional APIs are a joy to work with. Not only do they help eliminate certain bug categories, but they tend to be very flexible and reusable. Today I present a technique that has emerged while I was simplifying some lambda based APIs. C++17 makes template meta-programming much more palatable, I dare not imagine what this would look like in C++11.

Simplifying Compile-Time Options With if constexpr

My latest little experiment relates to compile-time options and eliminating preprocessor checks in user code. I’m not a big fan of MACROs, especially when they are simply used to make compile-time branches. I am also not a fan of other techniques used to minimize this problem. With C++17, we now have a beautiful and simple tool that can help remove all these preprocessor checks, if constexpr…

Friendly Data-Oriented Entity-Component Managers

In the past months, I’ve rewritten the entity-component system of my engine pet project about three times. Finally, something that ticks all the boxes has emerged. Today, I’d like to present this architecture. So far it has worked wonders for me, though I wouldn’t guarantee this to scale up to AAA sized projects. I still have much testing to do.

Static Duck Typing in C++

Update : Walter Brown has come up with a much much more elegant way to do this. You can find the updated technique at the bottom of this post, or read more about it on cppreference . 
 A little while ago, I watched Jason Turner’s great cppcon talk, where he uses C++17 to write a commodore game. At that point, I decided it was quite time I confirm my (now proven false) beliefs on…

SIMD Quicktip: Understanding 16 Byte Memory Alignment Detection

When working with SIMD intrinsics, it helps to have a thorough understanding of computer memory. In this post, I hope to shed some light on a really simple but essential operation to figure out if memory is aligned at a 16 byte boundary.

OpenGL Model, View, Projection Matrices Reference

An inclusive reference of transformation matrices for basic OpenGL work. It is intended as a quick reference while coding OpenGL without libraries.

Not Impossible : Storing C++ Virtual Method Pointers in C Callbacks.

A good friend challenged me while we where investigating vtables and various ways to create a reflection system without macros. He stated, “It is impossible to store a virtual method pointer in a C callback”. I decided to prove him wrong. Here, I present the result of this investigation.

GLSL Quicktip: Stringify Macro

I’ve seen a lot of examples, tutorials and open-source code that use quotes to assign their shader programs to a const char* . Fully fledged engines would have a way to parse text-files, but if you are doing quick and dirty tests like me, you can use this macro to make editing easier.

Game Design Memory Lane - Legacy of Kain: Soul Reaver

I’ve recently started playing old gems, classics, in an effort to further my game design knowledge, ideas and culture. The games I have chosen are completely new to me. It is truly interesting to delve into very old titles, especially when you remove the nostalgia factor. Here I write my thoughts, impressions and lessons learned from some of these games.

Eve Online - Dual monitor window on OS X

This simple guide doesn’t require any third-party tools or apps. 
 A quick guide to help you get the most out of your monitors and Eve. Once you’ve played the game in all its dual screen glory, you will never go back. Lets get started!

Downloading Twitch replays is easy

Somehow, due to either miss-information or a change it twitch’s apis, the web is filled with false information about livestreamer and downloading twitch replays. Lets fix that.

Crispy text in Unity3D

We’ve all been there; you import a font into Unity3D, write some UI text and… its blurry [sadface]. Here is a quick reference on how to get buutiful crispy text in the engine.

Capturing Desktop Audio on El Capitan

N.B. This solution is completely free and only requires iShowU Audio Capture. 
 So I recently upgraded to El Capitan and I need desktop audio capture for Open Broadcaster Software. The new OS X release only authorizes signed kext, which is a good thing. Unfortunately that breaks Soundflower or WavTap.

Eve Online isn't hard, it is annoying

I’ve recently subscribed for another month of Eve Online . I played a long time ago, and quit after space life got extremely boring and lonely. Last time I logged in, I did so with 4 friends during a discount period. What I write here are my personal thoughts, and some echoes of these long gone pilots. Once my gaming friends left Eve, everything changed. Why the game didn’t appeal to…

Fun with std::threads!

I’ve recently gotten more and more involved with the Wine project. I am a gamer, after all, and having only a Mac laptop and OS X makes it somewhat hard to play games. While debugging wine logs, I’ve encountered a problem many face when using +relay. You can’t just ignore those 4 GB logs, as they often contain the exact reason, or more precisely, the exact location your…

Adding a huge image gallery to wordpress.com

I am hitting many of the imposed limits on my free blog. I recently wanted to share a ton of textures, but since they were to big for the free space allowed, I resorted to a little “trick” if you will. I ended up creating a script to generate a huge html thumbnail gallery, using a table. It seemed like the best of the available options.

LibAV, libAO and QT5 audio player tutorial.

A while back I was working on some audio prototyping. I made a simple audio player prototype and was experiencing with different audio plugin APIs. I decided to use libAV (not libavcodec from ffmpeg) for the simple reason that its’ documentation is much much better than ffmpeg. I highly recommend to take advantage of that. There are many examples, code snippets and explanations here . Of…

Thoughts on releasing music under CC licenses.

A few years back, I released 2 tracks on OpenGameArt . I hadn’t composed any musical pieces in many years, and I took the opportunity to try something new. Not only dip my toes into musical composition again, but also share my work with the world. All my previous songs had never been heard by anyone other than close friends. The experience was nerve-racking but very satisfying.