IfThen Software

Profile
Oregon
Journals our progress on current projects
54 comments
1 followers
169 entries
Advertisement
VBStrider
May 26, 2011
Character jitter and a new test project
The character was jittering back and forth when it walked, which I originally assumed was due to the large number of lights I was testing with. However, when I removed all of the test lights, the character was still jittering. After a bit of debugging, it looks like the bug was caused by the …
576 views
VBStrider
May 25, 2011
Cube shadow maps and a bug in PIX
Originally I was rendering the scene with a given shadow map to a temporary texture. This texture was then rendered additively (alpha blending ONE, ONE, ADD) to the default render target in order to accumulate the various light and shadow map effects. The reason I was rendering to a temporary…
850 views
VBStrider
May 24, 2011
Shadow Mapping Works! Devil's details and screenshot included
Shadow mapping works! It is rather inefficient at the moment, but it does indeed work.



I think it's about time for another issue of "The Devil's Details", this time regarding shadow mapping.

Pixel shader doesn't know its own depth
You do not have access to the depth of the pixel you are working with …
835 views
VBStrider
May 21, 2011
Learning shadow mapping
I read through the section in RTR on shadow mapping and I think I know enough about the basics to get some kind of shadow system into the test project. Shadow mapping involves rendering the scene's depth information from the light's perspective. You then render the scene from the camera's per…
609 views
VBStrider
May 20, 2011
Lighting works! Screenshot included
Lighting works! Per-pixel lighting was easier than I thought; it is literally just moving the lighting calculation from the vertex shader into the pixel shader.

If you want to learn how to do lighting, I recommend Real-Time Rendering, specifically chapter 5. From what I have seen, the book goes…
898 views
VBStrider
May 19, 2011
Multiple animations
Multiple animations are now supported. Previously, only the animation stored in the model file was playable, so the character had no idle animation (or pose). Because there was no pose for being "idle", I jury rigged the animation code to zero the bone position/orientation if the player didn'…
604 views
VBStrider
May 18, 2011
Current progress screenshot
Today I added in support for materials, multiple models, and instances. A picture is supposedly worth a thousand words, and I seem to be at a loss for anything really interesting to say today, so here is a screenshot of the current "demo" I am working on:

[size="1"]

Reposted from http://invisibl…
565 views
VBStrider
May 17, 2011
Storing animations, converting RH orienations to LH, and world-space cursor
Now that I have a single animation working, it's time to start worrying about how to use multiple animations. The Milkshape3D file format only supports a single animation, so I did a bit of investigating to find out how games normally store multiple animations. From what I could tell, a lot o…
648 views
VBStrider
May 15, 2011
Optional Weekends
Weekends are rather unpredictable for me. Sometimes I will be able to get a normal work day's worth of coding done, and sometimes I won't be anywhere near the computer. Today is a perfect example of the little-to-no work day: I just made the animated model move along the z-axis to see how it …
560 views
VBStrider
May 14, 2011
Skinning works! The devil's details.
I finally have multiple-bone skinning working! I think I can summarize the last few days as "Wow, that was a pain". On the surface, a hierarchical animation system sounds easy: "Just go down the tree and accumulate matrices as you go", but as is usually the case, the devil is indeed in the de…
736 views
VBStrider
May 12, 2011
Radeon X1000 actually NOT SM3.0 compliant?!
Today I worked on skinning. Skinning is the term used for 3D bone-based animation, and comes from the idea of putting "skin" on the bones.

