Commit Graph

397 Commits

Author SHA1 Message Date
Kayne Ruse 067bf40be7 Moved some utility methods out of the "god class"
These methods are are now functions in server_utilities.hpp
2015-02-27 01:20:05 +11:00
Kayne Ruse 46df0f17b7 Changed a massive swap statement for bounds checks
Instead of using a massive block of case statements in serial_utility.cpp,
I've added FORMAT_* tags to SerialPacketType as a way to destinguish
between type values, at least internally. I can't believe I missed this
for so long.

I've also added a placeholder for the network API, as I was working on
that when I ran into this problem.
2015-02-21 23:46:50 +11:00
Kayne Ruse ddedc06e47 Implemented bare-bones character system API
I need to devise a way to update the clients about changes to their
characters directly from the lua scripts. This isn't too important per se,
but the pattern will be important for the monster and trigger systems.
2015-02-21 21:46:22 +11:00
Kayne Ruse 6a999a8a72 Room API hooks are updated automatically 2015-02-19 03:40:20 +11:00
Kayne Ruse e011e6bdc5 The rooms are ticking 2015-02-18 00:07:38 +11:00
Kayne Ruse a106134dd1 Added hooks to the room system 2015-02-17 23:37:11 +11:00
Kayne Ruse a538cf73d5 Merge branch 'ticks' into develop 2015-02-17 22:23:36 +11:00
Kayne Ruse b273b4c04a Added character API 2015-02-17 22:10:07 +11:00
Kayne Ruse 248d142c2b Reconsidering the server's structure 2015-02-17 21:03:30 +11:00
Kayne Ruse 2cc7260552 Server can handle multiple dropped clients at once 2015-02-17 20:48:03 +11:00
Kayne Ruse 87af4f1a1e Comment tweaks, updated network version 2015-02-14 23:54:18 +11:00
Kayne Ruse 18b144fa46 Updated client, read more
It seems like the project as a whole is fairly stable now. I'm prepping to
merge this into master, despite the lack of monsters ATM. Hopefully this
break hasn't affected the stability too much.
2015-02-14 23:39:56 +11:00
Kayne Ruse e71d0b3a09 Finished these server tweaks 2015-02-13 23:34:34 +11:00
Kayne Ruse 9710acad6f Lost focus 2015-02-13 02:57:36 +11:00
Kayne Ruse ca2d4c9217 Expanded network protocol, read more
Not really doing much, just busywork with the server's handlers.

I've tweaked the TODO tags as well.
2015-02-13 02:05:10 +11:00
Kayne Ruse bad6cc2fab Moved ip_operators.*pp to common/utilities 2015-02-05 23:06:22 +11:00
Kayne Ruse a18577665a Updated TODO tags 2015-01-23 03:34:53 +11:00
Kayne Ruse 0bdafe7e15 minor file shuffling 2015-01-21 05:21:14 +11:00
Kayne Ruse 2a86a09693 Merge branch 'monsters' into develop
Conflicts:
	client/scenes/in_world.cpp
2015-01-20 05:04:08 +11:00
Kayne Ruse 7356e8ae77 Removed the dependencies on utility.*pp 2015-01-17 21:46:12 +11:00
Kayne Ruse 42662c3f61 Replaced HandleCharacterSet*() with HandleCharacterMovement()
This new method rolls three otherwise similar methods together. There is
still a conditional which handles room movements separately, but it's much
smoother, and PumpPacketProximity is utilized much more.

I've also added a stub for graphical attack data via
HandleCharacterAttack()
2015-01-13 02:04:48 +11:00
Kayne Ruse de6eb38516 Reduced CPU load of the client 2015-01-13 01:34:59 +11:00
Kayne Ruse 74bf70c44d Wrote PumpPacketProximity, it works 2015-01-13 01:01:46 +11:00
Kayne Ruse cd06ccc1a5 Room system now uses CharacterData instead of Entity 2015-01-13 00:42:16 +11:00
Kayne Ruse cf1008f0d9 Padded some API internals 2015-01-11 22:31:27 +11:00
Kayne Ruse 9f3721247d Replaced a block of code in setup_server.lua with one line 2015-01-11 20:12:50 +11:00
Kayne Ruse d0b2f8e12f Removed MonsterManager's Singleton status, RoomData now has mgr members
RoomData now has monsterMgr and waypointMgr members, so that it can
compare it's characters to the monster & waypoints, etc.

