Commit Graph

12 Commits

Author SHA1 Message Date
Barry Kane a38cbb70a8 Fixed Thomas's Bug.
In short:
- When a large amount of input was recieved, the server would hang.
- The server would hang on queue->lock for the input queue, in pushQueue().
- Upon debugging, it was revealed that queue->lock was actually false at this time.
- GCC had optimized out the actual loop, leaving it to get stuck even though the variable had changed.
- Adding the volatile keyword to the lock fixed this issue.
2023-02-08 17:15:23 +00:00
Barry Kane 8ae3eaf2b8 Added queue.c and queue.h.
- Added a singular queue type for input/output messages and commands.
- Added a test of the queue type in tests.
- Made some edits to the Makefile to enable the addition of debug code using the preprocessor.
- Minor styling and spelling updates in gamelogic.c/h and text effects .h.
- Ready to integrate the new queue type in place of the previous ones.
2022-12-18 21:07:10 +00:00
Barry Kane d9497679cb Implemented Skill Checks.
- Implemented skillCheck.
- Allowed for the in-game testing of skillCheck via /try.
- Slightly reorganized the Makefile.
- Tweaked the logoString to display correctly.
- Edited the client and server to generate gprof data when in debug builds.
2022-10-30 12:58:39 +00:00
Barry Kane 52b4b1e2f0 Warning fixes and Makefile edits
- Adjusted the Makefile to create gprof data in the server (currently inactive as the server never terminates.)
- Fixed warnings in areadata.c and gamelogic.c.
- Added bruteforcePrint for completeness.
2022-10-18 21:00:57 +01:00
Barry Kane b8189ae2de Began implementation of skills and stats.
- Added text wrapping in client.
- Implemented functions for managing skill data.
- Rewrote some existing functionality to allow for variable length game messages over multiple userMessages.
- Reorganized the code yet again.
- Introduced enums for coreStats and outcomes.
- Implemented core stat checks.
- Added more example skills.
- Rewrote test areas to have longer descriptions.
2022-10-16 16:13:33 +01:00
Barry Kane 8673bb1ad5 Reorganized file structure.
- Reimplemented /LOOK.
- Commands are now accepted in both upper and lower case.
- Move now accepts a number for easier movement.
2022-05-20 22:28:07 +01:00
Barry 4ddb80b8b2 Basic message queuing implemented
- Messages are now queued on reception by the server.
- Message queue datastructures are now added.
2022-04-07 01:38:36 +01:00
Barry 5d772df469 Added initial GnuTLS encryption.
- Added inputoutput.c
- Added inputoutput.h
- inputoutput contains wrapper and helper functions for transmitting messages over GnuTLS.
- Moved the userMessage struct definition to inputoutput.
- Reworked client and server to use GnuTLS.
- Removed all commands from server in preperation for upcoming command and message queues.
- Names and areas are no longer considered for messaging.
- Changed Makefile to link GnuTLS.
2022-03-06 00:36:42 +00:00
Barry 241ac7a92b Added area and path creation functions
- Added missing header guards.
- Increased the size of message contents to 2048.
- Added area and path initialization functions.
- movePlayerToArea no longer segfaults.
- /LOOK added to allow players to find exits.
- Amount of paths allowed out of an area has been decreased to 16.
- Debug builds are now available from the Makefile.
- Removed unused variables.
- Input sanatization has been moved to the server-side, phew.
- Server messages are now displayed differently to player messages.
- New area initialization has been added until I can integrate Guile.
- Server's sendBuffer has been renamed messageBuffer.
- Areas now have descriptions.
- Descriptions are sent to the player upon joining an area and /LOOK-ing.
2021-11-04 23:14:47 +00:00
Barry Kane 33bc9bcda0 Adapted client to use Ncurses instead of raw terminal output:
Created "slowPrintNcurses", which is a version of "slowPrint" compatible with Ncurses screens.
Ncurses is now used in place of raw-terminal output.
The screen clears after inital start-up messages.
C-d no longer exits, and still doesn't spam.
Added Ncurses to the ld options of client in the Makefile.
Created ld options for server in the Makefile.
2021-09-03 18:47:11 +01:00
Barry Kane 2c093903a4 Git Sanity Check 2021-08-17 18:57:56 +01:00
Barry Kane 618b2144e3 Initial release of SilverMUD:
Features Added:
- Server capable of receiving and sending messages to up to 64 clients.
- Client capable of sending and receiving messages from the server, multi-threaded.
- Text effect library with one effect.

Features Changed:
- None, initial release.

Features Removed:
- None, initial release.
2021-08-15 19:42:37 +01:00