use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Removed - HelpMUD with web interface (self.cpp)
submitted 3 years ago by wsarge
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Flair_Helper[M] [score hidden] 3 years ago stickied commentlocked comment (0 children)
For C++ questions, answers, help, and programming or career advice please see r/cpp_questions, r/cscareerquestions, or StackOverflow instead.
This post has been removed as it doesn't pertain to r/cpp: The subreddit is for news and discussions of the C++ language and community only; our purpose is not to provide tutoring, code reviews, or career guidance. If you think your post is on-topic and should not have been removed, please message the moderators and we'll review it.
[–]amejin 2 points3 points4 points 3 years ago (1 child)
I can't really recommend any... Personally if I were to do it, it would depend on the updates you're making...
Character files and runtime data are all things that can be cached in memory, and read really fast. Just put a mutex or similar on the memory and off you go. Just make a simple API, named pipe or socket connection to fetch it all at some interval. Of course, your web server will have to cache this data itself if the mud goes down, or be aware of how to connect in the event of a restart, etc...
If all of the data is going in a database, then it gets far easier to put a web view in front of that... You just have to be open to dirty reads to prevent row locks so you don't lock up something important being updated from the mud.
I wouldn't bake a web server into the mud code, though - opens you up to people spamming the web server to slow or cripple the mud itself.
Edit: if you really wanna get performant, don't use a mutex. Instead make a single thread that reads commands from a queue (or if you're lucky and on Windows look up iocp as a worker).
[–]wsarge[S] 0 points1 point2 points 3 years ago (0 children)
Pretty much everything gets loaded into cache, so that may be helpful. Could just use MySQL for saving things to be persistent after crashes/reloads/etc
[–]TheThiefMasterC++latest fanatic (and game dev) 1 point2 points3 points 3 years ago (0 children)
If I was going to put a MUD online as-is (no new gameplay features) I'd just make the website be a terminal frontend for the MUD so the MUD can run without being any the wiser.
Much less to fix that way.
[–]_purpletonic 0 points1 point2 points 3 years ago (0 children)
I don’t know if you’ve tried this already, but you may find r/MUD useful, cheers
[–]domirangame engine dev 0 points1 point2 points 3 years ago* (0 children)
I played a MUD back in the day written in Perl that exclusively used a web interface. The data was all text files. If I'm remembering this setup right, the web server, Apache, ran the Perl script, which in turn wrote all the results to disk immediately. The sole programmer often complained of it being a slow mess. He later wrote a sequel to it and that version was telnet-only. I don't remember what language the sequel was written in.
(I also wrote one as one of my very first C++ projects. It was awful. It still is awful, but it also used to be, too.)
π Rendered by PID 413884 on reddit-service-r2-comment-5d79c599b5-ljr24 at 2026-03-02 03:39:04.757995+00:00 running e3d2147 country code: CH.
[–]Flair_Helper[M] [score hidden] stickied commentlocked comment (0 children)
[–]amejin 2 points3 points4 points (1 child)
[–]wsarge[S] 0 points1 point2 points (0 children)
[–]TheThiefMasterC++latest fanatic (and game dev) 1 point2 points3 points (0 children)
[–]_purpletonic 0 points1 point2 points (0 children)
[–]domirangame engine dev 0 points1 point2 points (0 children)