Commit Graph

180 Commits

Author SHA1 Message Date
Kayne Ruse f581c3238f Tweaked some TODO comments 2014-09-03 04:36:02 +10:00
Kayne Ruse 246a5ee541 The server-side heartbeat is working and stable 2014-09-03 03:24:32 +10:00
Kayne Ruse 79c7e48139 UDPNetworkUtility accepts addresses by value, encapsulated ClientData
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.
2014-09-03 01:59:53 +10:00
Kayne Ruse 5577387d61 Added basic hearbeat framework 2014-09-03 00:53:55 +10:00
Kayne Ruse d50cf5b91e Fixed shoddy packet typing 2014-09-03 00:45:08 +10:00
Kayne Ruse 094efad728 Rearranged the packet and serial code to make more sense
This mostly just reimplements the best parts of the discarded branch:

> discard-encapsulated-packets

There may still be some work needed.
2014-08-31 13:24:53 +10:00
Kayne Ruse 6f4334f84d Moved serialization globals 2014-08-25 00:07:17 +10:00
Kayne Ruse dfe8c108de Minor tweaks 2014-08-19 03:42:55 +10:00
Kayne Ruse 61337e29f6 Split the ServerApplication's source into two files 2014-08-19 03:22:25 +10:00
Kayne Ruse f52a022e64 Bugfixes, read more
* Manual modifications to the database caused the map to act unusual
* The server's packet must be created and deleted as a char array
* removed UnloadAll() from several singleton destructors
* added SDL_Delay() to BaseScene::RenderFrame(), to reduce heavy CPU use in menus
2014-08-19 01:48:48 +10:00
Kayne Ruse 0fdaa90a83 Minor code tweaks 2014-08-17 11:46:02 +10:00
Kayne Ruse e7ba097e6a Converted the server's managers to singletons 2014-08-17 10:06:29 +10:00
Kayne Ruse ce97245131 Project builds, and runs with no obvious differences 2014-08-15 09:39:17 +10:00
Kayne Ruse 52ab9f0087 Minor tweaks 2014-08-15 08:53:41 +10:00
Kayne Ruse 98ffcb8cd3 Encapsulated RoomData, did some other refactoring 2014-08-14 00:13:19 +10:00
Kayne Ruse 6d98bab000 Began refactoring the server (read more)
* deleted the enemy and combat stubs
* encapsulated the character and account stubs

TODO:

* The remaining managers should be singletons
2014-08-13 09:45:54 +10:00
Kayne Ruse 74f809a801 UDPNetworkUtility is a singleton, disabled InCombat scene
I found incombat to be way too finicky to keep up to date, so I disabled
it for now.
2014-08-13 06:53:47 +10:00
Kayne Ruse 908f91d674 ClientApplication and ServerApplication are now Singletons 2014-08-04 00:45:09 +10:00
Kayne Ruse fd320767c5 Implemented the changes to ConfigUtility in the client and server
The server's changes were easy. The clients means that the constructors
for each scene have one less argument, and each scene has one less member.
The exception to this is LobbyMenu, where the config is used in multiple
places, so it was easier to have the config's reference as a member.

To replace the config's usage, I added this line in most cases:

ConfigUtility& config = ConfigUtility::GetSingleton();

The only requirement is that ConfigUtility::Create() and
ConfigUtility::Delete() are called from the main() function.
2014-08-03 23:20:39 +10:00
Kayne Ruse 0b512305a9 Added last additions from jam (read more)
I should also mention that the client is throwing up a warning that
HandleCharacterUpdate() is passing to HandleCharacterNew().
2014-07-31 20:04:58 +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 f70241cc57 Merge branch 'config' into rebuild 2014-07-03 02:17:44 +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 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 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 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 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 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 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 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 e57b047343 Added some basic code to RoomManager 2014-06-14 00:44:13 +10:00