A simple tower defense game for my introductory AI course.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
media/sounds
website
BasicTower.bmp
BasicTower.cpp
BasicTower.h
BasicUnit.bmp
BasicUnit.cpp
BasicUnit.h
BossUnit.bmp
BossUnit.cpp
BossUnit.h
Button.bmp
Camera.cpp
Camera.h
FastTower.bmp
FastTower.cpp
FastTower.h
FastUnit.bmp
FastUnit.cpp
FastUnit.h
FastUnit2.bmp
FastUnit2.cpp
FastUnit2.h
FreezeTower.bmp
FreezeTower.cpp
FreezeTower.h
GUI.bmp
GUI2.bmp
GUI3.bmp
GameGrid.cpp
GameGrid.h
GameObject.cpp
GameObject.h
GameSounds.cpp
GameSounds.h
Makefile
MyVector.cpp
MyVector.h
Particles.cpp
Particles.h
Player.cpp
Player.h
PlayerAI.cpp
PlayerAI.h
Projectile.cpp
Projectile.h
README.md
Scenery.cpp
Scenery.h
SlowTower.cpp
SlowTower.h
StrongTower.bmp
StrongUnit.bmp
StrongUnit.cpp
StrongUnit.h
StrongUnit2.bmp
StrongUnit2.cpp
StrongUnit2.h
StrongUnit3.bmp
StrongUnit3.cpp
StrongUnit3.h
Tower Defense Project.sln
Tower Defense Project.vcproj
Tower Defense Project.vcproj.Andy-PC.Andy.user
Tower.cpp
Tower.h
TowerAI.cpp
TowerAI.h
TrapTower.bmp
TrapTower.cpp
TrapTower.h
UI.cpp
UI.h
Unit.cpp
Unit.h
UnitsAI.cpp
UnitsAI.h
VTD_main.cpp
VTD_screenshots.zip
WallTower.bmp
WallTower.cpp
WallTower.h
Win.bmp
arcane.bmp
blue_fire.bmp
blue_light.bmp
constants.cpp
constants.h
fire.bmp
green_fire.bmp
grid_0.bmp
grid_0b.bmp
grid_1.bmp
grid_10.bmp
grid_10b.bmp
grid_11.bmp
grid_11b.bmp
grid_1b.bmp
grid_2.bmp
grid_2b.bmp
grid_3.bmp
grid_3b.bmp
grid_4.bmp
grid_4b.bmp
grid_5.bmp
grid_5b.bmp
grid_6.bmp
grid_6b.bmp
grid_7.bmp
grid_7b.bmp
grid_8.bmp
grid_8b.bmp
grid_9.bmp
grid_9b.bmp
info_blcorner.bmp
info_bottom.bmp
info_brcorner.bmp
info_left.bmp
info_middle.bmp
info_right.bmp
info_tlcorner.bmp
info_top.bmp
info_trcorner.bmp
lighting.cpp
lighting.h
maingrid.grid
models.cpp
models.h
scene_grid0.bmp
scene_grid1.bmp
scenery.grid
shadow.cpp
shadow.h
textures.cpp
textures.h
title.bmp
titlescreen.png
tower_gui.bmp
tower_gui_btn_closest.bmp
tower_gui_btn_faster.bmp
tower_gui_btn_leasthealth.bmp
tower_gui_btn_mosthealth.bmp
tower_gui_btn_sell.bmp
tower_gui_btn_slowest.bmp
tower_gui_btn_upgrade.bmp
vfc.cpp
vfc.h
vtd_screenshots.zip

README.md

Virus-td is a tower defense game, created for an introductory AI course and a graphics course at Cal Poly. This, specifically, is a git mirror of the canonical Subversion repository.

Visit us on the web at http://changedmy.name/virus-td/ .

Building and Running the Game

freeglut, irrKlang and a C++ compiler are required to build the game.

Linux

Only one of our developers is using Linux primarily, and he cba to create a proper makefile. As a result, you will have to rebuild all the files each time you make a change.

make will build an executable, and make run will run it.

Due to some inconsistencies with library calls and such, you may need to patch a few things. This is the diff that our Linux developer uses:

	diff --git a/GameSounds.h b/GameSounds.h
	index 4e7d5c2..7f6255e 100644
	--- a/GameSounds.h
	+++ b/GameSounds.h
	@@ -1,7 +1,7 @@
	 #pragma once
	 //#define VTD_SOUND
	 #ifdef VTD_SOUND
	-#include "include/irrKlang.h"
	+#include <irrKlang/irrKlang.h>
	 using namespace irrklang;
	 #endif
	 #include "MyVector.h"
	diff --git a/shadow.cpp b/shadow.cpp
	index faf6525..fb364b3 100644
	--- a/shadow.cpp
	+++ b/shadow.cpp
	@@ -218,7 +218,7 @@ void draw_shadow(int shad)
	   /* check for the polygon offset extension */
	   if (glutExtensionSupported("GL_EXT_polygon_offset")) {
		 polygonOffsetVersion = EXTENSION;
	-    glPolygonOffsetEXT(-0.1, -0.002);
	+    glPolygonOffset(-0.1, -0.002);
	   } else 
	 #endif
		 {

Contributing using Git

Git is pretty awesome, and you can use it to contribute to this project.

Checking out the project

git clone git://github.com/xiongchiamiov/virus-td.git
cd virus-td
git svn init --prefix=svn/ svn+ssh://fileserverness.ath.cx/serv/svn/virus-td/
git svn fetch
git svn rebase

Making changes

git pull
git svn rebase
[hack hack hack]
git add .
git commit -m 'a super-helpful message'
git svn dcommit
git push