Welcome to the OHRRPGCE Source Code documentation! This file explains what you need in order to compile the OHRRPGCE, some hints for hacking improvements, and apologies for the general crappyness of almost all the code :) ----------------------------------------------------------------------------- http://HamsterRepublic.com/ohrrpgce/source.php for more information ----------------------------------------------------------------------------- WINDOWS/LINUX: Requires FreeBasic verion 0.15b Download FreeBasic from http://freebasic.net/ DOS (16-BIT): Requires Quickbasic version 4.5 or 7.1 (4.5 is preferred) Older Versions of the OHRRPGCE required QuickBasic. Quickbasic is being phased out, but is currently still supported. How do you get it? ... Well, I hate to say this, but unless you purchased a copy back in 1989, your only hope is to pirate a copy. Quickbasic 4.5 is not hard to find on abandonware websites. Search around, and you should be able to find it easily. I was tempted to just include a pirate copy of it along with the OHRRPGCE sources, as that would make your life WAY easier, but a cease-and-desist letter from Microsoft would not make my day, so I am not going to do it. Anyway. The important part of Quickbasic is the compiler, BC.EXE That is really the only file you need. The QB editor is fairly nice for editing the code, but you cannot run the code in it because the code is hella way too big. ----------------------------------------------------------------------------- INSTRUCTIONS (Windows/Linux) Unpack the source code to a new folder Install FreeBasic Run makegame.bat to compile the game player Run makeedit.bat to compile the game editor (DOS) Install the OHRRPGCE source code into C:\OHRRPGCE\ Install QuickBasic in C:\QB45\ If you want to install to a different location you should edit env-set.bat If you install Quickbasic 7.1 instead you will need to edit env-set.bat If you are using real DOS, run env-set.bat Run compile.bat to compile the player and editor ----------------------------------------------------------------------------- MAKING IMPROVEMENTS There are still lots of bugs that need to be fixed. For a list of known bugs, visit http://HamsterRepublic.com/ohrrpgce/buglist.php I also welcome code-cleanup and new features as long as you don't break compatability with existing games. If you want to submit a improvement to me, I reccomend you post your patch and/or a description of the changes to http://HamsterRepublic.com/bugzilla/ instead of e-mailing it to me. ----------------------------------------------------------------------------- WHAT IF YOU WANT TO BREAK COMPATABILITY? I will not accept patches that break compatability into the official version, but you are welcome to make your own "fork" of the OHRRPGCE code as long as you obey the conditions of the GPL license. This means that if you make your own personal version of the OHRRPGCE based on my source code, you have to give others the same freedoms I gave to you. If you want to learn more about how the GPL license works, just mail me, and I would be happy to elaborate. You can also find the full text of the license in LICENSE.txt ----------------------------------------------------------------------------- APOLOGY Most of the OHRRPGCE's Source code is ugly. UGLY! Messy! Poorly planned! I most sincerely apologize for this fact, and I protest that I am not really the terribly incompetent programmer that you might assume I am just by reading this code. When I first started programming the OHRRPGCE back in late 1996, I was ignorant of many important programming concepts. The most noticeable of which are functional programming, and namespace scoping. All of my subroutines were written using basic's GOSUB RETURN structure, which is like a function, except that it has no local namespace, takes no arguments and returns no values (so it is really not much like a function at all!) a GOSUB routine communicates with the caller entirely using global variables. This is quite convenient for a beginner writing simple programs, but my global namespace quickly became horribly polluted. The next major cause of code ugliness is the 16-bit memory limitation of QuickBasic. The linker cannot handle really large object files. Switching from Quickbasic's standard linker to FREELINK helped, but still did not solve the problem, so I had to break the code up into multiple modules, and the only way to do that was to convert my GOSUBs into SUBs and FUNCTIONs. Remember now, at the time I was still an ignorant newbie programmer, and I did not understand the concept of functional programming. I just saw subs and functions as a way to break my code into smaller pieces, and my code was heavily dependant on global namespace, so I ended up with a bunch of subs and functions with very very long argument lists. Then memory limitations struck me again, when the code got to big even for the compiler. The long argument lists needed to pass global variables to my subs and functions created a lot of compiler overhead, and I had to go through the tedious process of turning all those globals in to cross-module globals using Quickbasic's COMMON SHARED feature. This alleviated my compiling problems, but left me just as bad as ever in terms of namespace pollution... but by that point I was used to working in a polluted namespace, so I lived with it. My code got better later, in particular I am happy with the flexmenu routines that I converted all the menus in CUSTOM to use, but the good code is rare, and the bad code still abounds. All of the OHRRPGCE source code is still riddled and pock-marked with global usage, badly planned and unplanned SUBs and FUNCTIONs, ill-conceived hacks of every kind, and a wealth of things that could easily be re-written properly... except that they work well enough now, who has the time and motivation to fix them? After releasing the source code under the GPL, it turns out that several people did in fact have time and motivation to improve the code. Although bad code still abounds, it is getting better. Well, I hope that doesn't discourage you too much. Play around with the code, have fun, and if you make any improvements that you would like me to merge back into the official version, submit patches to me at http://HamsterRepublic.com/bugzilla/ ----------------------------------------------------------------------------- James Paige - Bob@HamsterRepublic.com - http://HamsterRepublic.com/ohrrpgce/ ----------------------------------------------------------------------------- Do you want to keep up with the latest development progress? Subscribe to the Developer's Mailing list: http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org