Quick Source Code Tour

 

This isn't the place for detailed source code documentation, but I will point out a few interesting hot-spots in the 110,000 lines of C++ code that make up this game.

uplink/source/app/globals.h

Contains a number of #defined variables that determine what sort of game to build, ie Demo, Full game, Test game etc. You can enable cheats from here if you like. You can also set options for debugging messages.

uplink/source/game/data/data.h and data.cpp

Contains almost all of the balancing / tweaking variables used in the code. You can totally rebalance the game from this file. You can change everything from the time taken to level up, to the starting conditions, to the probabilities used in the Mission Generator. All of the descriptions of the hardware and software are in here. It's worth noting you will probably need to do a full recompile to get this new data in, and even then you may need to start a new profile.

uplink/source/app/opengl_interface.cpp

Contains a lot of code for rendering default windows, buttons, icons etc. If you were interested in rewriting Uplink's graphics code then this would be the place to start.

uplink/source/world/generator/missiongenerator.h and missiongenerator.cpp

One of the most important files in the whole tree, this file contains all the code for generating missions that appear on the BBS screen, and for checking to see if the player has completed the missions. All the missions have a fairly standard format. If you're thinking of adding new missions, this is the place to start.

uplink/source/world/generator/plotgenerator.h and plotgenerator.cpp

This is where you will find Uplink's background plot, hard-coded as a script with Acts and Scenes. Complex and messy stuff. There is a Word document on your Developer Cd in the "Other" directory which details the plot and shows how it's broken down into Act and Scene. Use this as your index into the Plot Generator. Best of luck.

It's worth noting that a log of code in the generator directory is only run when a new user profile is created. So if you modify the worldgenerator or the plotgenerator, you won't see those changes until you start a new user.

Finally, a few generic places to find things: (I know how hard it can be to find your way around someone elses code sometimes)

All in-game tools eg decrypter, log deleter etc : uplink/source/interface/taskmanager/

All local interfaces eg email, worldmap, IRC : uplink/source/interface/localinterface/

All game state information eg companies, hackers etc : uplink/source/world/