website templates

Shogun3D's Coding Page

Welcome to blueshogun96 AKA Shogun3D's coding page!

Any code I post here is simply code that do not fit in any specific category, so all of these are a little on the random side. Anything from OS specific code (Win32, MacOSX, etc.), multithreaded code, white papers, you name it. Hopefully someone can make use of any code here. Enjoy!


  1. Platform(s): Windows
  2. Language: C
  3. APIs: OpenGL (GLUT)
  4. Developent Time: A few days/weeks, counting bug fixes...

This is the tool I created to plot splines for my game RyuAwai (see games section). The spline code is really the main highlight of this valuable tool. RyuAwai uses splines to move enemies in dynamic, predetermined paths throughout the screen. It's not the most user friendly (like most in-house game dev tools, that's not the point) but it saved me lots of trouble. The blue line represents the screen, and the yellow lines represent the game's boundaries; this way you know where the enemy moves at all times. You can even view how an enemy would move along the spline and adjust the speed. The help screen explains everything needed to use this tool

Asynchronous Procedure Call with QueueUserAPC

I wrote this in an attempt to learn how to properly use APCs with C/C++ in Windows. It's really not so bad once you learn how it works.

Asynchronous File Search & I/O class

In my latest game engine, I realized that the code I use stalls the thread it's running in, preventing me from having a cool animation playing while the files are being located and loaded. I never did like having a static screen that says "LOADING" on it while waiting for the game to load resources prior to or while actually ingame. No one wants to wait for that annoying loading screen to go away when transitioning between areas ingame either. Back in the day, it was okay, but not anymore. A well written game should have some sort of asynchronous searching/loading process to prevent stalling. Hopefully, this code will help put an end to that!

I've written an Asynchronous File Search & I/O class that searches for the file you want/need to load, then loads it using Win32's asynchronous (Overlapped) read/write methods. In order to search for files, you'll have to pass in your own function pointer for usage within a thread to keep the program responsive. Using the file search thread isn't required, you can specify a full path or file name without searching. Since it's a template class, you can also specify the pointer type without the need for casting from/to a void* pointer. Using it is rather straight forward. I've included a demonstration on how to use it, just remember to include the .inl file! There's probably better ways to do what I just did, but one reason I wrote it this way was to demonstrate my ability to write and use C++ features.