I've dummied out the player code, so only the client connection code is
working. Otherwise the protocol hasn't changed.
I've also made a few other tweaks as I went along, but nothing really
major.
Remember: anything with "manager" in its name organizes a number of other
objects, as far as I'm concerned.
I'll eventually have a database connection in the PlayerManager class;
this'll make it easier to manage the database.
Even though some parts of the new map system are a stub, I feel confident
enough to merge this branch back onto the stable branch.
On the whole, I've reduced the complexity of the system, while also allowing
acceptable restrictions.
The RegionPager class works correctly. The Update() member is empty, but it's
still usable.
I've removed TileSheetManager, so the maps can only have one tileset each;
that's fine.
The tiles are voxel integers.
The editor needs an entire overhaul. I think some of the GUI components
are too complex. The sooner I can implement the map in the main
client/server system the better.
* Fixed Region::GetX() and Region::GetY()
* Replaced calls to std::find_if with regular for loops
* Changed typing of RegionPager::regionList
** regionList now holds pointers rather than the objects themselves
* Added vestigial classes MapFileFormat and MapGenerator
** MapGenerator creates and destroys the region objects
* I'm leaving in the debugging code for now
** This includes trace statements and a basterdized main() function in
/editor/main.cpp
I've also made the base class abstract, and the derived class a template.
Hopefully this'll let me work on different parts of the class without
major issues.
This code compiles, but since it's incomplete, I can't test it properly.
Cause:
server/server_application.cpp: line 93
The last argument to std::pair was simply a call to WorldRoom's
contructor. This created a temporary object that fufilled this line, but
after the new std::pair object was added to worldRoomMap, this WorldRoom
object went out of scope.
server/server_application.cpp: line 96
When OpenRoom() was called using an object that was out of scope, the
entire server simply failed.
Solution:
Changed worldRoomMap to hold a pointer to a WorldRoom object, rather than the
object itself. The new and delete operators should be used to create and
delete WorldRoom objects respectfully.
For some reason, when trying to initiate the room thread, the entire
server simply fails. There is no crash, no error message, or anything. I
have no idea what's wrong.
This code is essentially copied from the old branch, since the two
branches are now functionally identical. How much time have I wasted
rewriting this?
Networking and multithreading working at the same time is really fucking
hard. It's better to just have the one thread, and not worry about speed
at this stage.
This is a pretty straight forward port of the old version, including the
incredibly hacky server list. But I just need to remember that this is a
prototype.