Commit Graph

614 Commits

Author SHA1 Message Date
Kayne Ruse 2b3ea5eb80 Updated map system (read more)
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
2014-07-31 18:01:50 +10:00
Kayne Ruse 66815016ba Fixed the debugging makefile's output directory 2014-07-31 17:18:25 +10:00
Kayne Ruse 46f02dcfdd Minor tweak to ConfigUtility 2014-07-31 17:14:40 +10:00
Kayne Ruse 414a0896c9 Began merging the jam branch into the development (read more)
The list of changes committed:

* Removed SimpleRNG
* Added Timer (for debugging)
* Added BoundingBox
* Added floating point snapToBase()
* Added error check to Vector2::Normalize()
* Updated makefiles, project compiles
2014-07-30 21:10:43 +10:00
Kayne Ruse 0077d501ac Merge branch 'develop' 2014-07-08 16:28:07 +10:00
Kayne Ruse e946a0741d Encapsulated the Character class 2014-07-04 00:55:12 +10:00
Kayne Ruse 839c2af940 Merge branch 'rebuild' into develop, read more
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.
2014-07-03 02:26:42 +10:00
Kayne Ruse f70241cc57 Merge branch 'config' into rebuild 2014-07-03 02:17:44 +10:00
Kayne Ruse 36d30ce39b Moved the scenes into a subdirectory 2014-07-03 02:01:53 +10:00
Kayne Ruse 28d083cba4 Hammered out server-side issues, read more
* Removed the client-only code from CharacterData, including the .cpp file
* Removed CombatManager and EnemyManager instanciation
2014-07-03 01:41:58 +10:00
Kayne Ruse 4dd4b37fc0 It now builds cleanly, but I cut a few code stubs 2014-07-03 00:56:30 +10:00
Kayne Ruse 82b1b589dc Moved some files around 2014-07-03 00:23:43 +10:00
Kayne Ruse bac493c96b Rearranged the debug output 2014-07-02 21:59:26 +10:00
Kayne Ruse d5520e83c6 Merge branch 'collision' into develop, read more
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.
2014-07-02 01:10:23 +10:00
Kayne Ruse 93480be685 Solid data is moving from the server to the client, read more
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.
2014-07-02 00:47:37 +10:00
Kayne Ruse 8ed308e89a Switched the hack for the bitset
I've also added acessors and mutators to the Region and RegionPagerBase
classes.
2014-07-01 22:55:43 +10:00
Kayne Ruse 8df1ecd804 This hack for the collision map was a terrible idea
I'm committing these changes before undoing these, and coding it properly.
2014-07-01 22:04:45 +10:00
Kayne Ruse 8c9d071c7a Minor tweaks 2014-07-01 01:03:03 +10:00
Kayne Ruse ac1098fa86 Merge branch 'develop', Major API expansion release-0.4.3 2014-06-24 02:46:39 +10:00
Kayne Ruse deba324449 Merge branch 'api' into develop 2014-06-23 10:46:39 +10:00
Kayne Ruse 95362286f8 Committing the island generator script, and a bugfix
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.
2014-06-23 10:29:39 +10:00
Kayne Ruse f5c58bf5ad Minor tweaks after a failed attempt at metatables 2014-06-23 05:58:54 +10:00
Kayne Ruse 316db43b0a Fixed CreateRoom()'s return type 2014-06-23 04:54:01 +10:00
Kayne Ruse 46ed196bf4 All current lua hooks are being called 2014-06-23 04:10:21 +10:00
Kayne Ruse 64baa63d12 Changed the naming conventions (read more)
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.
2014-06-23 03:45:30 +10:00
Kayne Ruse e19b6fbc23 Updated RoomManager and the API 2014-06-21 19:02:43 +10:00
Kayne Ruse a64411a567 Filled out the APIs a bit 2014-06-21 18:24:58 +10:00
Kayne Ruse 3662a97475 Added mapType to BaseGenerator 2014-06-21 18:24:01 +10:00
Kayne Ruse 97aaacbc23 Merge branch 'mapgen' into develop 2014-06-21 07:25:46 +10:00
Kayne Ruse 8afd0e7c8a Created a separate API for the RoomManager class 2014-06-21 07:19:51 +10:00
Kayne Ruse 82c776df83 Moved the generators into a subdirectory 2014-06-21 07:00:48 +10:00
Kayne Ruse 924ebc2ee9 Created the generator hierarchy 2014-06-21 06:47:30 +10:00
Kayne Ruse d3bf099a98 Arranged server's source into directories 2014-06-21 05:52:27 +10:00
Kayne Ruse a6de5f9e69 Imported the files from branch 'fixed-map' 2014-06-21 05:28:06 +10:00
Kayne Ruse 618666de43 Renamed the Restart scene to CleanUp release-0.4.2 2014-06-15 22:39:10 +10:00
Kayne Ruse 5c74ecdd72 Removed ESC key exit, and tweaked some comments 2014-06-15 22:24:50 +10:00
Kayne Ruse 61848db65b Merging branch 'develop' into master (read more)
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.
release-0.4.1
2014-06-15 00:04:41 +10:00
Kayne Ruse dfc464ddd6 Merge branch 'char-add' into develop, characters working again 2014-06-14 23:30:57 +10:00
Kayne Ruse bd5e57401e Minor comment tweaks 2014-06-14 23:27:33 +10:00
Kayne Ruse a23fbbfb38 Characters are working correctly again 2014-06-14 23:13:11 +10:00
Kayne Ruse c021032512 The character is visible, fixed a database issue 2014-06-14 22:37:21 +10:00
Kayne Ruse d4be22a6eb Merge branch 'develop' into char-add
I just want that minor tweak from master here
2014-06-14 04:14:36 +10:00
Kayne Ruse c210b99a5f Merging a slight change to master 2014-06-14 04:08:18 +10:00
Kayne Ruse 01eb934fad Merge branch 'client-fix' into develop (read more)
Summary of changes:
* Changed the way I handle packets
* RoomManager is now functional
* Split RegionPager into two classes
* Fixed several major and minor bugs
2014-06-14 04:03:55 +10:00
Kayne Ruse 52e6b144c1 Merge branch 'map-redo' into client-fix (read more)
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.
2014-06-14 03:46:16 +10:00
Kayne Ruse b418ad713d Worked these changes into the client & server (read more)
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.
2014-06-14 03:38:13 +10:00
Kayne Ruse 1bc51fe035 Removed the 'erase_if' template, that was silly 2014-06-14 03:08:33 +10:00
Kayne Ruse 793737e1ed Experimenting with the map 2014-06-14 03:05:21 +10:00
Kayne Ruse e57b047343 Added some basic code to RoomManager 2014-06-14 00:44:13 +10:00
Kayne Ruse a11867126c Fixed segfault in common, changed casting of packets to static_cast
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.
2014-06-12 03:47:49 +10:00