Code

A random assortment of programming projects, with source code, that Hexar has created.


L33TWar is a capture-the flag game involving tanks that are part of either the red or the blue team. Each tank is programmable with an extendable DLL interface, and you can pit up to two different DLLs against each other in a game. This allows for some very creative AI programming. L33TWar was written by Jens Bergenstein, and unfortunately the author appears to not have further information on the game up on the web anymore.
Download L33TWar Game
Download AI_Random Source
Download AI_LineBot Source
Additional L33TWAR Information
Hexar2
Hexar2 is a bot that I wrote for the general purpose of capturing the flag, attacking enemy bots, and dodging bullets. It uses pathfinding, predictive shooting, and bullet-dodging tactics to achieve its goals.

Download Hexar2 DLL
Download Hexar2 Source

Hathcock
Hathcock is a bot that I wrote for the express purpose of attaining the Pong Gun and then using it to "snipe" enemy bots. It's named after John Hathcock, one of the most famous U.S. military snipers.

Download Hathcock DLL
Download Hathcock Source



Dynamic Poker

DynamicPoker is an extremely simple, graphical Poker game which I wrote in C++ and Visual Basic. You start out with $500 and you can bet before each hand, and then you are dealt a simple five-card draw hand and you get to pick which cards to keep. You can play in a standard mode, a tutorial mode, or a autoplay-mode where a "Tutorial Set" chooses the optimal move to make. The program also tracks some relevant stats as to the current game you're playing.

The thing that makes DynamicPoker interesting, at least for me, is that you can write your own AI code for the program in the form of a DLL and then the DLL will choose which cards to keep and which to discard. There are four AI agents that I created, the simplest of which just picks a random selection of cards to keep, and the most complicated one actually calculates the highest probability * payout ratio for each move.

Download



Mario Kart: Evasion Game

Easy Medium Hard

Dodge the Mario Kart 64 icons as they bounce around the playing field.

This 'program' was created using DHTML, with custom code for either Netscape or Internet Explorer, depending on your browser. This is guaranteed to fail on browsers which are not DHTML-capable.

View Netscape Source    View Explorer Source



Hexar's MazeMaker


<hype>Generate your very own, randomly-created maze with the size, color, and specifications you desire! Print out the result for hours (or minutes) of endless fun!</hype>

This program is a Java Applet which uses some smart thinking to create a maze with exactly one solution, and always one solution. Plus, it creates it randomly--but quickly. View the source code to see the details.

View Java Source



Hexar's CGISetup


Whether you need a C library for accessing and using CGI (for form processing and other misc. website uses), or a C++ one, Hexar's got you covered. Compile programs with this source code and you won't have to rewrite repetitive CGI code ever again.

CGISetup - C Version
cgisetup.c
cgisetup.h
CGISetup - C++ Version
cgisetup.cxx
cgisetup.hxx


Hexar's ServerWS


ServerWS is a relatively simple Winsock2 wrapper class designed to make it much easier to deal with the sockets code involved in hosting / connecting to a game or application. The code is Windows-specific C++, and you can download either the ServerWS source code, or a demo "chat" application that uses it, HexChat.

ServerWS Source
ServerWS.hxx
ServerWS.cxx
HexChat - Demo App
Download Hexchat.zip
Extract this zipfile to its own folder, and run HexChat.exe. You can open the project in Microsoft Visual C++ 6.0 as well.

ServerWS Documentation
View ServerWS Documentation (HTML)
View ServerWS Documentation (Word)





All material Copyright (c) 2001-2017 Hexar
Please direct all inquiries, love letters, and hate mail to .

Home •  Blog •  Code •  WinTetris

Related Links

GameDev.Net:
A fantastic site featuring all kinds of game development resources.

The CGI Resource Index:
This site was created by a friend of mine, and features tons of resources related to CGI (Common Gateway Interface) which is used for processing forms, etc., in webpages. Take a look!