I got a monster!!

OK…
My little summer project has gotten bigger than I thought. Well, actually its kinda HUGE!! I a still have parts to add. Without getting into details - not the purpose of my post, its a text based rpg. 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.

I forgot, I guess i could get some paper out, and lay it out, since it got this big LOL.
kinda like a director WOOT!!

Sponsor our Newsletter | Privacy Policy | Terms of Service