My initial plan for skinning was to store all of the joint matrices for each model instance in one big texture. The advantage to this is that I can fit a lot m…
828 views
VBStrider
May 11, 2011
RH to LH, texture coord oddities, and instancing
MS3D model geometry is now loaded correctly. One problem I did encounter was that the models are stored in a right-handed coordinate system, but the game uses a left-handed coordinate system. This means that the x coordinate is pointing in the wrong direction, basically. I initially tried to…
705 views
VBStrider
May 10, 2011
Started loading models. Matrices and shaders.
We use Milkshape3D for modeling, so it makes sense to support loading .ms3d model files. I implemented basic loading code this morning, but it needs a lot of work. In its current state, it will only load a single triangle out of the model, and materials and animation are not taken into accoun…
634 views
VBStrider
May 09, 2011
Anti-cheat shader works
I finally have the anti-cheat shader working! These are the results (you may need to increase your monitor's brightness to see the difference, as this is what the shader is designed to combat):


The first screenshot is the original, the second is the corrected version.

Ironically, I kind of cheated…
760 views
VBStrider
May 08, 2011
Trouble trying to create banding, and an IDE for shaders
I spent most of the day trying to get the anti-cheating shader to work. I still don't have it working quite right, but it's getting closer. The idea is to create worse and worse banding the darker something is, thus blurring any details. I am able to create banding just fine, but making it v…
552 views
VBStrider
May 07, 2011
HLSL and a cool Direct3D debugging tool
I worked on the rendering system today. Because of the way I handle errors, there is a class for the D3D object, the device, vertex declarations, vertex buffers, vertex shaders, and pixel shaders. This is a little inconvenient, as the following code shows:

m_renderer->GetDevice()->BeginSc…
840 views
VBStrider
May 06, 2011
Smart pointers and error handling
Today I worked on the systems. Like I mentioned in yesterday's blog post, I have decided to take a reference counting approach to this problem. My original thought was to create and destroy the systems from within the application layer, and share these with the game states. With the new desi…
638 views
VBStrider
May 05, 2011
Cellular automaton, raw image data, and game states
[size="3"] Cellular Automaton

I learned a new term this morning: "Cellular Automaton". It's basically a grid where something can be in each grid cell and the state of that something depends on certain rules about the surrounding grid cells (its neighborhood).

An example of cellular automaton be…
627 views
VBStrider
May 04, 2011
The layers of the framework for a game
Getting back into coding after a few weeks leave was a bit rough, but I managed to get the windowing and some basic game state code in place.

My plan is to split the code up into the following layers: Main, App, Systems, and Game State.

The main layer is pretty much just WinMain(). It handles the c…
397 views
VBStrider
May 03, 2011
Learning HLSL, and D3DX updates too often
If you want to learn HLSL, I highly recommend ShaderX2: Intro & Tutorials, specifically the article "Introduction to the DirectX High Level Shading Language". The book, along with a couple of the other ShaderX books, has been made available for free over at http://tog.acm.org/resources/shad…
1,160 views
VBStrider
May 02, 2011
Placement new and memory allocation methods
While reading about memory management, I learned about something called "placement new". "Placement new" is the new C++ keyword, except you pass a memory address to it for where you want the object to be constructed. Placement new doesn't allocate memory for the object, so I suppose it is one …
811 views
VBStrider
May 01, 2011
Branch prediction, LHS, and casting with floats
While reading "Pitfalls of Object Oriented Programming" I discovered a new term: "Branch Prediction". Branch prediction is an optimization used by the CPU when it encounters a "branch" in the code. A branch is basically an if-statement; depending on some condition, execution will either contin…
1,000 views
VBStrider
April 30, 2011
Sys reqs, storage caches, animation and optimization
While reading the "The Technology of a 3D Engine" series over at Beyond3D, I had an idea: Create a PC game and optimize it for a specific set of hardware. This would be similar to writing a game for a console, and could be useful for setting the system requirements for a game. This idea is mo…
753 views
VBStrider
April 29, 2011
Constraint solver types
I spent most of the day reading about constraint solvers (as well as error correction). It seems like you can categorize constraint solvers as either sequential or simultaneous.

Sequential
Sequential solvers solve each constraint individually. Because solving one constraint could invalidate anot…
1,166 views
VBStrider
April 28, 2011
Daily game programming blog
This blog has been a little slow. One of the reasons for this is that I have been limiting it to newsletter posts only. However, there isn't always news, so some weeks a newsletter is not released.

In order to make this blog a bit more active (and interesting I hope) I have decided to repost my da…
773 views
VBStrider
April 10, 2011
Newsletter #81 - Physics and Game Logic



News

The seventh demo of the SHMUP has been released. For details, click here.


From the Programmer
Written by Invisible

Now that the SHMUP has been in development for a while, it's starting to get a bit texture heavy. Because of this, some users have been unable to run the game due to a lack of vi…
833 views
VBStrider
March 24, 2011
Newsletter #80 - Time of Intersection



News

The sixth demo of the SHMUP has been released. For details, click here.

The SHMUP is now officially an IfThen Software project. http://www.ifthensoftware.net/forums/index.php?showtopic=2231.


From the Programmer
Written by Invisible

Last week I was stuck on what should have been a simple problem:…
663 views
VBStrider
March 18, 2011
Newsletter #79 - Heightmap Tool Complete



News

The fifth demo of our test project (a vertical scrolling SHMUP) has been released. For details, click here.


From the Programmer
Written by Invisible

The heightmap tool is finally finished! Since I decided to use the arrow keys rather than the mouse to move the tile selector, the tool was comp…
679 views
VBStrider
March 10, 2011
Newsletter #78 - Moving Enemy Ships



News

The fourth demo of our test project (a vertical scrolling SHMUP) has been released. For details, click here.


From the Programmer
Written by Invisible

I spent the majority of last week working on the alien ship's movement. They needed to enter the screen and then circle around in front of the …
610 views
VBStrider
March 04, 2011
Newsletter #77 - Destroying Aliens



News

The third demo of our test project (a vertical scrolling SHMUP) has been released. For details, click here.

Forum account registration has been reopened.
http://www.ifthensoftware.net/forums/index.php?showtopic=2201


From the Programmer
Written by Invisible

We have postponed the heightmap tool whic…
647 views
Advertisement

Popular Blogs

shawnhar
Generalist
101 Entries
10 Followers
15 Entries
11 Followers
johnhattan
Programmer
1,277 Entries
48 Followers
ApochPiQ
Generalist
628 Entries
44 Followers
dgreen02
Generalist
338 Entries
56 Followers
Advertisement