The calls to ConfigUtility::Load() also received some tweaks, to use '/'
instead of '\' for unix compatability. Also removed -llua from graphics
makefile.
This merge covers mostly back-end refactoring, including splitting
Character into Renderable and BaseCharacter, as well as creating the
manager interface.
This branch splits Character into two classes:
* Renderable
* BaseCharacter
While also adding these two empty classes:
* LocalCharacter
* BaseMonster
This split is not used in any major way, due to implementation issues encountered in a later version of this branch. Before I can implement monsters and local/foreign characters, the types of network packets need to be expanded in yet another branch.
It also renames CleanUp to DisconnectedScreen, and simplifies it's implementation.
Project also builds, since I went through and adjusted it. It's hacky
right now, but I just want to make sure it worked. I'll give it another
pass before merging into develop.
ManagerInterface was already designed for those two anyway. The only thing
left to do is to rewrite the room API, and the whole thing should work
fine again.
I still think map data should be saved and loaded by lua code, so the
rooms will still implement lua hooks. There may be other things that can
be loaded from SQL, but I don't know what.
ManagerInterface is a server-side pure abstract class; all of it's methods
are defined as pure virtual methods, and as such should be defined in the
derived classes. It works correctly along side the Singleton class, but
does not implement it directly as originally planned. It should also
support variadic parameters, which still need testing.
I've implemented ManagerInterface in RoomManager, but I've also disabled a
number of the RoomManager's features, including the lua interface. The
project as a whole should build, but it won't run correctly. The variadic
parameters will be tested using the other managers.
It feels good just playing around instead of pushing forward all the time.
I'm salvaging the changes to AccountManager and CharacterManager that
don't break the build too badly. This won't build, but it'll be easier to
rectify.
Also, I've reduced the length of the manager's method names, and renamed
sql_utility.*pp to sql_tools.*pp
This will allow the to be reused elsewhere, as well as cleaning up big
blocks of code in the manager's source.
BUGFIX: The config's key-value pair overrides now work without requiring a
config file specification.
You can set the file to read as the config file via the command line, like
this, assuming the program supports it:
prog -config=file.cfg
You can also override indevidual key-value pairs in the config system
using this syntax:
prog -Ckey=value
Both commands can be used together, and you can override multiple
key-value pairs at once. To use this feature of the ConfigUtility, it must
receive argc and argv as parameters to the Load() method.
This merge handles a number of backend features, including error handling and other types of messages. I think there's more I could've done in this time, but this is what I have nonetheless.
I started encapsulating ClientData, and I added the internals for the
heartbeat ssytem. However, when I took a look inside UDPNetworkUtility, I
realized that I didn't have to pass the IPaddresses by reference anymore.
Therefore, I've changed it to accept the addresses by value, and I'm
committing that change right away before I finish the heartbeat system.
This engine is really shaping up, I think.
After several days of trying, I decided to discard changes to the networking system:
> discard-encapsulated-packets
Instead, I've moved the packets and specialized serial functions into the same directory, and renamed them accordingly. The serialization code is only accessed by UDPNetworkUtility.
I've also removed the combat and enemy code from the network system, and reduced the number of packet types in SerialPacketType. These changes should make it easier to add more features in the future.