Welcome to Shedletsky's Code Library. I really need to come up with a snappier name, maybe something along the lines of "Shedletsky's Crazy Code Collection" or "Code Ode". I could even do the l33t thing and try something cryptic like "cOD3". Heh. Shedletsky's Cod Three website. I could do it up with pictures of cod and nobody would have any idea was going on...) Backing slowly away from that strange digression, on this page you will find the source code of a lot of my little programming projects. Every so often I'll throw more stuff up here, so check back once in a while :-).

"cOD3" - Confusing, isn't it?


visitors since July 16, 2006


Table of Contents - Quickly Jump to Something Interesting

Complete Applications

Printing Colored Text Spaceship Demo Graphing Quadratics SpaceWar (C++)
Playing a Sound File So Real Surreal Boogy Buggy Demo   ShedNet Checkers (VB 6.0)
Blackjack Random Dungeon Generator
Fimbulwinter Chess Engine (C)
Really Bad Bubblesort   Perlin Noise Demo Poor Man's Paintshop (Java)
    Tetris Attack Demo Tetris With AI (Java)
    Witherwyn Project Notebook (C#)
      The Perlin Device (C# and C++)
Haven't had enough? Try some of these great links!

C# Applications
Code Description
Quickie Hough Transformer
Language: C#

I wrote a quick program in C# to perform the Hough Line Transform on various input images to solve a problem on my machine vision homework. This transform is useful for finding and extracting lines from a source image. I am mainly putting it here because it can create pretty pictures.

- January 2006

Adventures in the Infinite Realm of Witherwyn
Language: C#, Managed DX9

Witherwyn is my attempt at a graphical roguelike game with an easy to use interface. It is not yet a playable game, but I have set up a project page for it. At the moment this page serves as a distribution point for Witherwyn's C# source, which I believe may be of some general interest. Witherwyn is undergoing active development, so watch this space!

- August 2005

Tetris Attack Demo
Language: C#, Managed DX9

I started a project a while ago to write a version of the SNES game Tetris Attack that would be playable over a network and fix several naggling issues from the original game. But then I came to realize that internet latencies are way to high for a game of split-second timing, like Tetris Attack and that the end product would likely be unplayable. This demo represents a nearly finished single player version of the game. It detects chains and combos, but doesn't scroll the board up as you play. I am interested in eventually adding an AI to this game, since the computer player that comes with the original game is easily beaten.

- April 2004

Generating Random Planets with Perlin Noise
Language: C#, Managed DX9

One of the projects that I'm kicking around in the back of my mind is to write a (massively) multiplayer space game. I thought it would be neat to be able to randomly generate planet textures in realtime as they are needed. This little demonstration is a proof of concept testbed for generating procedural textures using Perlin noise. It allows you to tweak a large number of parameters to create noise fields, and can then map them onto a rotating sphere so that you can get some idea of what they look like. This little feature was added in so that I could learn how to use Managed DirectX 9 from the .Net Framework. At the time, the MDX docs are spotty at best (and that's being really generous), so it's a bit of an accomplishment. DirectX issues aside, C# is fast becoming my favorite programming language. Using C# it's possible to write a lot of code really quickly, and unlike Java it compiles to native code behind the scenes without any fuss.

- August 2003

C/C++ Windows Applications
Code Description
Ship Demo - 3D Accelerated 2D Grahpics
Language: C++, Win32, OpenGL

I'm currently tinkering around with the idea of making a massively multiplayer space warfare/trading game. In the past, I've used sprites and DirectDraw to do all my 2D game projects, but DirectDraw is being phased out and was rather inconvienent (if you wanted a rotating sprite, you'd have to get lots of pictures of the same object and flip them). What a pain. Recently I've started messing around with OpenGL (IMHO a much nicer API than DirectX) and I wrote this demo to explore the orthographic projection, which can be used to do 2D graphics at 3D speed (ironically, this is often much faster). Not that all the game objects have to be 2D, as the big rotating planet in the background demonstrates.

- January 2003

Shedletsky's So Real Surreal Boogy Buggy
Language: C++, Win32, OpenGL

So, orginally I was planning on fleshing this thing out into a fully functional network racing game where you would drive a little buggy around, equipped with nerf cannons, trying to gather little purple spheres and boxes. The basic premise is kind of surreal, but I figured it would be kind of neat because the entire game uses the ODE (Open Dynamics Engine) library for realistic game physics. That kind of fizzled out when school started, and now if I were going to go back to it, I would complete rewrite it anyway, but I figured someone out there might find it useful, since there are very very few game-related physics sim demos online.

- January 2003

Random Dungeon Generation
Language: C++, Win32

At one point I was working on a rogue-like game in C for my TI-89 and I was experimenting with random dungeon generation techniques. My TI C compiler has zero debug capability, so I developed the algorithm in this Windows program and then cut and paste when it was working. Just something to look at. Since the end platform was intended to be a 12-Mhz calculator, it's a very simple approach to the problem. Maybe some one can use it as a starting point for a game.

- June 2001

Complete Applications
Code Description
SpaceWar: A Fun Game to Play
Language: C++, Win32

SpaceWar is a simple program that I wrote in the September of my senior year at high school to learn how to program for windows with C++. It's basically your traditional game of space combat in beautifully rendered vector graphics and played to brillaintly harmonious MIDI masterpieces. SpaceWar provides support for up to four players at once on the same computer and sports a variety of different modes of play.

- August 2001

ShedNet Checkers
Language: Visual Basic 6.0

ShedNet Checkers allows two people to play a game of checkers across the Internet or LAN. ShedNet Checkers provides dual checkers program and chat room functionality - allowing any number of clients to log on to the main server to talk, watch, and play friendly games of checkers.

- July 2001

Fimbulwinter Computer Chess Program
Language: C

Fimbulwinter is a Win32 chess engine written in C that is under on-going development. Fimbulwinter can be played through its native console "interface" (and I use the term loosely), or through Tim Mann's WinBoard, which provides a very nice graphical user interface, the ability to match two WinBoard-compatible programs against each other, and the ability to run Fimbulwinter on online chess servers such as ICC and FICS.

- July 2002

Poor Man's PaintShop
Language: Java with SWING, Jini, and Xalan

Poor Man's Paintshop, or MiniDraw, as it was called in school was a project that I did for my CS108 class freshman year. MiniDraw is a Java MDI vector graphics creation program that allows the loading of saving of images in XML and exports pictures to PGN format. As a drawing program, it's one of the most typical inheritence projects to do for a programming course. And as far as pathetic little Java draw programs go, this one is on the top of the heap.

- August 2002


Java Tetris with AI
Language: Java with SWING
This program will allow you to play a regular game of tetris on any platform with a Java VM, pretty sweet, no? Maybe it's not. Tetris is a quintessential programming project and every hack out there has written his own copy. The difference between those programs and this one is that my tetris game will play itself - it's got built-in, and potentially extensible, AI that will play tetris. For tetris buffs, it also has "Malice Mode" and "Happy Mode" that, when enabled, will either try to screw you up by giving you the worst possible blocks at the worst time, or will toss you a bone every now and then when you need it. Give it a whirl.

- August 2002

Project Notebook
Language: C#
Professional programmers in the industry use serious project management software tools to coordinate development efforts. This is not one of those tools. Of course, it won't put you back several thousand dollars either. The main value to be had here is that Project Notebook is an excellent demonstration of data-binding in C# (something I was unable to find elsewhere). DataGrids, DataSets, Listboxes, Combo Boxes, Edit controls are all wired up together with very little explicitely-written code. Data is persisted as XML using a schema built in the .NET GUI. While all this database-related stuff is kind of dull - this is exactly the kind of thing that you would want to know about if you were writting any editting tools for game development.

- June 2003

The Perlin Device

Language: Client in C#, DLL in C++

This is an update of my original Perlin noise texture generator. How is it different? In two significant ways. First, I have solved the problem of texture warping caused by generating a flat texture and mapping it on to a sphere. This was accomplished by generating 3d noise and sampling points on the surface of the sphere. This generates a really good looking texture, with no polar distortions. However, it is slower than generating 2d noise. To generate a 1024x1024 sphere-mapped texture took 30 seconds on my machine. I thought this was too slow. So I translated all of my texture generation code into C++ and encapsulated it in a dynamic link library. The result is a super-fast texture generation function that can be used from any language!

This code consists of two parts: the DLL written in C++, and a sample client application, written in C#.

- April 2004

C/C++ Console Applications
Code Description
Printing Colored Text
Language: C++, Win32 Console

Here's a code snippet that will let you print colored text in a Windows console program. I can't really imagine why you would want to, but here it is. Maybe you'll write a clone of ZZT or Kroz. Those were fun games...

- September 2000

Playing a Sound File from a Console Application
Language: C++, Win32 Console

Here's a code snippet that will let you play a .wav file from inside of a console application. Your rockin' ASCII graphics game is going to need some ambient music :-)

- September 2000

Language: C, Win32 Console

Everyone's written a blackjack program in C. Here's mine.

- October 2000

The Recursive Bubblesort Algorithm from Hell!
Language: C, Win32 Console

This is just something I wrote for my own amusement. It was intended to look befuddling, with #defs everywhere, monkeys running around, and the best-named C function anywhere, "And_Then_A_Miracle_Happens". But now it looks kind of amateur to me. I can write much more obfusticated code these days...

- October 2000

C/C++ MFC Applications
Code Description
Graphing Quadratics with MFC
Language: C++, MFC

Just something I made while learning how to use MFC. I'm not sure what you might expect to get out of it. I've been reading Stephan Wolfram's A New Kind of Science and he keeps plugging his company's Mathematica. It's shameless. Well, there are cheaper alternatives out there. Much cheaper.

- September 2000


High Quality Programming Websites Incredible game programming site - the best I've ever found. Forums, articles, links, game news, demos, finished projects- it's got it all. NeHe has a very large (~40) collection of high quality OpenGL tutorials and a bunch of other OpenGL - related demos and projects. Site of the Open Dynamics Engine (ODE) which allows you to add real-world physics to your games without first needing a degree in mathematics. Has a large number of (mainly OpenGL based, but some DirectX) game programming demos, some on topics that NeHe is yet to cover.



A note from the author:

This site only really gets updated when I completely finish a project/interesting code snippet. I am actually a much more prolific coder than this page would make it appear. You can potentially read about my current projects on my weblog. Then again, all you might find there is a bunch of innane personal drivel. It's really a mixed bag.


Do you think this site is good enough to link to? Find out how...