lama-0.8a.tar.gz

Uploaded: 12 Apr, 2013
Previous uploads by this submitter: 0

Author: milkmanjack

Downloads: 45

This is lama, a barebones MUD created in Lua.

I am an amateur developer, and I do this only as a hobby. If there are any questions or concerns, or suggestions, I'd appreciate hearing them on my github or via email.

Updates:
v0.8a

  • Moved change logs to separate directory.
  • Removed all module references. This will probably mess up LuaDoc, but it's already messed up.
  • Fixed some bugs in the mapping system. Hadn't done much with it other than the initial construction, so there is some expected failures.
  • Removed a lot of inefficient junk. Like table.safePairs and table.safeiPairs. I created these so I could modify a table on-the-fly without messing up the iterator. Instead, I just manually control the iterator. Not as intuitive, but certainly better.
  • Races and classes added.
  • Attributes added. Attributes are all provided by your race and class as of now. In the future, affects will be added which will modify these as well.
  • Removed redundant verbose README that explains every last fine detail of the project's design.
  • Removed XML database stuff. Switching to pure Lua implementation.
  • The beginnings of the combat system are in. You can't actually fight or die, but the Event fires, and messages are shown.
  • Reorganized the file structure. Less clutter everywhere.
  • Character passwords are saved using the Lua MD5 library.
  • Color stuff is now useable.
  • Removed Client:sendLine since it's pretty redundant.
  • Added Color singleton.
  • Added a CharacterData structure that all Mobs will have. This stores data that is unique to player characters but should persist across instances.
  • Added config.preset() to show off the current settings in a presentable manner.
  • Added an etc package and loader package so I can keep main.lua "clean."
  • Added a prequire function which just runs require() in protected mode, so I can stop it from crashing on a failed require. I'm using this to test for optional packages like the lzlib library I use for MCCP2 support. Even if you enable it, if it fails to include the lzlib package, it'll disable it. Very convenient and now I don't have to keep changing it back to true when I commit.

v0.7a-2
  • I have fixed a huge performance bottleneck in Map:contains() and MapObject:contains(). Essentially, because of how tables work, I have loop through the entire table to find the location of a MapObject within these tables, which I need to be able to remove it from said table. Unfortunately, the only fix I have for this is to use the hashmap feature of tables, and when adding something to a Map or MapObject's contents, I create a special index of the specific MapObject with an associated value of true. When removing something, I just clear that entry out of the table by setting it to nil.
  • Modularized greeting so I don't have the MUD name, version, and developer in 3 different places. txt/GREETING now contains a string that can be injected into a string.format() call, with the first 2 arguments being the game name and game version, followed by the game developers.
  • Added developers table to Game, with getDevelopers() function. getDevelopers() returns the unpacked version of the table, mostly for use with the greeting.
  • Added "score" command to test saving and loading.
  • Added "save" command for testing.
  • Added "commands" command.
  • Added character directory for storing savefiles.
  • Implemented basic XML savefiles for characters.
  • When hotbooting, client option settings are preserved, as well as player IDs, and the name of the player's character. With the new character saving, what happens is that on hotboot, the character is saved and its name is preserved. After hotbooting, the character is reloaded based on its name.
  • Renamed obj/Command directory to obj/command. This is more consistent.
  • Moved around the Telnet.commands options to other tables based on their categories. Protocols (Telnet.protocol) are separate from commands (Telnet.command), along with MSSP (Telnet.MSSP) and environment (Telnet.environment) options.

v0.7a-1
  • Made the hotboot phase a little more intelligible. The hotboot is now split into 3 distinct phases.
    • Game.hotboot() initiates a hotboot.
    • main.lua's game loop processes the hotboot.
      • First, relevant player data is preserved in the preservedData table.
      • Second, all of the game packages are unloaded, allowing for them to be reloaded.
      • Third, all of the game packages are reloaded.
      • Game is re-opened on the preserved Server.
    • Game.recoverFromHotboot() handles reconnecting Players from the preservedData table.
  • Clients no longer send option negotiations right away for supported options on creation. Instead, the second argument to Client:initialize() determines if this should be done. This is to prevent the same negotiation from being requested on an already negotiated option after, say, a hotboot, where clients have to be recreated using the sockets of the old clients.
  • Commands are no longer documented as packages.
  • Added generic Command structure with generic commands.
  • Added string extension. Mostly just for the getWord() function.
  • Added automatic unloading of obj.* packages. Still have to unload the singletons yourself.
  • Game.generateCommands() now loads every Command in the obj/Command directory. By default, anyway.
  • Moved default port to config structure.

0.6a
  • Hotbooting implemented.
    NOTE: Due to the fact that lama is not a full game and lacks "character saving," hotbooting is a bit lacking. Preserving a mob is basically impossible, due to the nature of a hotboot (loading changes to the package), so I won't even try to do it here. Instead, a generic mob is loaded for them. There are just too many values that need to be preserved. Instead, once you implement some kind of player saving and loading, use that before and after the hotboot. Saving the player characters in the main.lua game loop, around where clients and servers are saved, and loading them in Game.onHotboot(), just after the players are recreated.

    I suggest using some kind of temporary global table that associates a socket with a character name in the form of `__hotbootPlayers[socket] = "my character name"`. After the package reloading, once the players are reconstituted, just grab the associated character name for that player's socket and load the character for them. I may make an example of this later.
  • Removed the singleton requires from Game.lua and left them in loadPackages() in main.lua.
  • The standard external packages I always need before everything are loaded before the game packages, and are not reloaded during a hotboot, or for any other reason.
  • Reorganized requires so that instead of requiring packages for clones that you interact with in another package, you only require packages for clones that you need direct access to the original, like when creating pure clones of them. Other times you might need access to the original is when using things like Cloneable.isCloneOf(), for determining if something is a clone of say, Event, or Mob.
  • Gave Players a setClient() function for posterity's sake.
  • Fixed log levels. They now report all messages.
  • Changed order of package loading.
  • Renamed "logs" directory to "log", as that was more consistent.
  • Player:toString() is now a little more sensible. Since Players stand to connect clients and mobs, the stringified version is now "{#id}mob@client address".


0.5a-2
  • Added license and license reminders to source files.
  • Updated READMEs to be more informative.