autoload :Fireball, "spells/fireball"
autoload :CreateFood, "spells/create_food"
puts "Not loaded yet."
class Spell
end # base class for fireball and create food
Fireball.new # access Fireball and CreateFood
CreateFood.new
puts "Fireball file fully loaded."
class Fireball < Spell
end # empty
puts "Create food file fully loaded."
class CreateFood < Spell
end # empty
common
common.network
|- TelnetSocket class
|- etc.
common.events
|- EventManager class
|- etc.
common.containers
|- ChunkList, LexicalTrie classes
mymud
mymud.actors
|- Actor, PcActor, NpcActor classes
mymud.spells
|- Fireball, IceStorm classes
There are of course integral object values that are required for the game to function; such as the player's name,
level, password etc. There are also functional commands that just have got to be there like: move, say, get, drop, give, etc.
But as the game grows, there will be little things here and there that I might want to swap in and out. I thought about creating
a file for each class class called "room_aux" or "character_aux" etc. This way, you make sure dependent values are not altered unless
the user knows what they are doing. Long story short, I want to release this codebase and want it as easy as possible to customize.
What do you think about this approach?