Commit Graph

70 Commits

Author SHA1 Message Date
Barra Ó Catháin fd846c7744 Added change-area-description to the Scheme functions. 2023-04-07 22:13:26 +01:00
Barra Ó Catháin 4696a1ec32 Adedd some comments to schemeintegration.c 2023-04-06 23:09:20 +01:00
Barra Ó Catháin 6b01917c11 Added a message-everyone scheme function. 2023-04-05 21:34:57 +01:00
Barra Ó Catháin adc036a1ae Added create-skill to the Scheme intepreter. 2023-03-25 23:56:25 +00:00
Barra Ó Catháin 8dab8bfd06 Begin adding Scheme intepreretation.
We now have a scheme thread and a interpreter.
2023-03-25 21:38:00 +00:00
Barra Ó Catháin 995a177c37 Increased prompt reprint delay.
- The client's prompt now delays for twice as long to ensure that an updated prompt is displayed next.
2023-03-01 23:14:37 +00:00
Barra Ó Catháin 8f08265c52 Talking messages now appear in the chat log correctly.
- Added logic to properly add the relevant users in the correct order to ensure message delivery.
2023-02-27 20:00:50 +00:00
Barra Ó Catháin 84c20dfdbf Actually fixed it this time, and squashed some warnings. 2023-02-27 17:12:03 +00:00
Barra Ó Catháin f83c03aadf Fixed the name being sent to the wrong user's prompt while talking.
- The talking prompt was being sent to the receiving user, not the sending user.
2023-02-27 17:07:03 +00:00
Barra Ó Catháin 50f4e6c38a Forgot to pull.
Merge branch 'dev' of ssh://dunseverick.ocathain.ie:2222/barra/SilverMUD into dev
2023-02-27 16:39:05 +00:00
Barra Ó Catháin a99296e31e Added a list of players in the area to /look.
- /look now lists the current players in the area.
2023-02-27 16:35:32 +00:00
Barra Ó Catháin 408033d48a Talking now changes the prompt.
- The server will now change the prompt for a user who begins a conversation with another player to that player's name.
2023-02-26 00:16:07 +00:00
Barra Ó Catháin 8814a45c52 ALlowed for the server to change client prompt.
- The server can now send some data in the normally unused "senderName" field for a server mesasge.
- This will be set as the prompt for the client.
2023-02-25 23:04:35 +00:00
Barra Ó Catháin 0add957224 Changed from bzero to memset
- All instances of bzero have been replaced in an effort to make SilverMUD slightly easier to port.
2023-02-25 19:51:47 +00:00
Barra Ó Catháin 26a5496594 Added shouting.
- Players can now use /shout to send a message to the current room while talking.
- No longer adding unnecessary newlines to /talk.
2023-02-20 23:30:41 +00:00
Barra Ó Catháin b3a0345b19 Added initial support for talking.
- /talk now allows you to begin a conversation, given a player name, or end one, given no arguments.
- The client now properly clears previous messages when sending to the server.
- Added talkingWith to playerInfo.
2023-02-19 22:13:06 +00:00
Barry Kane caa792de8d Added the AGPLv3 as the license, and renamed SilverMUD.org. 2023-02-19 11:28:16 +00:00
Barry Kane afedf15c63 Updated the evaluateNextCommand to use a hash instead of strncmp
- Added hashCommand.
- Refactored evaluateNextCommand to use hashCommand to jump to the correct functionality with a switch.
2023-02-19 00:32:03 +00:00
Barry Kane e6a13ed2ac Added a MOTD command-line option to SilverMUD Server.
- Added a message of the day option, -m, to SilverMUDServer.
- Adjusted the character delay to 800 in SilverMUDServer.
2023-02-17 15:05:49 +00:00
Barry Kane 9dabdcfba7 Oops, wrong word. Changed "try" to "talk." 2023-02-16 23:15:02 +00:00
Barry Kane b61520b998 Add non-functional stub for talk.
- Added a message upon running '/talk'. This allows me to see if the command is actually executed.
2023-02-16 23:08:18 +00:00
Barry Kane ff281e5ce6 Increment version number 2023-02-15 22:16:12 +00:00
Barry Kane f5cb3ad16e More cleaning up.
- Brought remaining files in line with style guides, and improved comments.
2023-02-15 22:09:21 +00:00
Barry Kane f31f0c79a5 Cleaned up gamelogic.c/h
- Improved comments to clarify the purpose and usage of the data structures and functions.
- Brought the files in line with the SilverMUD style guide.
2023-02-15 21:43:13 +00:00
Barry Kane c2af4a551a Cleaned up inputoutput.h
- Changed the comments about the data structures to be more descriptive about their function.
2023-02-15 21:30:40 +00:00
Barry Kane c753182827 Cleaned up inputoutput.c.
- Added additional comments in sections functions that were unclear.
- Renamed targetIndex to sentCount, in order to clarify the usage of the variable.
- Linted according to the current SilverMUD style guide.
2023-02-15 21:22:14 +00:00
Barry Kane f411333203 Refactored SilverMUD to use the queue type for command events.
- Removed the old commandQueue type.
- Removed the functions relating to creating, pushing, popping, and peeking the commandQueues.
- Refactored the gameLogicHandler to use a queue type.
2023-02-13 17:23:30 +00:00
Barry Kane 602f177a8f Added some more comments.
- Commented the data structures in areadata.h and gamelogic.h.
2023-02-12 23:32:39 +00:00
Barry Kane d0e4a8f9fc Removed the body of the try command.
- Removed the try command's test functionality to allow for the later implementation of the actual functionality.
2023-02-12 23:13:10 +00:00
Barry Kane 66e0279e78 Commented the data structures in queue.h.
- Commented all the data structures in queue, to make it slightly clearer as to their usage and what they store.
2023-02-11 00:07:30 +00:00
Barry Kane feb1743425 Added naming rule 2 2023-02-10 23:33:36 +00:00
Barry Kane 52fd7ef6fb Wrote more documentation and a rule for the style guide.
Documented basic usage of the client's launch options to join a server and added the no one letter variable names rule.
2023-02-09 21:53:23 +00:00
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 c2c77d6343 Cleaned and styled SilverMUDClient.c
- Brought SilverMUDClient.c to a consistent style.
- Cleaned and neatened various parts of SilverMUDClient.c.
- Minor cleanup of playerdata.h.
- Began writing the SilverMUD Style Guide.
- Removed outputQueue-test.c, because outputQueue no longer exists.
2022-12-21 20:31:32 +00:00
Barry Kane 6a653c75b9 Implemented proper thread sleeping and additional output thread
- Replaced previous inefficient "spin-waiting" with proper thread sleeping.
- Added threading primitives to the queue type to enable this.
- Added additional thread for output management.
- Miscellanous cleanup and restructuring.
2022-12-21 00:49:26 +00:00
Barry Kane 15d82f59ee Refactored the outputQueue to use the new queue type
- Patched a bug where I didn't set the correct type for queue nodes.
- Removed all traces of the previous outputMessageQueue type.
- Removed the pointer "next" in outputMessage.
- Rewrote the the main thread and game logic thread to use a queue for output.
- Refactored outputMessage to allow for a variable amount of playerInfo pointers.
2022-12-20 15:55:24 +00:00
Barry Kane 9b3df5928b Refactored the input queue to use the new queue type
- Removed all traces of the previous inputMessageQueue type.
- Removed the pointer "next" in inputMessage.
- Rewrote the the main thread and game logic thread to use a queue for input.
2022-12-19 23:44:16 +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 2ab873b40b Make the client respect the set character delay.
- The client now respects the character delay set on the command line.
2022-11-30 15:31:14 +00:00
Barry Kane 4cc0d3a0f6 Completed the conversion to the new linked-list type.
- Moved all code relating to skills to use the new linked-lists.
- Removed all old code relating to other lists.
- Improved linked lists to get nodes more efficiently in the second half of the list.
2022-11-29 21:13:03 +00:00
Barry Kane 51f1a953e7 Refactored areas to use linked-lists.
- Refactored the server to rely on the linked-list version of area lists.
- Removed all old code pertaining to Area/Path lists.
- Removed a no-longer useful test for corestat-from string performance.y
2022-11-18 14:44:25 +00:00
Barry Kane 6b3d9febf6 Linked lists now destroy the pathList of an area.
- Modified destroyList to destroy pathLists in areas.
2022-11-13 18:26:36 +00:00
Barry Kane d843f0b170 Added one-way path function.
- Added a function to create one way paths.
- Changed the test areas to a new setting and to include one-way paths.
2022-11-13 18:21:06 +00:00
Barry Kane 582a0d02ae Refactored paths to use linked lists.
- Removed the code for the now-obsolete-before-actually-being-used pathLists.
- playerAreas now contain a list called pathList.
- Refactored createArea, createPath, and the /move and /look commands.
- Added typedefs to prevent the compiler being unable to link.
2022-11-13 00:23:42 +00:00
Barry Kane f3ad758e4f Preliminary implementation of linked-list.c
- Implemented first pass of linked-list.c.

TODO:
- Polish linked-list.c 'till you can see a reflection in it.
- Refactor existing codebase to use linked-list.c.y
2022-11-11 22:58:05 +00:00
Barry Kane c68e66e7bc Squashed current warnings.
- Fixed all current warnings.
- Added the ability to set the text delay as a command line option in the server.
2022-10-31 01:55:44 +00:00
Barry Kane ca8ba5e410 Incremented version numbering in preperation for merge to master.
- Incremented version numbering to Alpha 0.4.
2022-10-30 13:00:18 +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 f2dd83857f Completed Reorganization of Area Data
- Moved the appropriate data structures and functions into areaData.
- Made movePlayerToArea a gameplay primitive.
2022-10-23 17:07:13 +01: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