<inputtype="image"src="https://www.paypalobjects.com/en_US/SE/i/btn/btn_donateCC_LG.gif"border="0"name="submit"title="PayPal - The safer, easier way to pay online!"alt="Donate with PayPal button"/>
<p>If you are reading this, you may notice that this blog has moved from <ahref="https://evennia.blogspot.com/">its old home</a> over on blogspot. I had no issues with blogspot except for the fact that writing the blog itself was done in a rather clunky editor with limited support for code.</p>
<p>Every other text in Evennia (docs, comments etc) is written in <ahref="https://en.wikipedia.org/wiki/Markdown">markdown</a> and I figured it would be nice to be able to use that also for my dev blog.</p>
<p>So I put together my own little blog platform.</p>
<p>I already use github pages for the <ahref="https://www.evennia.com">Evennia homepage</a> and <ahref="https://www.evennia.com/docs">documentation</a>. These are simply html pages located in a <code>gh-pages</code> branch of the main <code>evennia</code> repo. So I decided I would just post my blog posts in a folder and then run a markdown parser to turn it into publisheable HTML pages.</p>
<h3>The tools</h3>
<p>Markdown was originally made to be converted to HTML and there is a plethora of markdown parsers for Python. I also wanted an easy way to insert my text into HTML template; this is also a well-solved problem. So these are the tools I used:</p>
<li><ahref="https://github.com/miyuchina/mistletoe">mistletoe</a> is a pure-Python markdown->HTML parser. I had never used it before but it was easy to use and very fast. It also supports the <code>CommonMark</code> Markdown spec (same as github). I could also easily have it use <ahref="https://pygments.org/">pygments</a> to add code-highlighting to code snippets.</li>
<li><ahref="https://jinja.palletsprojects.com/en/3.0.x/">jinja2</a> is a way to embed special tags in HTML "templates" that can then be programmatically filled with content. It's very similar to the Django templating language.</li>
<p>I then decided that each blog post should be one markdown file with a file name <code>YYYY-MM-DD-The-post-name.md</code>. So this current devblog has a file name of <code>2021-11-18-The-blog-moved.md</code>.</p>
<p>In its simplest form, the date and name of the blog is just parsed from the filename (also makes it easy to find in the file system). But I also decided that each post could have a little optional meta-header for customizing things:</p>
<p>The <code>title</code> is mainly to be able to add characters like <code>!</code> or <code>?</code> that I don't want to add to the file name. I've not used the <code>date</code> yet, but I guess one could use it to publish a text at a different date than the filename (not sure why one would want that ...). The <code>copyrights</code> is to properly credit any resources (mostly images) used.</p>
<p>I wrote my own <code>build_devblog.py</code> program that simple reads all <code>.md</code> files from a directory. It figures out the date and title (from file name or meta-header) and runs <code>mistletoe</code> on it. I create a dataclass with all the post-relevant properties on it. So far so good. Now we need to inject this into an HTML structure.</p>
<a class="devblog-headerlink" href="<spanstyle="color: #9C6500">{{</span><spanstyle="color: #19177C">blogpost.permalink</span><spanstyle="color: #9C6500">}}</span>" title="Permalink to this blog post">¶</a>
<a class="devblog-to-toplink" href="<spanstyle="color: #9C6500">{{</span><spanstyle="color: #19177C">blogpost.permalink</span><spanstyle="color: #9C6500">}}</span>" title="Link to top of post">⇬(top)</a>
<p>Above, the <code>blogpost</code> is a dataclass made available to Jinja, from which it reads and inserts data into the HTML using the <code>{{ ... }}</code> templating fields.
I wanted each individual blog post to have a permalink, so that you could refer to it. I also decided that I would group all blog posts from a year into one HTML page, so <code>2021.html</code>, <code>2020.html</code> etc. Within each page, the blog post is just an anchor. So the link to this post is</p>
<p>For the entire year of devblogs, I stole the template used by the main <code>evennia.com</code> page, and also used the same CSS file (it's all in the same repo after all). Jinja allows you to do simple <code>for</code> loops within the template so it's easy to add all posts into a page.</p>
<p>The final bit was to clean up the CSS and make a little 'calendar' in the sidebar to make it easy to navigate to older devblogs. In the wide-page view you can hover over the blog dates to see their names for easy lookup.</p>
<p>Google (which owns blogspot (formar Blogger) has an export feature but the result of this is a very dense XML file. It's mainly intended to be imported by Wordpress or some other existing blog platform. In the end I gave up on trying to parse it.</p>
<p>Instead I went the dumb route and just copy&pasted each of my old blogs from the old blog into Obsidian, which I use for markdown editing. Luckily this worked very well - all layout was retained and converted automatically to markdown syntax, including links to images etc. I only needed to add some nicer markup for code strings (since that was not a thing on blogspot).</p>
<p>I don't know if I have Obsidian to thank for this or if blogspot uses some standardized format, but manually converti of all my devblogs since 2012 thus ended up being a lot less painful than I thought (for once).</p>
<li>Online editing: I'm not posting things on the fly so I'm fine with making a commit. Writing in a proper text editor is more confortable anyway. And the posts are under version control too!</li>
<li>Comments: Few people every commented directly in the old blog though - and lately it has mostly been spam. To comment, people'll need to use our forums on github or the support channel.</li>
<li>Notifications: <del>I haven't added an RSS feed for this page and there is thus no automatic reporting of new posts in chat etc. I think the amount of posts I do is low enough that I can advertise them manually. I'll probably just make a dedicated announcement thread in Github discussions.</del>
<strong>Update</strong>: I added an RSS feed now, see the little <imgsrc="images/rss-icon.png"alt="rss-feed"/> icon on the top-right of this page.</li>
<p>So, with this new blog platform in place (this post is the first one I write using the new system), I won't update the old one anymore. The old one's not going anywhere though, and I will point here from it.</p>
<p><em>This is a repost of an article I originally wrote for the Imaginary Realities e-zine, Volume 7, issue 3 back in 2015. It's not Evennia-specific but meant for a wider audience interested in making a text-based multiplayer game (MUD/MU*). Since IR is no longer active, I repost it here with only some minor cleanup.</em></p>
<p>When a new user has everything installed and drops into Evennia’s IRC support chat or mailing list, there is one question that we regularly get in various variations:</p>
<p><imgsrc="images/yellow_world_by_griatch_art-d7a6e5n.jpg"alt="painted image of the beginning of a road in autumn"/></p>
How to actually start down that long road towards your own game is an important question. Unfortunately it has no one-size-fits-all answer. So it usually leads to a series of counter-questions. In this article I will try to (without being Evennia-specific) pose those questions in a way that would not fit in a chat window.</p>
<p>So you want to make a game. First you need to make a few things clear to yourself.</p>
<p>Making a multiplayer online game is a big undertaking. You will (if you are like most of us) be doing it as a hobby, without getting paid. And you’ll be doing it for a long time.</p>
<p>So the very first thing you should ask yourself (and your team, if you have any) is why am I doing this? Do some soul-searching here. Here are some possible answers:</p>
<p>There are many other possibilities. How “solid” your answer is for a long-term development project is up to you. The important point is that you ask yourself the question.</p>
<p>Answering this question you may find that you should not start a new project - maybe it’s better to build on or help improve something that already exists. Maybe you find you are more of a game engine developer than a game designer. Some answers may also suggest that you are driven by emotions of revenge or disconcert - emotions that may have abated later when the project most needs your enthusiasm and motivation.</p>
<p>If your aim is to earn money your design goals may well be very different from those of a person who only builds for their own benefit.</p>
<p>Whichever your motivation, you should at least have it clear in your own mind. It’s worth to make sure your eventual team is on the same page too.</p>
<h2>What are your skills?</h2>
<p>Once you have your motivations straight you need to take stock of your own skills and the skills available in your team, if you have one.</p>
<p>Your game will have two principal components and you will need skills to cater for both:</p>
<p>The game engine is maintained and modified by programmers (coders). It represents the infrastructure that runs the game - the network code, the protocol support, the handling of commands, scripting and data storage.</p>
<p>Creating your game engine from scratch can be a worthwhile and rewarding endeavour. It is however not a small one and if your main goal is to create a running game I would recommend building on an existing engine. It’s worth to take your time and do your research here. Searching the net and various MUD sites will bring you a slew of options. I will give some things to look for here.</p>
<p>Whereas some engines/code bases offer a lot of pre-existing coded systems, there is no denying that your team will always need someone who either already knows some basic programming or is willing to learn it.</p>
<p>When judging which engine you want to use, consider:</p>
<li>The engine’s community - hang out in the community/forums/chat surrounding the respective engine. Expect to need to ask a lot of “stupid” questions as you start developing (hint: no question is stupid). Is this a community in which you would feel comfortable doing so?</li>
<li>Active development - is the code base actively maintained? If there are bugs in the engine, does it seem likely they will be fixed upstream or will you be patching bugs yourself? Or alternatively, are there many active users that can help you out with known quirks?</li>
<li>Other available documentation - does the engine come with a manual? Are there online tutorials or other help resources to read?</li>
<li>Which language is the engine coded in? What is it scripted in? Do you or your team already know this language or are you willing to learn it?</li>
<li>If you don’t know the language, do a few beginner tutorial so that you can at least vaguely recognize the syntax. Does the engine’s code seem easy to read and well documented? If the engine is poorly documented, the time of development may rise dramatically.</li>
<li>Something to remember here is that computers of today are very powerful. And while scaling may be interesting if your game really takes off, a text game is, for the most part, not very demanding. So I’d recommend you pick your language and engine not primarily based on performance but on what you feel comfortable and productive working with.</li>
<li>What is the engine’s license? This is mainly important if you plan to ever earn money with your game. Some common engines explicitly forbid commercial use.</li>
<p>Compared to the level of work needed to produce professional graphics for an MMORPG, detailed text assets for a mud are cheap to create. This is one of the many reasons muds are so well suited for a small team.</p>
<p>This is not to say that making “professional” text content is easy though. Knowing how to write imaginative and grammatically correct prose is only the minimal starting requirement. A good asset-creator (traditionally called a “builder”) must also be able to utilize the tools of the game engine to its fullest in order to script events, make quests, triggers and interactive, interesting environments.</p>
<p>Some game engines will offer generic online building tools while others will depend on the coders to create tools specific for their game. What you go for may be influenced by just how technically savvy your builders are and what skills they are willing to pick up along the way.</p>
<p>Your team’s in-house builders will be the first ones to actually “use” your game framework and build tools. They will stumble on all the bugs. This means that you need people who are just not “artsy” or “good with words”. Assuming coders and builders are not the same people, builders need to be able to collaborate well and give clear and concise feedback.</p>
<h2>So, where <em>do</em> I begin?</h2>
<p>Right, after all this soul-searching and skill-inventory-checking, let’s go back to the original question. And maybe you’ll find that you have a better feeling for the answer yourself already:</p>
<li>If you are learning a new programming language, you should follow basic tutorials so that you can read, understand and replicate example code without being completely in the dark.</li>
<li>If you have decided on your game engine you should dive into its manual and basic tutorials. Also make sure to introduce yourself to its community so you can get as much help as possible.</li>
<li>If the game engine offers tutorials on making some small example game, do that carefully. Even if the resulting demo game has nothing to do with what you aim to build. If there are no tutorials maybe you can instead find a full example code that you can examine in the same way. Not only will this give you a better understanding of how parts of the engine hangs together, it will also give you ideas for what you can do with it. If something is surprisingly easy to do, you might even be able to expand your plans!</li>
<li>If your game engine comes with pre-made game tools or building commands, the builders can start getting familiar with it. But keep in mind that these will not reflect the full capabilities of the game - your game is not yet built! So don’t set builders off to build large zone projects at this point. If they are building anything at all, it should be small test areas in order to agree on a homogenous form, mood and literary style.</li>
<p>With a few tutorials and game examples under your belt you are ready to start some preliminary coding-tests of your own. You won’t be making a full game yet! Working without a step-by-step tutorial will give you an idea of just how easy or hard this stuff is to figure out in practice at your current skill level, chosen game engine and language. Make ample use of any manuals, help channels or other resources you can find - anything you will also have access to when you code the real thing. This allows you to judge the quality and usefulness of those resources at the same time.</p>
<p>You or any builders may also get some building exercise here, using the commands and objects you create for simple testing. Here is a list of things to try out (you should be able to do these in any game engine worth its salt):</p>
<li>Change some phrasing in the output of an already existing command.</li>
<li>Make a new command and add it to the game engine. Make it just echo back whatever argument you give it.</li>
<li>Code an object that echoes “tick” to everyone at its location every 20 seconds.</li>
<li>Make a new command that creates new ticking objects where you are, but with a name given by you.</li>
<li>Make a room whose description changes every time you enter it.</li>
<li>Make an object that deletes itself when its “health” property is changed to zero.</li>
<li>Make an “attack” command that randomly reduces the “health” property of a target object until it deletes itself.</li>
<li>These are all simple things but it should give you an idea of what your chosen game engine is capable of and, most importantly, where to find help when you get stuck. If you can’t get past this step even with help you might need to go back and read up on the programming bit some more. Or maybe you should consider an easier game engine.</li>
<p>We are now past the “things to do first”. Welcome to the things you do later.</p>
<p>To reiterate, at this point you should have pondered why you are doing this and made an inventory of your available skills. You have gotten a first taste of the kind of coding work you will need to do and what that entails. You have built a few things to see how that works. Maybe you even changed game engine somewhere in the middle. Still ready to roll? Excellent.</p>
<p>You should now hopefully have enough information to be able to realistically set the scope of your game.</p>
<p>Everyone wants to make the best game ever. You want a whole world simulated in minute detail with next-generation artificial intelligence. You want instant action that puts Hollywood to shame and emergent storytelling worthy of Shakespeare.</p>
<p>It’s okay to dream big, but your first goal now is to get something out. Something that players can actually connect to and give feedback on. Having players enjoying an early version of your game is a great motivational boost in itself, you should try to reach that stage quickly. You are aiming for a first version, not the ultimate version. All online mmo:s keep improving the game after release, that’s the name of the game.</p>
<p>So keep your grand plans in mind but limit your scope for your first release. For a group of hobbyist developers (which is, frankly what almost all MU* development teams are) your motivational time is precious. You are likely not getting paid during development which means that it’s imperative that you set out to create something you are capable of finishing while still having fun. Adjust the scope to fit this time. If you run out of steam before this time you’ll know you went for too big a scope.</p>
<p>How to progress is depending on your preference. Some prefer to just jump straight into coding and figure out things as they go. It's not a bad idea to to sit down and plan a little first though - and remember that you want <em>a first version</em> of your game at this point, not the <em>final, ultimate</em> version.</p>
<p>This is beyond the first question asked in this article (which is long enough as it is) but I have written about this process in <ahref="https://evennia.com/docs/latest/Game-Planning">Evennia’s game planning documentation</a>. This reiterates some aspects of this article while expanding on others.</p>
<p>… But in the end, remember that what kills a hobby game project will usually be <em>your own lack of motivation</em>. So do whatever you can to keep that motivation burning strong! Even if it means deviating from what you read in articles like this one. Just get that game out there, whichever way works best for you.</p>
<p>Another year passed with Evennia, the Python MU* creation system. The past year saw a lot of bug fixing and more gradual additions and in September we released version 0.9.5. This was an intermediary version on our way to 1.0. Time to look forward to next year.</p>
<p>On my development horizon for 2021 are the main new features planned for v1.0. Some of these are rather big things I've wanted to get around to for a while. They are all happening in the <em>develop</em> branch of Evennia, which is currently <em>not</em>recommended for general use.</p>
<li><strong>SessionDB:</strong> In the current Evennia, Sessions (the representation of a single client connection) is an in-memory entity. This is changing to be a database-backed entity instead. One will be able to typeclass Sessions like other entities for easier overriding. This change also means that there will be one single point of session-id (the django-session), alleviating some reported issues where the Portal- and Server-side sessions have drifted out of sync. It will also make it a lot easier to support auto-logins, also across server reboots. Db-backed Sessions will also simplify the Portal-Session interaction a lot.</li>
<li><strong>Script refactor:</strong> The Scripts will see some refactoring, mainly because they are used more as general-storage entities compared to the timers they were originally meant to be. These days Evennia also offers a range of other timer-mechanisms (tickers, delays, Events etc), so it's less important to rely on Scripts for this functionality. The most important change will be that the timer will required to be explicitly started (instead of always starting on script-creation). It will also be possible to stop the timer without the script getting deleted (so separating the timer from the Script's life-cycle).</li>
<li><strong>Channel refactor:</strong>The Channels will also see changes; notably to make it considerably easier to override and customize them per-caller. Today the Channel typeclass has a maze of different hooks being called, but it's harder for devs wanting users to customize their channel output. So one of the changes will be new hooks on the account/object level for allowing to format the channel output per-user. There will also be a cleanup of the existing hooks to make things clearer.</li>
<li><strong>New starting tutorial:</strong>As part of the new documentation, I'm writing a new starting-tutorial. This will consolidate many of the existing beginner tutorials in a consistent sequence and if following it to the end, the reader will have created a small beginner game with everything in place. I plan to make a few new contribs to support this.</li>
<li><strong>Contrib restructure:</strong>Our contrib/ folder is getting a little cluttered. I'm investigating organizing things a little differently by at least moving things into categorized folders. This will lead to people having to change their imports, but we'll see just how it goes.</li>
<li><strong>Documentation cleanup:</strong> There are a lot of small changes, cleanup and restructuring needed in the docs overall - many of the existing pages are auto-translated from the old wiki and need rewriting both in style and content. The whole idea of moving to the new doc-system is to be able to update the docs alongside the code changes. So hopefully the changes to Sessions, Scripts and Channels etc will all be covered properly from the onset rather than after release (as was the case with the wiki).</li>
<li><strong>Unittest coverage:</strong> Our current test coverate is 64%, we need to expand this. I hope to get to at least 70% before v1.0 but that is less of a strict goal.</li>
<li><strong>Evennia PYPI package:</strong>This will be one of the last things before the release of 1.0 - Evennia will be put onto PYPI so you can install with <strong>pip install evennia</strong>. Once we do it will simplify the install instructions dramatically for those not interested in contributing to Evennia proper.</li>
<p>We also have some pull-requests in the making that will be interesting to have in the system, such as Volund's plugin system, making it easier to inject custom settings on the fly (good for contribs wanting to add their own database tables, for example).</p>
<p><strong>Thanks</strong> for the past year, everyone - thanks to all of you that contributed to Evennia with code or by reporting issues or coming with feedback. Thanks particularly to those of you willing (and able) to chip in with some financial support for Evennia development - that's very encouraging!</p>
<p>And finally, a big thanks to all of you taking part in community discussions, both you asking questions and you helping to answer them tirelessly and with good cheer - you make the Evennia community the friendly, inviting place it is!</p>
<p>May all our game development move forward and our hard drives stay healthy for another year.</p>