Commit Graph

99 Commits

Author SHA1 Message Date
Kayne Ruse bb6e248583 Implemented EnemyFactory, still empty 2014-05-18 03:45:36 +10:00
Kayne Ruse f7df4fba6c Wrote some basic combat management code 2014-05-18 01:48:22 +10:00
Kayne Ruse e7403be508 Minor tweak to CombatInstance 2014-05-17 02:33:02 +10:00
Kayne Ruse 873715b28c Added the "speed" statistic 2014-05-16 17:56:40 +10:00
Kayne Ruse b1d6e5a314 Mostly planning 2014-05-16 02:05:52 +10:00
Kayne Ruse f0453375c4 Stating to implement the combat system 2014-05-16 00:01:05 +10:00
Kayne Ruse 14b330009b BUGFIX: Found an error in SQL save statements
The character's positions are now persistent between logins.
2014-05-13 04:36:59 +10:00
Kayne Ruse c5e8f1b3af Added account and character saving on shutdown 2014-05-13 03:25:50 +10:00
Kayne Ruse 68475eee0f Created PumpCharacterUnload 2014-05-13 02:51:50 +10:00
Kayne Ruse eeb2400e79 Rearranged the server-side object hierarchy (read more)
This has been a long-running problem for days, but I've finally
implemented a correctly working hierarchy between the ClientData,
AccountData and CharacterData objects:

CharacterData -> AccountData -> ClientData

There doesn't seem to be any issues with it right now, touch wood.
2014-05-13 02:09:00 +10:00
Kayne Ruse 01244005e9 Minor file renaming and tweaks 2014-05-13 00:23:04 +10:00
Kayne Ruse 80a26341b1 Finished the character management, but it needs testing. 2014-05-11 20:13:27 +10:00
Kayne Ruse b7877962f1 Implemented CreateCharacter() and LoadCharacter() (read more)
There are issues with the indexes. That is, the accounts and the
characters need each other's indexes upon creation. I'll need to rectify
this now.
2014-05-10 20:30:33 +10:00
Kayne Ruse 4d12788c53 Finished the server-side modifications (read more)
* There seems to be something iffy with this branch
* The size of SerialPacket may have changed

I've implemented the accountIndex variable as best I can, but I really
shouldn't code at night. I'll need to go over the changes again before
merging this.
2014-05-07 20:55:09 +10:00
Kayne Ruse 4ebff4a25a Minor tweaks, prepping for a merge 2014-05-06 19:18:53 +10:00
Kayne Ruse 0ff787abda Added Unloading and Deletion of user accounts 2014-05-06 18:57:49 +10:00
Kayne Ruse 9b5b48a8ab Implemented saving of user accounts (read more)
To modify an existing user account, change the in memory copy and then
call the function SaveUserAccount(uid), where uid is the index of the
modified account. If the save function is not called immediately, then the
behaviour of the server is undefined.
2014-05-06 18:33:20 +10:00
Kayne Ruse 5dd0fb9e23 BUGFIX: Signal when a duplicate account is being loaded
If a duplicate account is being created or loaded then the functions
return -1. The higher code can take it from there.
2014-05-06 16:41:08 +10:00
Kayne Ruse 7c210e04a5 Switched to using a wildcard symbol 2014-05-06 00:17:50 +10:00
Kayne Ruse 910e51f637 Began to implement user accounts using the database
I'm mostly just testing the waters at this stage, and i've left some debug
code in. There's no way to unload, delete, etc. the accounts, but that
comes later.
2014-05-05 23:57:07 +10:00
Kayne Ruse 92fc9b4e25 Adjusted the lua's map API, requiring a large rewrite
One the whole nothing major has changed, but I think this makes things
more logical. I just hope its stable, since I'm releasing a new tag.
2014-04-29 15:53:04 +10:00
Kayne Ruse 124cb3ad13 Did some renaming and comment tweaks 2014-04-29 06:34:23 +10:00
Kayne Ruse 5031352fe3 Fixed the bug (read more)
The bug was being caused by a lack of a new player object being sent to
some clients. Fixed this by adding in the sending code, and preventing the
new entries being "registered" until the end of the HandleJoinRequest()
method.

