Project compiles and runs, multiplayer works, but the map is not visible
There are a number of major changes to the map system, beth directly from the
jam branch and from the splicing process. The changes that are listed here have
been noted as they were added to the index for committing.
* tile_sheet.*pp moved from 'common/graphics/' to 'common/map/'
* Minor method and member name changes to TileSheet
* TileSheet has a lua API, but it isn't used anywhere
NOTE: Nothing uses both lua and graphics, but a theoretical editor might
* Region API's glue functions have been changed from triggers to simple dummy
methods. These should simply be over written.
* RegionPagerBase::GetRegion(int x, int y) now snaps it's parameters
Presicely why is unknown, but I do remember there was a bug without it
* RegionPagerLua has been rewritten to use the Region API's methods, rather
than the triggers.
* RegionPagerLua no longer stores the map's save directory, or passes it to the
the Region API's methods.
* RegionPagerLua::luaState renamed to RegionPagerLua::lua
conforms to changes elsewhere
* Removed the directory glue functions from the RegionPager API
* region_pager_api.hpp preprocessor guard changed
* Adjusted makefiles to account for TileSheet's movement
This branch was mostly used for streamlining the code after not seeing it
for a week. It's quite surprising what you realize after taking a break
for a while.
Began working on the collision system. Currently, the collision data which
is set server-side is transferred to the client, and stored in the Region
class. It's incomplete, but it's going well.
The APIs have access to the solid data, and I fixed a bug: Basically, the
template parameter for std::bitset expects an integer representing the
number of bits to hold, but I initially misread it as the number of bytes.
This has been corrected.
I've also added a sandy beach to the generated island. I'm tempted to
start working on some simple generators soon.
region_api.cpp had a bug, where a glue function's name was used twice. It
was an easy catch, but there was an issue in the new script, where I was
counting from 0 instead of 1. As a result, I was chasing a segfault for 5
hours.
I've changed some naming concentions in the lua APIs. I've also made a few
other tweaks, like region_pager_api.cpp delegating to the passed
RegionPager object. This won't explicitly run, becuase there's still a few
more changes needed.
List of major changes:
* Refactored the server into smaller modules
* Server now partially supports multiple rooms
* Overhauled the networking code
* Packets are now a hierarchy of classes
* Changed the way packets are moved about
* Initial login protocol altered
* Reworked the map system
* Two separate pager classes, one with lua one without
* lua API supports these changes, and partially supports rooms
* Major and minor bugfixes as the need arose
This is the culmination of three weeks of work, but it feels like so much longer. Ideally there shouldn't be any major visible changes to the game, even though the code has undergone a huge revision. The intent of these changes was to make future progress much faster, and I'm not planning on doing this again any time soon. This commit is intened for 'release-0.4.1', whereas 'release-0.4' was only the first half. Naturally when you think something is done, you're only half way there.
My plans are to return to the combat system, and get it working as an actual playable system to show off. Following that, I'll begin researching the terrain generation. I'm estimating that these tasks will take 2 months each, but I'll probably be pouring as much effort into these as I did with this commit. As usual, development is rarely straight forward, so I'll probably get sidetracked at some point (hence the large development window). If I do stick to my timeline, I'll reach a "playable" alpha by mid-october. From there I'll have 2.5 months to flesh out some gameplay, and possibly submit the game to Greenlight.
After working on this game for a year, I wonder how much further there is to go before other people play it.
Summary of changes:
* Changed the way I handle packets
* RoomManager is now functional
* Split RegionPager into two classes
* Fixed several major and minor bugs
This merge splits RegionPager into two parts: RegionPagerBase, with the
basic Region management code, and RegionPagerLua, which has lua hooks. The
former is used by the client while the latter is used by the server. Both
classes' internals have been optimized.
There are also changes to the client and server code, to account for the
new system, and I've fixed a couple of bugs.
The player's character is not created, but the client can login and see
the map.
The changes were fairly easy, and I was actually able to find and fix an
out-of-sequence bug: The destructors for the AccountManager and the
CharacterManager were using SQL code after the call to SQLite3_close_v2(),
so I added and called UnloadAll() for both of them.
This required that I switch from using a char array for the packet buffers
to using malloc() and free(). They make more sense anyway, and I've
learned (or relearned) something about casting.