Commit Graph

350 Commits

Author SHA1 Message Date
Kayne Ruse ac799bc583 Finished tedious encapsulation of the packet classes 2014-08-27 20:35:04 +10:00
Kayne Ruse b8bd5f9cea Changed the internal serialization conventions 2014-08-27 16:04:14 +10:00
Kayne Ruse 4b5194918b Encapsulated SerialPacket, and made adjustments to accomodate it 2014-08-27 15:35:04 +10:00
Kayne Ruse 426c3a52c2 Made a few more adjustments, the file structure should be correct now 2014-08-27 14:57:33 +10:00
Kayne Ruse 16b2a60373 Renamed serial source files 2014-08-27 14:52:36 +10:00
Kayne Ruse 6cdc3080a2 Moved packet and serial files into the same directory 2014-08-27 14:38:13 +10:00
Kayne Ruse 6f4334f84d Moved serialization globals 2014-08-25 00:07:17 +10:00
Kayne Ruse 4ed512e0e2 Moved the snapToBase() utility function to region.*pp
I've also adjusted the TODO file, which really shouldn't be committed.
Still, it's there now, so it stays. I don't think the logger is going to
be possible any time soon, so I'll probably look into the disconnection
handler.
2014-08-24 13:23:50 +10:00
Kayne Ruse af8e7b70a0 Merge branch 'refactor-server' into develop
This is mostly just back end refactoring.
2014-08-19 04:14:34 +10:00
Kayne Ruse 8bc1326fef Added the "package" target to the root makefile 2014-08-19 04:11:12 +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 5dea53ad50 Removed delta time system from the framework 2014-08-19 02:52:15 +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 3b409a8608 Merge branch 'refactor-server' into develop, read more
This branch connects unique functions to the indevidual pagers, hopefully
allowing multiple different rooms in the future. That of course, will
require more work, but hopefully I can get that done soon.
2014-08-15 10:04:53 +10:00
Kayne Ruse ce97245131 Project builds, and runs with no obvious differences 2014-08-15 09:39:17 +10:00
Kayne Ruse 59c9ba698f Implemented the new system in the startup script, needs testing 2014-08-15 09:12:22 +10:00
Kayne Ruse 52ab9f0087 Minor tweaks 2014-08-15 08:53:41 +10:00
Kayne Ruse 4ea1f8b016 Added glue functions to set the pager triggers 2014-08-15 08:34:33 +10:00
Kayne Ruse f1080151e3 Minor preemptive bugfixes 2014-08-15 08:19:22 +10:00
Kayne Ruse 5af0a7999c Recoded the pager to use lua registry functions, needs testing 2014-08-15 07:10:27 +10:00
Kayne Ruse 1e9ac9815b Merge branch 'develop' into refactor-server 2014-08-14 01:04:22 +10:00
Kayne Ruse 98ffcb8cd3 Encapsulated RoomData, did some other refactoring 2014-08-14 00:13:19 +10:00
Kayne Ruse 1b041d7771 Tied region_pager_lua.cpp to region_api.hpp 2014-08-14 00:03:22 +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 b6c70cbc0d Tweaked the bounds values 2014-08-13 09:05:26 +10:00
Kayne Ruse 1776583e01 Added the escape hotkey, refined BoundingBox a bit
LobbyMenu also searches for a server as soon as you enter, so you don't
have to press an extra button, a good feature.
2014-08-13 08:08:16 +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 182101b592 Minor tweaks 2014-08-13 06:19:07 +10:00
Kayne Ruse 956e920b7a Added the debug and release targets 2014-08-04 01:04:13 +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 c830fa0537 ConfigUtility now supports recursion; is a Singleton
If you have "config.next" set, the config system will load that as another
config file. Higher config files have a higher precedence over subfiles
when conflicting keys are encountered.

* Added singleton.hpp, containing Singleton<T>
* ConfigUtility now inherits from Singleton
* Tweaked timer.*pp layouts
2014-08-03 23:14:56 +10:00
Kayne Ruse 10c89970cc Merge branch 'splice' into develop, read more
This branch's primary purpose has been to intergrate changes from the "jam" branch into the main repository. I decided to do a 48 hour jam, to see what I could accomplish. I believe that, although nothing major came out of it, the result are beneficial overall. The changes in this branch, while still experimental, will hopefully help me to push towards something playable soon.
2014-07-31 20:17:31 +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 555abf9c95 Fixed the map issue (read more)
The map generation was being written to a trigger function instead of a
glue method. Fixed, map is being drawn correctly now.
2014-07-31 19:17:29 +10:00
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 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