These programs are all part of my website. I made them all by myself, except my brother helped me on Tank Wars (I was not great at programming back then), we didn't plan tank wars very well so it got all screwed up. They're in order of creation, kinda... To get a full size screenshot, you can click on the thumbnails. The thumbnails are parts of the image that are not scaled down. Click "DOWNLOAD" to download, Some have links for source, other are included in zip.

The newer programs are bigger (bit over a megabyte), because they are published, and include dll's, this way they can run on a computer with different references then mine. These are mostly (all now) for DirectX. Most (if not all) of the later programs are C# 2.0, click any of the links to download. Kind of a hassle to install though, the published versions might run without it (not sure).

Some of the programs are physics engines. They're mass spring systems. What they do is have atoms, which are particles. These "atoms" have different properties (Move, Location, Fixed...), and collision detection (Physics Engine, circle - line). These particles are connected by springs (or constraints), which can break. This Simulates deformage. Springs can explode however, to fix this increase the timestep. Or use a better intergrator (aka RK4, not Euler).

Most of these programs are written in C# or Visual Studio, some of the older ones are written in Textpad.

C:\WINDOWS\Microsoft.NET\Managed DirectX\v9.03.91\

A dll for running the programs download (try to put them in the folder listed above)

Another way to try to get unpublished programs to run is to reset the references in the program.

Spring Engine - Uses GDI, A simple 2D Spring Physics Engine with source code. Updated spring works are a lot better. My first try at springs. Very old.

 

C# 2.0, DirectX 9 (Managed)

A 3D Rendering program, loads models, lights and renders them. Uses per pixel lighting w/ specular highlights and shaders. I have a ink n' paint (sort of) shader and a bloom shader. The bloom shader is non HDR, so is sort of a "fake bloom", I do not use a threshold, but an expenetional function.

If you want to put on antialising on put it on manually with your driver (usually CCC or NView). The shaders are completely customizible, and use a C like language to program, and are complied at runtime. The shaders I wrote are not very optimized (non hardcoded for the most part). To run this you need to have a video card with pixel shader 3.0 support. If you do not you can still edit the shaders to run with pixel shader 2.0, but you will have to edit them and put in your own.

You can put in your own models, you might have to change the name of the model to match one already in the program (easy hack), or edit the program (look in the Simulation class) to add or replace a name. All these models were made by me in 3Ds Max. Something weied is is if I put on anything but Point or None for filtering I get Horizontal Lines, might just be my card though.

Btw, the download is huge, because of all the textures the models use.


 

C# 2.0, DirectX 9 (Managed)

This is basically a shader that creates the mandelbrot set, it runs suprisingly fast, but I have a problem that yoou can't zoom in infinitely, kinda the point of fractals. So if anyone finds out how feel free to email me.

The rendering is done by drawing a quad to a screen and running a shader over it, that draws the set. The colors are controled by a texture, which is easily editible. The zooming may be limit to the accuracy of floating point numbers, but that is a bit unlikely.

As you zoom in further the computer (or rather the video card) has to run more iterations to keep the level of detail sufficient, there is also a 1024 loop limit, the entire screen is redrawn in realtime, but I think if it was designed to invalidate only parts of the screen it could be faster, Another thing that could be added is fractals in 3D, but that just makes my head hurt =) If you edit the shader you can make other stuff, like gradients, each pixel is passes x and y (in 0 to 1).

I also tried to add antialising and it worked, but was slow. You can change the way it renders the set too.


 

C# 2.0, DirectX 9 (Managed)

This is my first crack at shaders, it runs a shader on a texture, you can have multiple pass shaders (like a bloom shader). The test image is a bicycle I made in 3Ds Max.

The bloom shader runs by running a few passes, firstly it runs a threshold pass, which is if the RGB of a pixel is over a certain amount, it saves it. Ideally if you have HDR if the color is over 255 (or 1, however you want to think about it). It takes that color and desaturates it (or not totally doing so can have a cool effect).

