Kevin Lam's Programs


Welcome to my programming site. Below are some of the programs I have made using C++ (and recently also Visual Basic 6). Feel free to download them and have fun with them, learn from them, steal code from them, laugh at them, etc. Only, if you want to steal code from them, please tell me first so that I can at least feel properly superior about it ;) And if you have any questions about the programs, or if I have forgotten to include the source code in one of the zips, please email me at hunter_guy_2@hotmail.com. Happy downloading! :)


Maggots!
One of my latest projects - a Liero-style game (ever played Worms? Liero is real-time worms :D). Except, it has less weapons. And it has a console that supports pseudo-halflife styled scripting, including key binding, aliases, limited exec'ing of scripts, dynamic CVAR control, etc.. Oh yeah, and the "maggots" carry big swords to hack each other to pieces with :)

NetMaggotz! v2.0
The internet version of Maggots!. It is slow due to the inefficient code/algorithm for networking, although playing on a local area network should be fast enough. Advantages of NetMaggotz! over Maggots! are (obviously) the ability to play against friends over the internet, and also, mashing and holding a bunch of keys won't block your opponent's keys since the keyboards are completely independent of each other. Disadvantages are bugs(?) and slower gameplay. Specifically, the game can only run as fast as the slower computer, and then a little slower due to the networking code. **New in v2.0, players actually swing when grappling; also, fixed the sword hit-detection arc to be consistent with the animation.

**News: Fixed bug in both versions of Maggots that caused the game to crash on startup in Windows95/98/ME systems. Also, updated Maggots! to be consistent with NetMaggotz.

Soon to come: Maggotz III: Arena
The (as of the moment) unplayable sequel to Maggots! and NetMaggotz!, which will allow up to 256 players to play at once. Although, of course, 4 is probably a good number of people to stop at since there isn't enough room for 256 players to fit on the screen ;) Things to look for in the future:

-Platforms to jump on, which will eventuallly evolve into pseudo-maps, editable using notepad or any other text editor
-Possibly upgrades that will fall from the sky, including medical kits, bazookas, dynamite and other stuff (think Worms)
-Other things when I think of them, or whenn someone suggests them to me

News (Jun. 07/2004): Still more delays. I'm having *issues* rewriting my WinSock wrapper with asynchronous event-driven sockets. Current release date tentatively scheduled for the end of summer :(

ICerView
This is actually 2 programs (Client/Server). Clients can create accounts, then upload files to the server, share/unshare them, rename them, delete them, and download files that other users shared. Clients can also login as guest or admin; as guest, clients can only download shared files, while admin can have basic control over the server (shutdown, get user info, etc). The server can share/unshare files, drop users, set a password for admin (blank for no admin access), etc. Unfortunately, there seems to be a problem with running the server on WindowsXP for some reason - it works fine on 98SE, but it had problems sending files to clients in XP.

Reach For The Top (Server/Client)
This is a multiple choice trivia game that uses WinSock (TCP) to network between a server and several clients. The clients answer questions as fast as they can, and as each question is answered, the server sends the stats for the question to each client. At the end of a round, the server sends both the round stats and cumulative stats for each client. The scores for each client connected on server shutdown are logged in endscores.txt. The server was written in C++, while the client is written in Visual Basic 6. I wrote the server myself, but the client was jointly developed by myself and Gord Parke, a classmate. The purpose of the program was to help train the school's Reach For The Top team (hence the title), but we finished developing it too late so it'll have to be for next year. Both sides of the program are dialog based. Note that "Detect IP" only works on the St. John's-Ravenscourt School network, since it depends on a file called "HostIP.dat" saved by the server on a shared drive.

