Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Zelerin

  • Rank

Personal Information

  • Interests
  1. This is quite a bit different from Quest, I feel: It is multi-user (and therefore has a server component) and allows users to modify the game (new rooms, worlds, players, objects, programs, etc) while it is running. In theory the game would never need to be shut down, restarted, or recompiled except for major system patches. The concept is not new, but most of the current servers are based off decades old designs or have significantly reduced flexibility. I probably should have made that more clear and I apologize for that; I realize now that not everyone knows what a MUD or MUCK even is - they've gotten a lot more obscure compared to 15-30 years ago. Hopefully this helps explain it a little better. Thanks for your feedback!
  2. Hello! I am looking for help with developing a from-scratch, open source engine and web frontend for text-based games, in the style of MUDs, MUCKs, MUSHs, etc. Rather than simply replicate what those systems currently offer, I am looking to make some substantial improvements and bring the concept into the modern world. This includes a standardized, easy-to-use web interface, using AngelScript https://www.gamedev.net/forums/forum/34-angelcode/ for as much of the in-game commands as possible for a more modern scripting experience, a modular C++ backend to make it more maintainable and extensible, and a large number of in-game usability enhancements and new features. My goal is this: To make text-based gaming appealing to people who would find it fun, but are put off by the all-text interface, a fairly steep learning curve, and a client program (which may not be easy to use!) that must be installed in order to access it. In turn, this would hopefully make text-based gaming more popular again. I am looking for all sorts of help. Examples include: C++ developers, web developers, documentation, design, UX, writing the in-game scripts, testing, hosting a sample installation, etc. A proof of concept demo is available for running on Linux and may eventually be ported to other systems. You can find the project and more info at: https://github.com/mutgos/mutgos_server Feel free to respond to the post or message me if you have any questions. Thanks!
  3. You're welcome! Also, what about the AngelScript interpreter itself? Is it supposed to be able to handle a failed malloc internally at any time? My guess is 'no' based on what I saw, but I did not do an extensive code analysis and the failure may have been caught further up the chain. It was also an older version. I'm thinking my periodic heap check every few times the debug hook is called should be sufficient, but the finer grained I can make it the better.
  4. @Solokiller had solved it in the previous post and your hunch is correct. I made a custom string class that does it by reference, and didn't realize that the caller is indeed the owner in this situation. I now have the caller's class decrement the string reference once the script completes, and now it GCs just fine, every time. If you're curious, I can post a github link to the classes, though after making the fixes all my GC problems have been solved. I now have a much better understanding of how it works (or at least think I do!). It makes a lot more sense than it did when I first started. Thanks for responding, though!
  5. When you put it that way, it makes complete sense. Easy enough to do, and at least it sticks out in Valgrind if done wrong. Thanks a lot for your help! This is something I can document pretty easily as 'rules for working with AngelScript' in my code. Oddly enough, I've found just about everything else in AngelScript easy to work with.
  6. This fixed both my problems. Thanks for your quick response! A followup question: In these situations, where I know I don't want to hold a reference to the object on the C++ side, is it safe to have the GC count start out as 0 when it registers with the engine? Or does it need to be 1 at first to prevent any weird GC problems, and then be decremented after? I'd like to automate this as much as possible behind constructors to keep the problem from returning.
  7. Hello! I'm experiencing a couple of memory leaks and would like to see if anyone knows the correct way to clean them up. The second leak concerns an issue with cscriptarray (version 2.33.0). Basically, I'm finding when I do something like this (result is of type CScriptArray, and AEntity is a custom pass-by-reference that will register with the garbage collector upon construction): result->InsertLast(new AEntity(engine_ptr, *iter)); When this line is ran, AEntity is inserted as expected, but when the script ends, Valgrind reports the AEntity instances are not cleaned up, but the CScriptArrays are. AEntity instances outside CScriptArrays are cleaned up fine. I'm thinking I'm doing something wrong, but am not sure what. If I just missed something in the documentation, feel free to tell me and I'll go recheck. Does anyone have any ideas what I'm doing wrong? Thanks in advance for the help!
  8. Hello! I'm experiencing a couple of memory leaks and would like to see if anyone knows the correct way to clean them up. The first leak concerns setting my custom pass-by-reference string class as an argument on the script 'main()' method. I do the usual context SetArgObject() to set the string on the function, ran the script, and did a GarbageCollect() when done. Even when I clean up the context and engine like so: context_ptr->Abort(); context_ptr->Unprepare(); engine_ptr->DiscardModule(SCRIPT_MODULE_NAME.c_str()); engine_ptr->GarbageCollect(); engine_ptr->ReturnContext(context_ptr); engine_ptr->ShutDownAndRelease(); The string argument is never cleaned up and Valgrind finds it. The other string instances are cleaned up fine. Am I supposed to always manually delete the argument once execution has completed? The string class automatically registers with the engine's garbage collector, so I figured that would do it, but it doesn't seem to work. It's also quite possible I'm doing something wrong, so any ideas are appreciated! Thanks in advance for your help!
  9. Hello! This is the first of a few posts I have concerning AngelCode, which has truly been an angel and made it possible to pursue my open source project (more info about that in another post). While looking at cscriptarray (version 2.33.0), I noticed it didn't check for a new pointer after a malloc in Precache(), around line 1694. The fix I added (though I don't think I've tested it specifically yet) is: // Create the cache cache = reinterpret_cast<SArrayCache*>(userAlloc(sizeof(SArrayCache))); /// BEGIN malloc check if (! cache) { asIScriptContext *ctx = asGetActiveContext(); if( ctx ) ctx->SetException("Out of memory"); return; } /// END malloc check memset(cache, 0, sizeof(SArrayCache)); Just wanted to note it as a potential bug for fixing in later versions. Related, I have a more general question about how AngelCode handles malloc fails. A quick inspection of the code suggests that most areas of the interpreter code cannot handle a malloc call failing. Is this true or did I misread it? Is this something under consideration for fixing in the future? Basically, I'm using AngelScript in what is essentially a semi-open sandbox environment, where most users could (if desired) write code and have it execute on the server, often simultaneously with other scripts. Because of this, I have to keep careful tabs on resource usage (CPU and memory). For now, I'm checking memory used by each AngelScript engine via the debug hook (and a custom allocator) and aborting in there if it went over. It would be much nicer to be able to abort during the actual allocation and clean up, but I suspect it would be way too difficult for AngelScript to check every single malloc. Still, I thought I'd check! Thanks for making such a nice, easy-to-integrate product!
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!