Then a horizontal and vertical blur is applied (seperately, and in whatever order). It takes that and adds it to the image you had at the start, viola! you have bloom. The horizontal wave is just a sin wave running horizontally displacing the pixels.

The shader can sometimes screw up if you have filtering applied (other than Point or none), making horizontal lines, it may be alternate pixel centers (ATI only), but CCC is not working at the moment, installed a new driver but not the whole thing and it dosen't open.


 

C# 2.0, DirectX 9 (Managed)

This is alot like Spring Sim 4, but rewritten and uses textured quads to have a texture mapped to the springs. There is a distortion effect around the cursor, not using a shader, but just offsets the points around it, purely graphical. You can put in your own object and rip it apart! The top left pixel is the "blood" color, or for example, rock for a building (grey?).

The program can be tweaked mostly by changing values in the class "Simulation". To change the resolution of of the spring mesh, look in Base. The underlying mesh is visualized as a lattice, with motion blur applied.

Controls:

F5 - Reset

LMB (Hold) - Repulse (Small)

Space = Bomb (Repulse, Big)

The texture used is one I made, it's not very good thought... To turn up the stiffness of the springs increase the number of steps, The springs are simple Euler.


 

C# 2.0, DirectX 9 (Managed)

This is a mass spring simulation, it uses a bitmap to figure out what the objects will look like, the images which are used can be edited to look like anything. The images just check for the color, if the color is white on a particular pixel on a bitmap, the constraint will not be broken. So if you want to make your own bitmap make it like an alpha map, but the background dosen't have to be black.

After the stuff has been cut out (like a cookie cutter), there are alot of extra constraints and particles, so you have to remove the extra ones. I made it so you can have a mesh of triangles or squares, the squares were very easy to make (I auctually based it on some cod I used before), the triangles however were a bit tricky to make.

For rendering I used lines and polygons. I used the lines so if the object was not moving you can still see it. The polygons I used for motion blur, I used a quad (two triangles), I also have a texture drawing to the background darkening it, so you can have long trails on the objects.

Controls - For the controls press 1 to generate a square mesh, press 2 to generate a triangle mesh. LMB - Select Point RMB - Repulse from cursor


 

C# 2.0, DirectX 9 (Managed)

This is a program that is a huge particle simulation (hence the name). I used sprites to render the points, with streaching and rotation applied. It was a alot times faster when I rendered using only lines, but looked crappier.

The project is not published bacause I couldn't get the PNG of the line (particle), to embed properly. So I just included an executable with source code. The particles use structs, and are rendered with alpha blending. THe type of alpha blending is switched aroung during rendering so I can get the background to clear only partially eack tick. This is a easy way to make "fake" motion blur.

At the start I clear the screen to white, not black (the auctual color of the background), I do this because when I paint over the screen each tick, rounding errors cause the color to stay a bit above black, it's cheap and dirty, but it works.

I'm using a size of 64 x 64 for my textures, a bit big but you can create a fake bloom sort of effect if you put a glow on everything. The textures are square and divisible by 2, this causes less compatibility problems, and works well. This was not a hard program to make. The mouse has a spring to the particles, click to activate.


 

C# 2.0, DirectX 9 (Managed)

A program that simulates shadows from an omni light (not too hard to change light type), falling onto spheres. To find edge points of a shadow on a sphere was a bit hard, i did a magically divided by Pi and it worked, so i'm not complaining... =)

(Radius / ((Position - light.Position).Length() + Radius / SMath.PI2 )) * (SMath.PI / 2);

This calcuates the angle from the center the point is, anyways. The rendering using multiple samples to create soft shadows, putting them at an angle to make them disperse. This uses no pixel shaders, it does not even manipulate the frame buffer. The falloff of the light was modeled using a circle, surrounded by a ring (farther = darker).

The rendering uses a lot of alpha blending. The circles do not use multisampling, but instead are surronded by an antialised line (Edit: Only Nvidia?, does not work on my ATI card). Hardware supported, usually. If not turn on antialising manually (Catalyst Control, Nvidia Manager). To color the light the back color has to be changed, this is because you draw shadows, not light. This is a bit anti intuitive, but again, no shader used.

