Commit Graph

77 Commits

Author SHA1 Message Date
Kayne Ruse 18a7143926 Full trigger creation 2015-03-04 02:21:56 +11:00
Kayne Ruse bd68af5875 Added character iteration to the rooms 2015-03-02 04:26:34 +11:00
Kayne Ruse b8806cc209 Implemented CharacterManager::ForEach() 2015-03-02 02:41:37 +11:00
Kayne Ruse edcb6f05ce Implemented trigger creation & deletion via lua
Triggers now have handles for simple understanding, but there's nothing
preventing multiple triggers from sharing the same name.
2015-03-02 01:00:58 +11:00
Kayne Ruse 84c4dd0497 Placeholder monster spawn function in map maker 2015-02-27 04:28:28 +11:00
Kayne Ruse 3e6a05307e Minor TODO tweaks 2015-02-27 03:36:47 +11:00
Kayne Ruse 4630b7e403 PumpCharacterUpdate() works from lua to client, read more
There was a bug in the entity API, where getMotion() was pushing the
origin instead of the motion. This has been corrected. Since this is an
important bug, and because the features for this leg is finished, I'll
merge this to master.
2015-02-27 02:39:27 +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 8a97cb8c2c Checked the tick in Hertz 2015-02-18 00:21:38 +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 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 5583ba4323 Updated TODO comments 2015-02-04 16:52:22 +11:00
Kayne Ruse 92a02c7f0c Reverted the server to a LAN system 2015-01-18 21:34:23 +11:00
Kayne Ruse e2757a7628 Client now points to home server
I've also tweaked the README.txt
2015-01-14 14:29:55 +11:00
Kayne Ruse f13e8479e4 Refactored scripts, added a smoother for Debug Islan
I've added a simple edge-smoothing function to debug island's generator. It
doesn't handle all edge cases (pun intended), but the proof of concept is
sound. I just wish I could release this...

I've also added exception checks to region.cpp
2015-01-12 01:14:24 +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 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 6704944105 Updated the map system & APIs 2014-12-31 06:01: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 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 57c6f45c21 Added API placeholder files 2014-12-30 02:19:19 +11:00
Kayne Ruse cc167180f6 Added support for cleaning up after rejection messages 2014-12-01 22:33:15 +11:00
Kayne Ruse 6485839dcf Replaced RoomData's hooks with Initialize API function 2014-11-26 06:33:02 +11:00
Kayne Ruse 81a3a92603 Simplified setup_server.lua 2014-11-26 06:12:01 +11:00
Kayne Ruse 5eeda8235d Fixed the scripts struggling with nested API tables
I actually don't remember what the RoomData's lua references where for,
but I'm pretty srue it wasn't this. I'll figure something out when I've
had a sleep.
2014-11-23 06:40:31 +11:00
Kayne Ruse 3b9df46510 Merge branch 'network-expansion' into server-expansion 2014-11-08 17:09:04 +11:00
Kayne Ruse daa38413f3 temp script changes 2014-11-06 01:22:08 +11:00
Kayne Ruse f584dd140b Began work on expanding the network protocols 2014-10-23 23:50:49 +11:00
Kayne Ruse 4d6186021f Added 'skume' sprites 2014-10-07 22:22:08 +11:00
Kayne Ruse db40f198be Moved heartbeat code to ServerApplication::CheckClientConnections() 2014-09-30 02:01:56 +10:00
Kayne Ruse 87ef03d512 Moved the debug island into a module 2014-09-30 00:44:54 +10:00
Kayne Ruse 8e97de6979 Added the scripts directory to lua's path
This will allow modules.
2014-09-29 23:42:40 +10:00
Kayne Ruse c010c0da0a comment tweaks to bug tags 2014-09-28 20:22:11 +10:00
Kayne Ruse e452f2ecfc Moved sql_utility.*pp to server/ directory
Also padded setup_server.sql's formatting, for readability.
2014-09-28 03:42:16 +10:00
Kayne Ruse bfcf9a1d37 Moved the character's stats into their own database table
This will allow the to be reused elsewhere, as well as cleaning up big
blocks of code in the manager's source.

BUGFIX: The config's key-value pair overrides now work without requiring a
config file specification.
2014-09-28 03:10:39 +10:00
Kayne Ruse 17b9eb7ad4 Added more rejection packets, revised some logic 2014-09-10 16:06:01 +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 59c9ba698f Implemented the new system in the startup script, needs testing 2014-08-15 09:12:22 +10:00
Kayne Ruse 1b041d7771 Tied region_pager_lua.cpp to region_api.hpp 2014-08-14 00:03:22 +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 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 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 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 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 316db43b0a Fixed CreateRoom()'s return type 2014-06-23 04:54:01 +10:00
Kayne Ruse a07e7418a6 Implemented a basic API for the server's rooms 2014-06-10 01:46:42 +10:00
Kayne Ruse 63be0ee70d The server is building, but still needs work
There is some missing character creation/unloading code, and there are a
few other issues highlighted by TODO tags, see below.

In general, 'mapIndex' has been renamed to 'roomIndex'. Multiple rooms
have not been fully implemented yet, but I'm working on it.

Other issues:

* FileFormat needs to be changed to MapLoader
* Server's character movement is still slaved to the clients

The client does not build.
2014-06-07 02:15:40 +10:00
Kayne Ruse 2bebfdfb97 Updated database control, character stats are saving
Just for the record, I don't like the way SAVE_CHARACTER is expanded like
that.
2014-06-02 22:22:51 +10:00
Kayne Ruse fb6fba9564 Removed BBox, renamed position to origin
I've replaced the BBox class with a pair of inline functions in
check_bounds.hpp. I've also renamed the 'position' variable to 'origin' in
several locations.

These changes are mostly to alleviate ambiguity.
2014-06-02 21:13:08 +10:00