My little summer project has gotten bigger than I thought
small history: ITS A remake of a well known BBS game LORD - there are many ported to the web via java and telnet, but I wanted a true Browser based game of it - and since I could not find one, I made one - note: I am aware of the LOTGD, its not quite the same) I've been in contact with the original author of the game, and since he sold it, he cannot give me any details of the game but he does like what I have done so far. - I am currently waiting for the new owners to write back, and if they pitch a fit, i'll make some changes - after all, it is more of a personal project than a public on - ergo i WANT TO FINISH IT LOL (I would say it is over 85% done - it is winnable as well - yes end game is completed)
So it has gotten, well, actually its kinda HUGE!! I a still have parts to add. Writing in PASCAL is differnt than writing in php/html (I know 7 languages pretty well, so conversion is not an issue) Without getting into details - not the purpose of my post The issue I am having is organization. I have about 80 some files 3/4 of which are templates
Basic psuedo code is as follows
everything is run from the index.php.
depending on users location, session vars and REQUEST vars, it will branch to various functions.
some examples:
index.php
as is will be treated as a user logging on
index.php?q=inn
branches to a displayInn function (with more options in there) and displays it accordingly.
casting a skill/spell? no prob
index.php?q=fght&s=sid (fighting, using skill reference sid=skill id)
and so forth.
my question, is I think my organization is all wrong, because now its starting to get cluttered. I comment HEAVY!! so what things are doing is not the issue. is "squeezing things in that is becoming an issue.
So need a little help on the organization part (programming I got)
I know there is a HUUUUGGGEEE debate on OOP vs FUNCTION (procedural) programing, so to avoid THAT debate, I am partial to the FUNCTION method for this prticular project. So no debates please. Unless you can prove without a doubt - that is the way to go.
Some Ideas I was thinking is group each location individually and then options that go with those (example fighting location gives options RUN, FIGHT, SKILLS etc..., then those will branch off to different functions to yeild outcomes.) town, same thing, each town has sub menus branching etc...
Love to hear some different idea. On the outside, the game plays quite nicely - but its the internal programming that is very ugly.
want to check it out - http://lotrd.sytes.net (its alpha and buggy, but there are no wipes - even if i change the name and format due to legalities) but look at it from a programers point of view. its very "kludgy"
hope to hear some organization details