The spheres are not shadowed, but it is hard to notice because the falloff affects everything, including the spheres. I might try to implment some other shapes later... This all combined creates a fairly convincing effect, abiet, a bit cartoony though.

Source Code


 

C# 2.0, DirectX 9 (Managed)

This is actually two programs, but they are both similar. The first program has many different types of simulations in it. First of all it has a few types of springs, they ar Sqrt which is a basic spring qith good damping, but a bit slow to cacuate. There is Exp which gets larger Expentionaly, which is faster but dosent damp as well, but is better used in ropes where points need to be closer to gether and energy needs to be transmitted.

The springs here have a damping cap (both programs), so they do not explode. In #2, there is rope, deformable sphere, box, cloth, and fluid simulation. For ecporting the programs I published them so they could run on more computer, this however makes the filer slightly lerger for the needs to package the dlls with the file.

If you want the source code click on the link below. On with #3, the springs have a max diff, if the exceed a certain amount they get turned off, this is like the physics engine called Physical (very nice engine btw). It however does not have repulsion, but I would have to have linked lists to have the speed needed. A way to speed up your program is to use structs, just don't pass aroung too much (has to copy each time), the are hundreds of times faster than classes in some cases though. Try to keep the struct under 16 bytes if you can, a bit over dosen't do too much though (int = 4 bytes). Spring Sim #3 has motion blur implmented (multiple renderings, optimized). Added: Trail affect. Dosen't clear, just darkens.

Source Code


 

C# 2.0, DirectX 9 (Managed)

This is a huge cloth sort of simulation. I copied the one used in geometry wars (360), very cool geame by the way. The thing is auctually a giant grid, with springs connectiong everything together, press space to set off a bomb. The reason I could get such a huge grid is because I used structs, in one of my other programs (Physics Engine, directly under), I tried to recreate this effect, It however was too slow to get much of a grid, this though, has 13056 particles and 38938 springs.

