09.12.2009, 11:36, written by Mario Donick
28.703 Lines of Code
LambdaRogue 1.5 source (excluding the SDL headers) consists of 28.703 lines of code, and I estimate 20 to 30% of it are redundant or not well abstracted, and should be refactored at some point. I really believe that the code length could be reduced to ~20.000 lines. LambdaRogue 2.0, which I started in 2008, shortly after 1.0 release, once was considered to be this point. However, there have been so many bug fixes and additions to 1.x, that the 2.x branch is hopelessly outdated and I could start again. So, what is the status quo ... what are my goals ...
- I will continue LambdaRogue development even in the next few years. At least this one is clear.
- I want all the critical or high-priority 1.5 issues fixed, to get a starting point for refactoring which is as stable as possible. This also includes the continued efforts of making dungeons more interesting or varied.
- I want the source code to have a less chaotic structure than currently. I have 2 output units for UI, text and graphics output. I have an input unit where not only input is handled, but where also the configuration file is read and stored. I have lots of more totally mixed-up units.
- I want the player character, NPCs, monsters, items and spells to be objects instead of records. Then I could, for example, call Monster[i].Move instead of MoveMonster[i]. This would allow me to take the cognitive point of view of the monster and help to imagine what the monster (what I) would do. The same is true for the other kinds of things I mentioned.
- I want the screen output routines to be streamlined. When a character is drawn, there a several procedures and functions used, to determine what to draw, how to draw it (ASCII or graphics) and to process the actually drawing, and there are lots of ugly quick-hacks to enable the 1024x768 resolution or the cropped Netbook mode, and to adjust the output for the different sizes of console and SDL window. It's esp. these hacks that I want to be abstracted to a more logical structure.
- Finally, the source contains parts which were added one or two years ago, but are probably not used anymore. Thankfully, this is the easiest part, as FreePascal tells me which units or variables aren't used.
Well ... this is a huge stack of tasks. However, if I want to be able to fulfill task 1 (continuation of development), I fear I need to care about 3 to 6. Otherwise, even simple additions will be a real pain and someday I wouldn't even know where to start (esp. as I don't have the time anymore to dive into the code for some hours to get used to it after a 6-month hiatus).
Earlier / Later / Permanent Link
Comments
Krice schrieb am 28.01.2010, 22:15
What was the story of two versions of LR again?
grimwerk schrieb am 19.03.2010, 03:47
Hey Mario, s'me again. I've been quite busy. I just wanted to say that I really look forward to whatever game you decide to pursue next. There are aspects to lambdarogue I really enjoy, so I'm keen to play the next version of that as well.
Generally, good luck, man. And thanks for what you've made so far.
Mario Donick schrieb am 19.03.2010, 06:22
Thanks grimwerk, for the support.
powered by d.elog blogging software v0.6 / 17.04.2009
© Mario Donick 2005–2009.
d.elog contains Xinha, a free WYSIWYG textarea editor.