Updated the ClientApplication class to help support the new design, but
it's not finished because of that module's dependence on the various
scenes.
Updated the following scenes:
* CleanUp
* MainMenu
* OptionsMenu
The following source files (in client/scenes/) compile correctly:
* base_scene.cpp
* splash_screen.cpp
* clean_up.cpp
* main_menu.cpp
* options_menu.cpp
The folling source files (in client/scenes/) do not compile:
* in_world.cpp
* in_combat.cpp
* lobby_menu.cpp
common compiles correctly, although there are issues:
* There needs to be support for multiple pagers at once
* There needs to be a way to support multiple generation algorithms
(this message is copied from my blog)
So I took the lazy route and just committed the entire splice between the jam branch and the development branch all at once. It is exactly as terrible as you think it is, but I've been out of coding for 2 weeks, and I want to get some shit done. I'll pick through each piece one by one, by comparing the diffs from the develop branch to the current jam-merge branch.
Those developers I met on Monday said they were impressed by my ability to manage a large codebase, but if they saw this I'd expect they'd probably take that back.
And oh god it's been 3 weeks since I touched the main branch WTF?
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.
The entire repository builds cleanly, but the client is still broken and
incompatible with the server. Still, I'm merging this build into develop.
I don't know if the client runs correctly.
Much of the modifications since branching from master are untested.