It can run on a slow computer though, because the rendering is done using lines lists, a huge list is passed to the video card each update instead of in seperate chunks to speed up the process. For the springs (used to simulate), I used basic iuler intergration bacause with it it did not explode and it is the only on I currently know how to do (I'm trying to figure out RK4), on my other program (Physics Engine), I juust used multiple evaulations per timestep. This program looks really cool. Another thing is I used was antialised lines (just set in renderstate, during initilization of the device).

DOWNLOAD version WITHOUT DLL's, smaller, but may not work. SOURCE CODE


 

C#. This is a physics engine. When I started this, it was pure GDI. Now it is Managed DirectX. The particles are sprites (with rotation). The particles have collision detection against the lines.

I also implmented springs, with 4 timesteps per update. The springs can snap, which simulates breakage and deformation. They also simulate rigid body. The rendering also uses tringles and lines (for the lines). If you have a nice graphics card you have to manually turn up the graphics.

The collision detection is auctally line to line, but with a few tricks i turned it to circles, which were automatically swept cause I was using lines. I made the Renderer and Physics class detachable and easily used in another program, Mostly the renderer, it would be very easy to use. The way the springs and particles affect each other to simulate physics, is called a mass spring system. This uses C# 2.0, so you might have to download it.

C# 2.0 Download


 

A particle engine. It uses Managed DirectX sprites. It draws a whole bunch of the same image to the screen, using alphablending blends them into the final image. You can change the picture to make some cool affects. This took a bit more than an hour to make. The particles spawn at the mouse cursor, I have not put in a lost device method, but it is fullscreen so it should work. Press Esc to exit. You should use 32 bits of color for this, it dosen't look great at 16 bit, the blending screws up. It can simulate an HDR sort of affect, but it dosen't use any at all. You can tweak the program, change the colors, life, ect... The source code is included in the download. The falloff is constant, but it wouldn't be too hard to change.


 

This game is a top-down shooter. It took about 3 months to make. It the first type of this game we made, making it slightly messy. It has three maps included with it. If you want to download the game with the source code click here on zip,or rar. if you want to download the game without the source code click on the link below (or here for the rar). My brother Free helped me make this game. The collision detection not great, but playable. The physics are limited. It draws all of the game in GDI graphics on a Panel, in the center of the screen. The code eventually got messy because of lack of planning. The entire program is drawn through circles, lines, and rectangles. It has a few bugs, but for the most part it runs.


  In this game you pilot a UFO trying to collect fruit and stars. Can play with up to three people. The hardest part in making this game was the collision detection between the UFO's. The interobject collision is so buggy it dosent work, so on defult it is turned off (but you can turn it on). Also you can change all the game options (e.g. gravity), and there are also some premade states which are a bit cool. The game itself took about two weeks to make. Probabally one of my better games I've made. I like the UFO's, It is a grey UFO image with a circle with alpha applied onto it. All of the graphics were made in 3Ds Max.

  This program is like the normal minesweeper but it has an underwater theme. It took an while to make becanus it was one of my first programs. It has neat graphics I made in 3D Max. One of the intresting parts in this program was when you click on a zero it reveals the squares around it. It has another theme that I made up. I put in some help files for it. My brother made a game like this one. When you click on a mine you get blown up. It is darker on the mines you did not click. It has full highscore support. It is just a txt document so it would be easy to hack.

  AKA - X and O's This game you try to get a row of three X's or O's. There are two themes and lots of options. The Graphics look nice and the game is simple. Has help files. Nice graphics on this game. Has the same theme as minesweeper pro but has an added fire theme. There is no AI but you can play against a friend. The font I used for the fire theme is Porky, and the other theme is from minesweeper. All the backgrounds I made in 3D max, I used fire effect and volume fog. Try clicking on the screenshot.

  Two programs, they are for recording how long you work. Working Hours is used time how long you work, it runs in the background, you just click start or stop and it counts (interval once a min). You can only clost it with Alt F4 so you cant accidently close it. Pay calcuator takes the minutes you worked from a text file (Working Hours makes), and calcuates how much you made. put in how much you make an hour and voila! calcuate becomes close program after you calcuate, click on screenie to see opposite.

  AKA - Draw Shape. This program is like a program my dad made along time ago. It draws circles where your mouse is. You can make them bigger and smaller and change the theme (or create your own). You can make some really neat designs. When you make your own themes you can set the RGB and alpha of the center and outline of the circles. I bet if you hacked the code a bit you could get it to draw any shape you want. It wasn't a hard program to make (just draw a circle when the mouse moves).

  This program it draws paths. It is only half finished so it isn't much. Originally it was suppoused to be a muliplayer game (turnbased, abit like globlous). I stopped making it when I made this site. I might do a bit more on it after though... To start you click and drag on the circle, you can make little designs =). The one part I liked about it is when it has not got to the next line it makes a part line that follows your cursor. Pretty useless but a bit neat. A bug is it dosent have a fixed lengeth, they are suppoused to be fixed but the mouse moves longer than the segments and now I'm trying to fix that.

  This is a very simple program. I made my own formula to sort numbers. It is an intresting challange. And it's harder than you would think. To sort it the program went through all the numbers and sent the bigger ones to the front, eventually it gets sorted. There are lots of ways to sort numbers. You can find alot on the internet. It can calcuate positive and negetive numbers. You can use it if you want. I'm not sure how efficient it is but it seems to work. PS - to see the results you need to put a breakpoint after Console.WriteLine;

  AKA - Tank Wars. This game is a basic tank vs. tank game. The problem with it is it had no plannning so it totally broke down. There are lots of bugs. One of them is that one of the tanks arec ontrolled by the mouse and one is controlled by the keyboard. One of the tank explodes more than once and one dosen't... Unless you have unlimited bandwinth you probabally don't want to download it.

Last Updated - October 22, 2006