Kid Math (Server/Client)
This is a head-to-head competitive game designed for kids around grade 3. A random arithmetic problem falls from the top of the screen, and the object of the game is to answer the question either before somebody else does, or before it hits the bottom of the screen. If you answer correctly, the question will explode. If somebody else does, or it hits the bottom, it will simply vanish. Regardless, once a question is 'done', a new question will be sent after a delay of 2 seconds. The server keeps a record of who answered which question correctly, and the time it took them, both in a listbox and in endscores.txt. However, as with Reach For The Top, it should be noted that on the 'connect' screen of the client, 'go' will NOT work properly unless on the St. John's-Ravenscourt School network, for the same reason. To make this work on other networks, the client will need to be modified slightly to either allow input of the IP, or to read a different file for the IP.

Space Shooterz
My first attempt at a real-time game, this is a simple (well, actually not really) space-shooter game where the aliens keep coming at you in waves, with one more alien each time you defeat a wave. The controls aren't standard, but are simple enough to get used to. The point of the game is to get a high score that your friends can't beat :) Sorry, but there are still lots of bugs in this game, although it is still very playable and somewhat addictive if you get into it. Its slow running speed at some points is due to the use of the slow Windows GDI for graphics.

Space Shooterz DX
YES, it is a sequel to Space Shooterz! Well, not really actually. But this one is very much improved, as it uses DirectDraw for graphics and runs much faster than the original.Controls are now more standard - you can use the arrow keys to steer, and ctrl, shift, enter, alt for attack, cycle weapons, limitbreak and last weapon. The old controls still work, for those people like me who play 3D games a lot and are used to using the left hand for steering. Also, the ship and aliens now explode when destroyed, and even missiles have fancy explosions (and splash damage)! To top it all off, there's sound and music too!

**Note: May run very slowly on some machines (usually Windows XP). To (usually) remedy this, download and install the newest drivers for your video card. Also of note is a glitch for some WindowsXP computers, in which it will start minimized and be unable to do anything. Sorry, I don't want to spend too much time on this at the moment; I may update it in the future though.

Feminist Literature Memory Match
A memory match game whipped together in two days for a 'Creative Assignment' in English class. The topic for the cards/questions is The Edible Woman and A Doll House, the two pieces of literature that are currently being studied in English. In case you're curious, the shorter-than-average development time is due to my using:
a) My existing Windows API base starter code, thus saving quite a lot of time from retyping all that boring stuff (and also because it's neater to look at).
b) My existing GDI graphics wrapper, which saves about 2 days' work on graphics code, and another 3+ days' worth of debugging weird GDI problems.
The picture on the 'back' of the cards can be modified using Paint or any other similar program. The clicking boundaries are hardcoded, so changing the dimensions will only make the game look and act strange. The questions and answers can be modified in questions.dat using Notepad (line 1 = question, line 2 = answer, repeat etc.). Any questions past the first fifteen (=30 cards) are ignored, although the placement of cards is random for each time the game is played. A note on the format of the question file: There MUST be at least one line past the fifteenth question (there should be at least 31 lines) for them to load properly, or there will be runtime errors. Sorry, but the title isn't customizable. I would have made it an option in a config file or something, or even just titled it "Memory Match" (although then the teacher might suspect that I'd just stolen someone else's game or something...), but I'm impatient to get moving with Maggotz III: Arena :) Adios, amigos!

Theseus and the Minotaur
An imitation of the one you can find by searching on Google. There is only one level - the first level of the game I copied it off of :P I did it for a "homework" assignment some time ago, and didn't want to have to make up my own level. This was my first attempt at a Windows game, so it is quite simple, although (I hope) bug-free. Uses Windows GDI for graphics.

Text Editor
What the name says ;) A simple, functional text editor that can "open", "edit", "save", and "save as" files. Note: this was my first attempt at independent Windows programming; poorly coded and debugged. Also, as has recently come to my attention, the source code is missing and I can't find a copy of it anywhere. Consequently, this program is compiled download only.

Tic Tac Toe
The name says all ;) Play against a friend or the computer, although preferably against a friend, since the computer just chooses random positions. But be careful, the computer still wins sometimes :S This was my second attempt at a Windows game, and also uses GDI for graphics. This one is also, I hope, bug-free.