Giter Club home page Giter Club logo

code-samples's Introduction

code-samples

Here is a collection of some systems from my most recent projects. More details are provided in each folder's accompanying README.md.

Here's a quick rundown of the systems. Bold systems include buildable projects.

  • Whenever I start a new project or working on a new platform, I ensure a good set of debugging facilities are available. Logging, Variable Binding and Runtime Scripting are a good start.
  • The Process, Event and Dependency Graph systems work together closely to help keep initialization requirements decoupled and execute in the correct order.
  • WordCache is an data structure and algorithm I wrote to highlight a string using words supplied by a dictionary of multi word phrases.
  • Singleton is a templated version of the singleton design pattern. Don't leave home without it!
  • Compact Strings are an optimization for strings when only comparisons are needed.
  • Tweener is a simple tweening system and easing algorithm collection I wrote, mainly to facilitate smooth transitions in UI code.
  • If you've made it this far and are looking for some more, I've thown in a Model View Controller generator for you to pick at. Be warned, it's has minimal comments/docs!

Improvements / Notes

  • Most of this code was written prior to C++11 availability, so you're going to see a lot of template meta-magic. If I were to write some of these today, I would likely take advantage of C++11's features to simplify the code. Variadic templates and lambdas would simplify a lot of the code here.
  • Some of these systems(especially in logging) may seem like going overboard with optimization and macro/template programming, but in game development every cycle counts. You typically operate at 30/60 frames per second, and with VR you need even higher frame rates, so you only have 16 milliseconds(or less) per frame to do EVERYTHING. Release builds must strip away anything that isn't relavant to the final product.
  • It should go without saying, but the folders that have sample projects aren't the best project setups. A lot of the scaffolding code(pch files, cmake projects) are there simply to offer a runnable example. In my production environments these projects and dependencies would be much much cleaner ๐Ÿ˜„

code-samples's People

Contributors

mwgray avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.