RoomManager has been updated. It now has a database reference, which is
passed to the monsterMgr of new rooms. The room API also has functions
which expose these managers to lua.
2015-01-11 19:47:42 +11:00
Kayne Ruse 051ed0f14c Monster API clones from Entity API, read more
This is my solution for handling inheritance via lua. The Entity class is
only a base class, so the entity API is designed to be copied from, rather
than used directly.

linit.c: It should be noted that the Entity API must always be placed
before the utilizing child APIs. I don't know about how lua handles things
internally, but I'm assuming that this is the case.

There's no real meat in the API code yet, since that's just busy-work.
Right now I feel beter about writing the connective tissue. This case
could aslo extend to the waypoint and monster APIs.

The waypoint system had some API and class methods removed for brevity.
2015-01-11 19:08:31 +11:00
Kayne Ruse 8ea667a0b5 Wrote the WaypointManager API skeleton 2015-01-10 14:03:13 +11:00
Kayne Ruse b391dde089 WaypointManager is no longer a Singleton, wrote waypoint API outline
I'm planning on giving each room it's own waypoint manager, so it can
compare it's waypoints against the characters in that room alone. If it
turns out to be a good pattern, I'll do thae same for monsters.
2015-01-09 13:21:09 +11:00
Kayne Ruse 3322783d95 Merge branch 'develop' into rooms 2015-01-03 03:27:34 +11:00
Kayne Ruse 877c0f59d3 Removed preprocessor switch surrounding library headers 2015-01-03 03:20:13 +11:00
Kayne Ruse 92eb75af7e Slight tweaks to waypoints 2015-01-02 23:51:00 +11:00
Kayne Ruse d815f17442 Reimplemented the push/pop entity methods in RoomManager
Some accessors in Entity had to be made const, as they were being called
from lambdas with const parameters.
2015-01-02 23:25:59 +11:00
Kayne Ruse eb897c81e8 Tentative solution for bug #38 2015-01-02 07:09:04 +11:00
Kayne Ruse 963aca218a Comment tweaks 2015-01-01 01:29:48 +11:00
Kayne Ruse 8b8ef088d9 HOTFIX: Incorrect error code checked 2014-12-31 06:10:03 +11:00
Kayne Ruse 8e50be24d4 Updated room system and room API, more to come
There's a lot of verbosity in the scripts, so it might be beneficial to
redice that at some point.
2014-12-31 04:52:10 +11:00
Kayne Ruse f9c19a630d Added trigger reference to WaypointData, unused
WaypointData also inherits from Entity now, so I could alias Entity's API
for it too. I've also made a number of comment tweaks.
2014-12-31 03:34:06 +11:00
Kayne Ruse 78c04718e0 Removed ManagerInterface, it was a bad idea 2014-12-31 03:05:19 +11:00
Kayne Ruse bb592b2436 Added the waypoint system to the modules
Also fleshed out entity_api.cpp, but that's just filler.
2014-12-30 04:37:56 +11:00
Kayne Ruse f3fb5017b3 Added waypoint API placeholder files 2014-12-30 02:45:35 +11:00
Kayne Ruse 3a9fdd511b Replaced door system with waypoint system 2014-12-30 02:38:25 +11:00
Kayne Ruse 57c6f45c21 Added API placeholder files 2014-12-30 02:19:19 +11:00
Kayne Ruse ce16fc6969 Merge branch 'develop' into high-water-mark
Conflicts:
	server/server_logic.cpp

Finally merging the changes to develop. This is only the ConfigUtility
skipping missing files, and something with the Timer class, that I'll need
to test the collisions.
2014-12-27 19:28:02 +11:00
Kayne Ruse 7e5a7f8183 Updated the copyright headers about a week ahead 2014-12-27 13:29:16 +11:00
Kayne Ruse 6c11aa0927 Characters are moving around in the world 2014-12-27 02:26:44 +11:00
Kayne Ruse 398f1c8bfd Added a room check to the character query 2014-12-27 01:33:10 +11:00
Kayne Ruse 3e2d1a5a56 Implemented client-side HandleCharacterSet*(); untested 2014-12-22 23:09:28 +11:00
Kayne Ruse f52eafdf55 Implemented server-side HandleSetCharacter*(); untested 2014-12-22 22:13:42 +11:00