|
| |
Civ89 is open source!
What does open source mean?
It means everybody can download the program's "source code", the text file that makes the program work. While this is most useful for programmers, it also means that interested programmers can make improvements to the program, to the benefit of all.
Where can I get the source code?
You can access the TIGCC source code for Civ89 here (the project file is here) and the source code for CivEdit here (the project file is here), or you can download it along with the program here, on the ticalc website.
This code is so hard to read!
Yes, I am painfully aware of that. The readability suffered considerably when I was trying to meet the 64K program limit. Not until after I released version 1.00 was I informed that simple compiler options could have done this for me. Also, my ability to produce readable code is limited at best, since as a lone programmer, others reading my code has never been a concern.
What is the status of the AI you were working on?
It is partially completed. I am not currently working on it. I may or may not finish it at some point in the future.
I have essentially finished most of the pathfinding. At present, it can estimate the travel distance from any given space of the map to all other spaces with reasonable accuracy in approximately 0.7 seconds (albeit in some fairly basic test cases on the default map). It can even do this without ignoring barriers such as enemy units and friendly units (vis-a-vis the unit limit), and requires only a few seconds (maybe 15 seconds on the default map) to set up the initial graph. It includes several data structures, such as a dynamic array, a queue, a priority queue of type Path, and structures representing a somewhat complicated cascading graph, all of which work well even with a limited number of memory handles.
It is supposed to be a separate program that opens a game file, uses its AI to make all of the computer's moves, saves back to the file, and returns to the main program. As such, the execution of the AI is planned to be completely independent from turn to turn. It should be designed to work with any scenario.
You'll be happy to know that it is much, much better written than Civ89 itself (more modular, more easily maintained, more readable, etc.). I plan to post it online after completing Civ89 version 1.06 or 1.07, which will (hopefully) have an optional second battle engine and allow transport units that can only transport units of specified types (any combination of ground, water, air, and high air) and will hopefully be refactored. Once the AI code is posted, you may finish it if you like.
What would be a good way to improve Civ89?
Here are some improvements that I never got around to or was never interested in, but I believe the players would appreciate:
- Use of the entire screen for the TI-92 plus and Voyage 200: Since I only have a TI-89, not even a ROM of TI-92 plus and Voyage 200 calculators, this has never been a serious possibility for me.
- A faster draw function: Not exactly a necessity, but it would be a nice thing to have. My own limited knowledge was the only limit on its current speed, but I'm sure there are more advanced programmers out there who might do this.
- A map generator: A random map generator would always be a nice addon. Obviously, the generator would need to do more than simply going tile-by-tile and assigning random data; it would instead need to make a more playable map.
- Link play: The idea behind link play would be to have one person play while the other person watches them play using another calculator. I really tried to add this, but the TIGCC linking functions are poorly documented, and I couldn't even get this accomplished with the help of the TICT forum.
- Support for more than two players: I can't think of a good way to make all four players appear different. Simply using two colors, one for the current player and one for all enemies, would not have worked to my satisfaction. If (and only if) you can think of a good way to do this, feel free.
- A serious game editor: At first, I was planning to make a comprehensive game editor, where one could control every single attribute of a game. However, lack of interest (as well as program size considerations) prevented me from doing so. Of course, a game editor need not be that complete; anything would be an improvement over the current one.
- Making the code more readable: Hardly an enviable task. But it's there if you want it. Actually, I'm a bit disgusted by the code quality myself, and if I manage to make usable AI, I think I'll do some refactoring.
- Any old optimizations
- And the grand finale, AI! Without a doubt the number 1 item on my players' (and would-be players') wish lists. Also without a doubt the hardest task. I have partially finished some AI code, which will be posted later and from which you may want to work. You may consider writing the AI in a separate program, which would open the game file, make the computers' moves, save the game, and return to the main program. All-purpose AI would of course be best, but AI designed only for the default scenario would also be nice.
What guidelines should I follow?
As a courtesy to the players, and as a requirement for usage of the source code, I ask that you follow these simple guidelines if you make any modifications, even if you don't intent to post the modified version online. Replace "Foo Bar" in the line #define EDITNOTES "Edited by Foo Bar" with your name(s). If you make any gameplay modifications (such as changing army revenues from 10% to 20%), please uncomment the line #define GAMEPLAYMODIFIED.
What if I want you to add my modifications to the next version?
If this is the case, e-mail it to me. Please include a note telling me what you improved. Also tell me which functions, global variables, etc. were changed or added, unless there are so many changes that this is inconvenient. I will put it on the ticalc website marked as a beta version and solicit user comments and bug reports. When I feel it is ready, I will upgrade it from beta status and increment the version number. Be sure you either use or provide me with an e-mail address where I could contact you later, so that I can forward bug reports to you, and tell me if you would like your e-mail address to be put on this website (which I'm assuming you won't). I will, of course, mention you by name in the version history if you submit improvements that I post online if you would like me to. For the most part, I will not be accepting improvements that modify gameplay (such as changing army revenues from 10% to 20%).
|