Hopefully I can simply abstract away some of this code soon.
2014-04-29 01:47:01 +10:00
Kayne Ruse 624369f147 Discovered a bug 2014-04-27 22:46:19 +10:00
Kayne Ruse fa9487c2f2 Fixed the previous bug (read more)
The bug was being caused by not assigning default values to the player
objects' internals. I've added a quick fix to these structs, but I think
it's best to expand them into proper classes now.
2014-04-27 02:37:20 +10:00
Kayne Ruse 9ec1ddab99 Exceptions are being thrown; retiring for the night
I don't know what's causing these issues, so I'm leaving it for tonight.
2014-04-26 02:48:15 +10:00
Kayne Ruse 01b50d5590 I guess it was easier to compile the fragmented server than I thought 2014-04-26 02:31:48 +10:00
Kayne Ruse 9c673928e6 Began segmenting the server's code
I've created a separate branch for this because it's gonna be a bitch to
get compiled, and then I'll still have to ensure that the client & server
are work together correctly.

This build does not compile.
2014-04-26 02:09:32 +10:00
Kayne Ruse e756289c2b Adjusted a few comments 2014-04-22 01:54:26 +10:00
Kayne Ruse 6c6a025f2a Adjusted a few comments 2014-04-21 02:13:00 +10:00
Kayne Ruse 60edc97ea5 Added rejections for incompatible servers 2014-04-21 01:38:28 +10:00
Kayne Ruse fd673a415f Removed singleton pattern 2014-04-21 01:01:00 +10:00
Kayne Ruse 4270765146 Renamed NetworkPacket to SerialPacket, updated build 2014-04-20 23:54:59 +10:00
Kayne Ruse f56cb58dfb Revised SQL setup script, and the script function 2014-04-20 23:11:46 +10:00
Kayne Ruse 69765de433 Removed the TODO file; I think it's fairly stable again 2014-04-20 05:34:15 +10:00
Kayne Ruse 35d463d4ba Removed some annoying debugging messages 2014-04-20 05:30:08 +10:00
Kayne Ruse eb0b18af6f Brought the programs into line, (BUG, read more)
It seems that the serialization code has a bug in it. I was expecting
something like this. When the server tries to send the region content, it
exits. I'll try and find the cause of the error, but I'm committing my
changes anyway.
2014-04-20 04:41:06 +10:00
Kayne Ruse be4a8311d5 Adjusted a few comments 2014-04-20 02:39:29 +10:00
Kayne Ruse 6d32d44fa3 Reverted some of the changes, stable 2014-04-15 23:23:15 +10:00
Kayne Ruse c3464be589 The server is working correctly, using the entity system 2014-04-13 22:20:30 +10:00
Kayne Ruse 7fe71c60d0 This will not build; working on refactoring 2014-04-13 03:49:35 +10:00
Kayne Ruse 0c6537fb36 Began work on the server's generic entity system 2014-04-13 03:02:26 +10:00
Kayne Ruse 99aecbfdbb The client->server->client region protocol is working 2014-04-06 02:48:43 +11:00
Kayne Ruse 27bda5dc28 Working on the client side map code (read more)
I've also added in some debug code to the map classes, because I was
hunting down a std::bad_alloc beingthrown. Turns out I forgot to set the
map sizes in the client's InWorld constructor. I'm committing the fix, and
the debug code.
2014-04-06 02:25:55 +11:00
Kayne Ruse a5b68cf1fd Expaneded the lua API for Regions
I've added lua hooks for both pager functor classes. Hopefully, I haven't
missed any corner cases, because it took me a while to hunt everything
down. One issue is that the map's save directory needs to be set in the
Format class, but it'll do for now. I'll review this again when I've got
more than one map running at one time.

There should be enough here for a lua-driven map generator to be
implemented, even if it's a bit rough. I think I'll test this out in the
editor eventually, but getting the base branch's network map code going
comes first.

The current process is extremely convulted, so I need to document
everything that I've done so far, including C++ and lua functions.
2014-03-31 01:30:11 +11:00
Kayne Ruse 4cff57fe71 Established a connection between the Region objects and lua 2014-03-28 04:11:34 +11:00
Kayne Ruse 38b603fc8f Began working on the lua API for the map
The basic framework is done.
2014-03-28 03:24:14 +11:00
Kayne Ruse 9db86c19f6 Implemented a macro for the serial buffer size 2014-03-15 23:36:31 +11:00
Kayne Ruse d5b551cec3 Reduced the footprint of the tiles
Also prepping for serializing the regions.
2014-03-15 23:02:21 +11:00
Kayne Ruse 7e500027e3 Loosened the requirements for constructing a MapPager
This is so that I can configure the size of the pages in the config.cfg
file.
2014-03-15 19:16:42 +11:00