Jump to content

April 2017 »

23242526 27 2829

Recent Entries

Recent Comments

Latest Visitors

View more

SpeedRun's Journal

4: Adsense

Screen To World Coordinates

This snippet shows how to convert a point on screen to a corresponding point in the world. It borrows heavily from the concept of ray-tracing.

Let x and y be the point on the screen which we want to convert to the world space.
We need to create a ray which passes through the camera and the point(x, y) in worldSpace
This ray needs to satisfy the line...

Timing and FPS

In this tutorial, we will learn how to create a timer to be used in our projects. We can use our timer for Creating a constant experience over multiple configurations, Calculating the FPS(Frames per second) etc.
The timer class will keep track of the Total Running Time, the time elapsed between 2 frames i.e between consecutive calls to Update and the...

Initializing DirectX

Now that we have created our window, we need to give it DirectX Capabilities, Again, since we will want to create only one instance of this class for each application we will create it as singleton. Even though on running the application we will just see a background color (TAN), we will have our DirectX device initialized and up for running. We will be...

Creating a Window

Before we create our game, we first need to know how to create a window. Thanks to OOP's the code just needs to be written just once. Since we will want to create only one instance of this class for each application we will create it as singleton.

IMainWindow Interface : MainWindow.hxx

Since we dont need to expose all the...

NonCopyable objects

Sometimes, you don't want to encounter a situation where something made a copy of the object. In C++, a copy of an object can be made in a number of situations. The most obvious is direct assignment. Less obvious, but equally valid, is a function call using pass-by-value.

Copying in C++ is handled in two ways
the copy assignment operator;...

Some Basic concepts

DLL Basics

Since, we are going to be using dll's to have 1 single copy of our engine code, lets understand the basics of DLL's. For those of you, who are on the fence of whether to use a dll or not. Here are some of the advantages of using a dll as...

Memory Leak Woes

Finding Memory Leaks

If you are not a big company, chances are you cannot afford the commercial programs to check for memory leaks in your program.. This tutorial will give you a free alternative which you can add to your projects.

The 1st thing that we need to do is to include <crtdbg.h>. One thing to note is that crtdbg.h...

Setting Up the Project - Part II (Project Properties)

Now that we have decided the basic directory structure and dependencies that each project will have, we will now set the project properties. I prefer to do this at the project level so that the properties are persistent and I don't have to set them every time I download the...

Setting Up the Project - Part I (Directory Structures)

In this post I am going to cover the third party libraries, project breakup, and current directory structure that I follow. Even though its not perfect, its served me well so far

Third Party Tools

FMod - Sound
Zlib -...