Random things uavfun thinks are cool

Profile
None
Shiny things? Awesome. Things that are not shiny? Possibly awesome.
17 comments
14 entries
Advertisement
uavfun
August 29, 2006
LOL IT IS MUSHU
873 views
uavfun
August 16, 2006
Tic-Tac-Toe
Source + installer (needs .NET Framework 2.0).

AI is moderately stupid, it will go for an obvious win or block yours but that's about it.

Summary of victory checking, since someone was asking about it:

For each player 'p':

bool won = false;
for (int i = 0; i < 3; i++)
{
// Column
if (gameBoard =…
857 views
uavfun
May 10, 2006
Taskbar Calendar, version 3

Download C# source and ClickOnce installer
Needs .NET Framework 2.0



Tidied up a bit, looks a little nicer now. I've set it to open near the mouse, without going off-screen or covering the taskbar, and close on deactivation, so it's more like an overgrown balloon tip than a complete window.

Note: The …
903 views
uavfun
May 01, 2006
Asteroids Part 2: Sprites and Asteroids

Download C# source code and ClickOnce installer - requires .NET Framework 2.0

Designing the Asteroid class
Most of the movement code is the same for the player and the asteroids. The asteroids' movement is somewhat simpler since they have some initial random velocity, but never accelerate, but this c…
1,093 views
uavfun
April 30, 2006
Asteroids Part 1: Basic Movement

Download C# source code and ClickOnce installer - requires .NET Framework 2.0

The first step is to get the ship moving around the screen properly. For now, there are no asteroids, and the ship is just a line.

Although the example game is written in C#, the math and logic will be very similar in most …
1,010 views
uavfun
April 29, 2006
Taskbar Calendar, version 2

Download C# source and ClickOnce installer
Needs .NET Framework 2.0

Double-click to open the fancy world clock/map:


The yellow line is noon, blue is midnight. The bright/dark areas are split at 6:00 AM and 6:00 PM. It's not 100% accurate given the peculiarities of time zones (and of course the sunset…
900 views
uavfun
April 29, 2006
Taskbar Calendar, part 2

Download C# source and ClickOnce installer
Needs .NET Framework 2.0

Double-click to open the fancy world clock/map:

The yellow line is noon, blue is midnight. The bright/dark areas are split at 6:00 AM and 6:00 PM. It's not 100% accurate given the peculiarities of time zones (and of course the sunset…
839 views
uavfun
April 28, 2006
Taskbar calendar icon

Download C# source and ClickOnce installer
Needs .NET Framework 2.0

Quick one* - makes a taskbar notification area (system tray) icon that shows the day of the month. If you hover the mouse cursor over it, it displays the full date.

Every 10 seconds it checks to see if the date has changed - if so, i…
934 views
uavfun
December 16, 2005
Fun hacks to fiddle with colour
Download the RenderMonkey workshop
HDR source image not included, it's too big - you can download several from Paul Debevec's site, then convert them to DDS with the texture tool in the DX SDK

Creating the shader
This sort of effect is easiest to do as a post-process. You only need to do the calculati…
759 views
uavfun
July 20, 2005
Add some of nVidia's free textures and...


...it's no longer a greyish blob.
The little blue ball you can barely see at bottom center rolls around the terrain. ODE's heightfield collider seems to work quite well (the trimesh one was hopeless for the terrain).

Edit: The textures can be found here
1,004 views
uavfun
July 14, 2005
Not as pretty, but...
...it works.

Simple filter run on the height values - basically, points higher up than their neighbours come out brighter, and lower-down points have more light blocked. Nice and soft and subtle, as outdoor shadows should be.

701 views
uavfun
July 09, 2005
ATI's ambient occlusion thingy was too slow...
...so I made a per-vertex one to play with. It works out looking just as nice for a detailed model, and means one less texture - the data can just be stuffed into the vertex colour. Interestingly, this approach would work just fine on a card that doesn't even support multitexturing. Lighting is a w…
737 views
uavfun
June 26, 2005
Blurry reflections


This one's easy - blur the skybox image for less of a shiny polished metal effect. I tried using multiple samples in the shader, but that's slow and doesn't look all that good. Turns out that just blurring the individual cubemap images works fine. There should be errors around the edges of each im…
844 views
uavfun
June 25, 2005
Ambient occlusion
Lighting using a precalculated cubemap


For every point in the cubemap, the colour is calculated by finding the lighting on a surface whose normal points from the center of the cube to that point. Here it's calculated from a few directional sources (the sun and a reddish planet). It's also possible t…
917 views
Advertisement

Popular Blogs

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