mirror of
https://github.com/evennia/evennia.git
synced 2026-04-04 23:17:17 +02:00
Dec2022 Devblog
This commit is contained in:
parent
e5c9bb5bc5
commit
51c0fe260d
14 changed files with 833 additions and 536 deletions
|
|
@ -13,7 +13,8 @@
|
|||
</script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="description" content="
|
||||
Latest Evennia dev blog: Project plans and Splitting a Setting in two: As those following Evennia development should be aware of for now, we are approaching the 1.0 release of Evennia, the MU*-building framework. ...
|
||||
Latest Evennia dev blog: Evennia 1.0 released!: <br>
|
||||
...
|
||||
---
|
||||
Evennia is a modern Python library and server for creating text-based
|
||||
multi-player games and virtual worlds (also known as MUD, MUSH, MU,
|
||||
|
|
@ -49,11 +50,17 @@
|
|||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="2022.html"> 2022 (3)
|
||||
<a href="2022.html"> 2022 (4)
|
||||
|
||||
<ul class="devblog-calendar-closed">
|
||||
|
||||
|
||||
<li class="devblog-calendar-post devblog-calendar-tooltip">
|
||||
<a href="2022.html#2022-12-03-evennia-1.0-released!">Dec 3
|
||||
<span class="devblog-calendar-tooltip-text"> Evennia 1.0 released!</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="devblog-calendar-post devblog-calendar-tooltip">
|
||||
<a href="2022.html#2022-09-17-project-plans-and-splitting-a-setting-in-two">Sep 17
|
||||
<span class="devblog-calendar-tooltip-text"> Project plans and Splitting a Setting in two</span>
|
||||
|
|
@ -621,21 +628,21 @@
|
|||
<div class="devblog-title-date">- November 30, 2016</div>
|
||||
</h1>
|
||||
<p><a href="https://4.bp.blogspot.com/-pW3nsIxgroY/WDDFXo3z2dI/AAAAAAAAEs8/n9ehRTZrlggiEIOMGZupSVFxYa7DSGsZgCPcB/s1600/evennia_logo_festive_small.png"><img src="https://4.bp.blogspot.com/-pW3nsIxgroY/WDDFXo3z2dI/AAAAAAAAEs8/n9ehRTZrlggiEIOMGZupSVFxYa7DSGsZgCPcB/s200/evennia_logo_festive_small.png" alt="" /></a></p>
|
||||
<p>So, recently Evennia celebrated its ten-year anniversary. That is, it was on Nov 20, 2006, Greg Taylor made the first repo commit to what would eventually become the Evennia of today. Greg has said that Evennia started out as a "weird experiment" of building a MUD/MUX using Django. The strange name he got from a cheesy NPC in the <a href="https://wiki.guildwars.com/wiki/Evennia">Guild Wars</a> MMORPG and Greg's <a href="https://groups.google.com/forum/#%21category-topic/evennia/evennia-news/5hQTspfWd_Q">first post</a> to the mailing list also echoes the experimental intention of the codebase. The merger with Twisted came <a href="https://groups.google.com/forum/#%21category-topic/evennia/evennia-news/CJ52R4Ws0OM">pretty early too</a>, replacing the early asyncore hack he used and immediately seeing a massive speedup. Evennia got attention from the MUD community - clearly a Python-based MUD system sounded attractive.</p>
|
||||
<p>When I first joined the project I had been looking at doing something MUD-like in Python for a good while. I had looked over the various existing Python code bases at the time and found them all to be either abandoned or very limited. I had a few week's stunt working with <a href="https://sourceforge.net/projects/pymoo/">pymoo</a> before asking myself why I was going through the trouble of parsing a custom script language <em>... in Python</em> ... Why not use Python throughout? This is when I came upon Evennia. I started <a href="https://groups.google.com/forum/#%21category-topic/evennia/evennia-news/yfR0GLKGhJA">making contributions</a> and around 2010 I <a href="https://groups.google.com/forum/#%21category-topic/evennia/evennia-news/zXsA2PaWUoU">took over the development</a> as real life commitments forced Greg to step down.</p>
|
||||
<p>So, recently Evennia celebrated its ten-year anniversary. That is, it was on Nov 20, 2006, Greg Taylor made the first repo commit to what would eventually become the Evennia of today. Greg has said that Evennia started out as a "weird experiment" of building a MUD/MUX using Django. The strange name he got from a cheesy NPC in the <a href="https://wiki.guildwars.com/wiki/Evennia">Guild Wars</a> MMORPG and Greg's <a href="https://groups.google.com/forum/#%21category-topic/evennia/evennia-news/5hQTspfWd_Q">first post</a> to the mailing list also echoes the experimental intention of the codebase. The merger with Twisted came <a href="https://groups.google.com/forum/#%21category-topic/evennia/evennia-news/CJ52R4Ws0OM">pretty early too</a>, replacing the early asyncore hack he used and immediately seeing a massive speedup. Evennia got attention from the MUD community - clearly a Python-based MUD system sounded attractive.</p>
|
||||
<p>When I first joined the project I had been looking at doing something MUD-like in Python for a good while. I had looked over the various existing Python code bases at the time and found them all to be either abandoned or very limited. I had a few week's stunt working with <a href="https://sourceforge.net/projects/pymoo/">pymoo</a> before asking myself why I was going through the trouble of parsing a custom script language <em>... in Python</em> ... Why not use Python throughout? This is when I came upon Evennia. I started <a href="https://groups.google.com/forum/#%21category-topic/evennia/evennia-news/yfR0GLKGhJA">making contributions</a> and around 2010 I <a href="https://groups.google.com/forum/#%21category-topic/evennia/evennia-news/zXsA2PaWUoU">took over the development</a> as real life commitments forced Greg to step down.</p>
|
||||
<p>Over the years we have gone through a series of changes. We have gone from using SVN to Mercurial and then to using GIT. We have transited from GoogleCode to GitHub - the main problem of which was converting the wiki documentation (Evennia has <a href="https://github.com/evennia/evennia/wiki">extensive documentation</a>).</p>
|
||||
<p>For a long time we used Python's reload() function to add code to the running game. It worked ... sometimes, depending on what you changed. Eventually it turned out to be so unpredictable that we now use two processes, one to connect clients to and the other running the game, meaning we can completely restart one process without disconnecting anyone.</p>
|
||||
<p>For a long time we used Python's reload() function to add code to the running game. It worked ... sometimes, depending on what you changed. Eventually it turned out to be so unpredictable that we now use two processes, one to connect clients to and the other running the game, meaning we can completely restart one process without disconnecting anyone.</p>
|
||||
<p>Back in the day you were also expected to create your own game in a folder game/ inside the Evennia repo itself. It made it really hard for us to update that folder without creating merge conflicts all over. Now Evennia is a proper library and the code you write is properly separated from ours.</p>
|
||||
<p>So in summary, many things have happened over the years, much of it documented in this blog. With 3500 commits, 28 000 lines of code (+46% comments) and some 25 people contributing in the last year, <a href="https://www.openhub.net/p/evennia">Openhub</a> lists us as</p>
|
||||
<blockquote>
|
||||
<p>"<em>A mature, well-established codebase with a stable commit history, a large development team and very well documented source code</em>".</p>
|
||||
</blockquote>
|
||||
<p>It's just words compiled by an algorithm, but they still feel kinda good!</p>
|
||||
<p>It's just words compiled by an algorithm, but they still feel kinda good!</p>
|
||||
<p>While Evennia was always meant to be used for any type of multiplayer text game, this general use have been expanded and cleaned up a lot over the years.</p>
|
||||
<p>This has been reflected in the width of people wanting to use it for different genres: Over time the MUSH people influenced us into adding the option to play the same character from many different clients at the same time (apparently, playing on the bus and then continuing on another device later is common for such games). Others have wanted to use Evennia for interactive fiction, for hack&slash, deep roleplay, strategy, education or just for learning Python.</p>
|
||||
<p>Since Evennia is a framework/library and tries to not impose any particular game systems, it means there is much work to do when building a game using Evennia. The result is that there are dozens of games "in production" using Evennia (and more we probably don't know about), but few public releases yet.</p>
|
||||
<p>Since Evennia is a framework/library and tries to not impose any particular game systems, it means there is much work to do when building a game using Evennia. The result is that there are dozens of games "in production" using Evennia (and more we probably don't know about), but few public releases yet.</p>
|
||||
<p>The first active "game" may have been an Evennia game/chat supporting the Russian version of 4chan... The community driven Evennia demo-game <a href="http://ainneve.evennia.com/">Ainneve</a> is also progressing, recently adding combat for testing. This is aimed at offering an example of more game-specific code people can build from (the way Diku does). There are similar projects meant for helping people create RPI (RolePlay Intensive) and MUSH-style games. That said, the Evennia-game <a href="http://games.evennia.com/game/arx">Arx, After the Reckoning</a> is progressing through beta at a good clip and is showing all signs of becoming the first full-fledged released Evennia game.</p>
|
||||
<p>So cheers, Evennia for turning 10. That's enough of the introspection and history. I'll get back to more technical aspects in the next post.</p>
|
||||
<p>So cheers, Evennia for turning 10. That's enough of the introspection and history. I'll get back to more technical aspects in the next post.</p>
|
||||
|
||||
<footer class="devblog-footer">
|
||||
<span class="devblog-copyrights">
|
||||
|
|
@ -663,19 +670,19 @@
|
|||
<p>I reworked the venerable batch command and batchcode processors (these allow to create a game world from a script file) and made their inputs make more sense to people. This was one of the older parts of Evennia and apart from the module needing a big refactoring to be easier to read, some parts were pretty fragile and prone to break. Especially when passing it file names tended to be confusing since it understood only certain relative paths to the files to read in and not even I could remember if one should include the file ending or not. This was cleaned up a lot.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Lots of changes and updates were made to the RPSystem contrib, which optionally adds more advanced roleplaying mechanics to Evennia. The use of this in Evennia's demo game (<a href="https://github.com/evennia/ainneve">Ainneve</a>, being separately developed) helps a lot for ironing out any remaining wrinkles.</p>
|
||||
<p>Lots of changes and updates were made to the RPSystem contrib, which optionally adds more advanced roleplaying mechanics to Evennia. The use of this in Evennia's demo game (<a href="https://github.com/evennia/ainneve">Ainneve</a>, being separately developed) helps a lot for ironing out any remaining wrinkles.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Lots and lots of other fixes and smaller feature updates were done (About <a href="https://www.blogger.com/goog_1124770844"></a><a href="https://github.com/evennia/evennia/commits/master">150 commits and 50 Issues</a> closed since end of summer).</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>A fun thing with a growing user base is that we are also starting to see a lot more Pull requests and contributions. Thanks a lot, keep 'em coming!</p>
|
||||
<p>A fun thing with a growing user base is that we are also starting to see a lot more Pull requests and contributions. Thanks a lot, keep 'em coming!</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Map system contrib (merged), for creating a world based on ASCII map. Talking about maps, users contributed not just one but two new tutorials for implementing both static and dynamic maps with Evennia.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Webclient notifications (pending), for making the webclient show us in a clearer way when it gets updated in a different tab. A more advanced implementation awaits the webclient being expanded with a proper client-side option window; there is currently a feature request for this if anyone's interested in taking it on.</p>
|
||||
<p>Webclient notifications (pending), for making the webclient show us in a clearer way when it gets updated in a different tab. A more advanced implementation awaits the webclient being expanded with a proper client-side option window; there is currently a feature request for this if anyone's interested in taking it on.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>AI system contrib (pending). This is a full AI backend for adding complex behaviors to game agents. It uses Behavioral trees and is designed to be modified both in code and from inside the game.</p>
|
||||
|
|
@ -687,7 +694,7 @@
|
|||
<p><em>Lots</em> of now closed PRs were contributed by the Arx lead developer to fix various bugs and edge-cases as they came up in live use.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>The fixing and tightening of the nuts and bolts will likely continue the remainder of the year. I'm currently working on a refactoring of the way command sets are merged together (see the end of my <a href="http://evennia.blogspot.se/2016/05/evennia-in-pictures.html">blog post on Evennia in pictures</a> for a brief summary of the command system). But with so much new blood in the community, who can tell where things will turn from here!</p>
|
||||
<p>The fixing and tightening of the nuts and bolts will likely continue the remainder of the year. I'm currently working on a refactoring of the way command sets are merged together (see the end of my <a href="http://evennia.blogspot.se/2016/05/evennia-in-pictures.html">blog post on Evennia in pictures</a> for a brief summary of the command system). But with so much new blood in the community, who can tell where things will turn from here!</p>
|
||||
|
||||
<footer class="devblog-footer">
|
||||
<span class="devblog-copyrights">
|
||||
|
|
@ -705,19 +712,19 @@
|
|||
<div class="devblog-title-date">- July 1, 2016</div>
|
||||
</h1>
|
||||
<p><a href="https://3.bp.blogspot.com/-wIhCzMzQyho/V3aDpCR8dEI/AAAAAAAAEog/L8_xmAiXKK8b-42Zoa7t8vjgpIBx1fgnQCLcB/s1600/142455033_49ce50a89b_m.jpg"><img src="https://3.bp.blogspot.com/-wIhCzMzQyho/V3aDpCR8dEI/AAAAAAAAEog/L8_xmAiXKK8b-42Zoa7t8vjgpIBx1fgnQCLcB/s320/142455033_49ce50a89b_m.jpg" alt="" /></a></p>
|
||||
<p>In the month or so since the merger of Evennia's development branch and all its web-client updates, we have been in bug-fixing mode as more people use and stress the code.</p>
|
||||
<p>In the month or so since the merger of Evennia's development branch and all its web-client updates, we have been in bug-fixing mode as more people use and stress the code.</p>
|
||||
<p>There have been some new features as well though - I thought it could be interesting to those of you not slavishly following the mailing list.</p>
|
||||
<h3>Shared web login</h3>
|
||||
<p>When you are logged into the website you will now also auto-login to your account in the web client - no need to re-enter the login information! The inverse is also true. You still need to connect to game at least once to create the account, but after that you will stay connected while the browser session lasts.</p>
|
||||
<p>Behind the scenes the shared login uses cookies linked to server-side Django sessions which is a robust and safe way to manage access tokens. Obviously browser sessions are irrelevant to telnet- or ssh connections.</p>
|
||||
<h3>Extended Nicks</h3>
|
||||
<p>Evennia's nick(name) system is a way to create a personal alias for things in game - both to on-the-fly replacing text you input and for referring to in-game objects. In the old implementation this replacement was simply matched from the beginning of the input - if the string matched, it was replaced with the nick.</p>
|
||||
<p>Evennia's nick(name) system is a way to create a personal alias for things in game - both to on-the-fly replacing text you input and for referring to in-game objects. In the old implementation this replacement was simply matched from the beginning of the input - if the string matched, it was replaced with the nick.</p>
|
||||
<p>In this new implementation, the matching part can be much more elaborate. For example you can catch arguments and put those arguments into the replacement nick in another order.</p>
|
||||
<p>Let's say we often use the @dig command this limited way:</p>
|
||||
<p>Let's say we often use the @dig command this limited way:</p>
|
||||
<blockquote>
|
||||
<p><strong>@dig roomname;alias = exit;alias, backexit;alias</strong></p>
|
||||
</blockquote>
|
||||
<p>Let's say we find this syntax unintuitive. The new nick system allows to change this by catching the arguments in your nick and put it into the "real" command. Here is an example of a syntax putting the aliases in parentheses and separating all components with commas:</p>
|
||||
<p>Let's say we find this syntax unintuitive. The new nick system allows to change this by catching the arguments in your nick and put it into the "real" command. Here is an example of a syntax putting the aliases in parentheses and separating all components with commas:</p>
|
||||
<p><strong>> nick newroom $1($2), $3($4), $5($6) = @dig $1;$2 = $3;$4, $5;$6</strong></p>
|
||||
<p>From here on you can now create your rooms with entries like this:</p>
|
||||
<p><strong>> newroom The great castle(castle), to the castle(castle), back to the path(back)</strong></p>
|
||||
|
|
@ -737,8 +744,8 @@
|
|||
<p>This way you can clothe yourself in different outfits easily using the same output format:</p>
|
||||
<p><strong>> setdesc basic clothing hat</strong></p>
|
||||
<p>The multidescer is a single, self-contained command that is easy to import and add to your game as needed.</p>
|
||||
<p>... There's also plenty of bug fixes, documentation work and other minor things or course.</p>
|
||||
<p>Anyway, summer is now upon us here in the northern hemisphere so things will calm down for a bit, at least from my end. Have a good 'un!</p>
|
||||
<p>... There's also plenty of bug fixes, documentation work and other minor things or course.</p>
|
||||
<p>Anyway, summer is now upon us here in the northern hemisphere so things will calm down for a bit, at least from my end. Have a good 'un!</p>
|
||||
|
||||
<footer class="devblog-footer">
|
||||
<span class="devblog-copyrights">
|
||||
|
|
@ -758,13 +765,13 @@
|
|||
</h1>
|
||||
<p>This article describes the MU* development system <a href="http://www.evennia.com/">Evennia</a> using pictures!</p>
|
||||
<p><em>This article was originally written for <a href="http://www.optionalrealities.com/">Optional Realities</a>.</em></p>
|
||||
<p><em>Since it is no longer available to read on OR, I'm reposting it in full here.</em></p>
|
||||
<p><em>Since it is no longer available to read on OR, I'm reposting it in full here.</em></p>
|
||||
<h4>Figure 1: The parts of the Evennia library</h4>
|
||||
<p><a href="https://2.bp.blogspot.com/-0-oir21e76k/W3kaUuGrg3I/AAAAAAAAJLU/qlQWmXlAiGUz_eKG_oYYVRf0yP6KVDdmQCEwYBhgL/s1600/Evennia_illustrated_fig1.png"><img src="https://2.bp.blogspot.com/-0-oir21e76k/W3kaUuGrg3I/AAAAAAAAJLU/qlQWmXlAiGUz_eKG_oYYVRf0yP6KVDdmQCEwYBhgL/s640/Evennia_illustrated_fig1.png" alt="" /></a></p>
|
||||
<p>Evennia is a game development library. What you see in Figure 1 is the part you download from us. This will not run on its own, we will soon initialize the missing “jigsaw puzzle” piece on the left. But first let’s look at what we’ve got.</p>
|
||||
<p>Looking at Figure 1 you will notice that Evennia internally has two components, the Portal and the Server. These will run as separate processes.</p>
|
||||
<p>The Portal tracks all connections to the outside world and understands Telnet protocols, websockets, SSH and so on. It knows nothing about the database or the game state. Data sent between the Portal and the Server is protocol-agnostic, meaning the Server sends/receives the same data regardless of how the user is connected. Hiding behind the Portal also means that the Server can be completely rebooted without anyone getting disconnected.</p>
|
||||
<p>The Server is the main “mud driver” and handles everything related to the game world and its database. It's asynchronous and uses <a href="http://twistedmatrix.com/trac/">Twisted</a>. In the same process of the Server is also the Evennia web server component that serves the game’s website. That the Server and webserver are accessing the database in the same process allows for a consistent game state without any concerns for caching or race condition issues.</p>
|
||||
<p>The Server is the main “mud driver” and handles everything related to the game world and its database. It's asynchronous and uses <a href="http://twistedmatrix.com/trac/">Twisted</a>. In the same process of the Server is also the Evennia web server component that serves the game’s website. That the Server and webserver are accessing the database in the same process allows for a consistent game state without any concerns for caching or race condition issues.</p>
|
||||
<p>Now, let’s get a game going. We’ll call it mygame. Original, isn’t it?</p>
|
||||
<h4>Figure 2: The full setup for mygame</h4>
|
||||
<p><a href="https://4.bp.blogspot.com/-TuLk-PIVyK8/W3kaUi-e-MI/AAAAAAAAJLc/DA9oMA6m5ooObZlf0Ao6ywW1jHqsPQZAQCEwYBhgL/s1600/Evennia_illustrated_fig2.png"><img src="https://4.bp.blogspot.com/-TuLk-PIVyK8/W3kaUi-e-MI/AAAAAAAAJLc/DA9oMA6m5ooObZlf0Ao6ywW1jHqsPQZAQCEwYBhgL/s640/Evennia_illustrated_fig2.png" alt="" /></a></p>
|
||||
|
|
@ -826,7 +833,7 @@
|
|||
<p>As of today, I merged the development branch to make version 0.6 of the MU* development system and server Evennia.</p>
|
||||
<p>Evennia 0.6 comes with a lot of updates, mainly in the way Evennia talks to the outside world. All communication is now standardized, so there are no particular treatment of things like text - text is just one of any standardized commands being passed between the server the client (whether over telnet, ssh, websockets or ajax/comet).</p>
|
||||
<p>For example the user can now easily plug in "inputfuncs" to handle any data coming from the client. If you want your client to offer some particular functionality, you just need to plop in a python function to handle it, server-side. We also now offer a lot of utility functions for things like monitoring change (tell the client whenever your health status changes so it can update a health bar or flash the screen).</p>
|
||||
<p>The HTML5 webclient has itself updated considerably. Most is happening behind the scenes though. Notably the webclient's javascript component is split into two:</p>
|
||||
<p>The HTML5 webclient has itself updated considerably. Most is happening behind the scenes though. Notably the webclient's javascript component is split into two:</p>
|
||||
<p><a href="https://1.bp.blogspot.com/-vx-uriUXOjI/V0If9Q3TcVI/AAAAAAAAEm4/35haAV1OyAoafjxwHP8wMcOad4CC4OpkQCLcB/s1600/evennia_screen.png"><img src="https://1.bp.blogspot.com/-vx-uriUXOjI/V0If9Q3TcVI/AAAAAAAAEm4/35haAV1OyAoafjxwHP8wMcOad4CC4OpkQCLcB/s400/evennia_screen.png" alt="" /></a></p>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -855,15 +862,15 @@
|
|||
</h1>
|
||||
<p><a href="https://2.bp.blogspot.com/-2joU-U3OlH0/VvQ9hatC4MI/AAAAAAAAEic/PdL_kxHeXPE6O-HuM3Pk_6GQ5T19fc2zA/s1600/supersonic-nozzle.png"><img src="https://2.bp.blogspot.com/-2joU-U3OlH0/VvQ9hatC4MI/AAAAAAAAEic/PdL_kxHeXPE6O-HuM3Pk_6GQ5T19fc2zA/s320/supersonic-nozzle.png" alt="" /></a></p>
|
||||
<p>Hi folks, a bit more technical entry this time. These usually go onto the Evennia mailing list but I thought it would be interesting to put it in the dev-blog for once.</p>
|
||||
<p>So, I'm now halfway through the <a href="https://github.com/evennia/evennia/issues/924">TODO list issue</a> of the <a href="http://evennia.blogspot.se/2016/02/climbing-up-branches.html">wclient development branch</a> as alluded to in the last post. The wclient branch aims to rework and beef up the web client infrastructure of Evennia.</p>
|
||||
<p>The first steps, which has been done a while was converting the SSH/SSL and IRC input/output protocols to use the new protocol infrastructure (telnet and websockets was done since before). That's just under-the-hood stuff though. Today I finished the changes to the Monitor/TickerHandlers, which may be of more general interest.</p>
|
||||
<p>So, I'm now halfway through the <a href="https://github.com/evennia/evennia/issues/924">TODO list issue</a> of the <a href="http://evennia.blogspot.se/2016/02/climbing-up-branches.html">wclient development branch</a> as alluded to in the last post. The wclient branch aims to rework and beef up the web client infrastructure of Evennia.</p>
|
||||
<p>The first steps, which has been done a while was converting the SSH/SSL and IRC input/output protocols to use the new protocol infrastructure (telnet and websockets was done since before). That's just under-the-hood stuff though. Today I finished the changes to the Monitor/TickerHandlers, which may be of more general interest.</p>
|
||||
<p>With the changes to the the way OOB (Out-Of-Band) messages are passing through Evennia (see <a href="https://groups.google.com/forum/#%21category-topic/evennia/evennia-news/xWQu_YVm14k">this mailing list post</a> for more details), the <strong>OOBHandler</strong> is no more. As discussed there, the handling of incoming data is becoming a lot freer and will be easily expandable to everyone wanting to make for a custom client experience. The idea is thus for Evennia to offer <em>resources</em> for various input commands to make use of, rather than prescribing such functionality in a monolothic way in the OOBHandler. There were three main functionalities the OOBHandler offered, and which will now be offered by separate components:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p><strong>Direct function callback.</strong> The instruction from the client should be able to trigger a named server-side function. This is the core of the inputfunc system described previously.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Field/Attribute monitoring</strong>. The client should be able to request <em>monitoring</em> of an object's database fields or Attributes. For example, the client may request to be notified whenever the Character's "health" Attribute changes in some way. This is now handled by the new <em>monitorhandler</em>. See below.</p>
|
||||
<p><strong>Field/Attribute monitoring</strong>. The client should be able to request <em>monitoring</em> of an object's database fields or Attributes. For example, the client may request to be notified whenever the Character's "health" Attribute changes in some way. This is now handled by the new <em>monitorhandler</em>. See below.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Non-persistent function repeats.</strong> One should be able to set up a repeating ticker that survives a server reload but does <em>not</em> survive a cold shutdown - this mimics the life cycle of server Sessions. Scripts could do this already but I wanted to be able to use the TickerHandler for quick assignment. Problem was that the Tickerhandler in master branch is not only always-persistent, it also only calls <em>database</em> <em>object methods</em>. So I have now expanded the tickerhandler to also accept arbitrary module functions, without any connection to a database object.</p>
|
||||
|
|
@ -876,7 +883,7 @@
|
|||
|
||||
<p>Here <strong>obj</strong> is a database entity, like a Character or another Object. The <strong>field_or_attrname</strong> is a string giving the name of a <strong>db_</strong>* database field (like <strong>"db_key", "db_location"</strong> etc). Any name not starting with <strong>db_</strong> is assumed to be the name of an on-object Attribute (like <strong>"health"</strong>). Henceforth, whenever this field or attribute changes in any way (that is, whenever it is re-saved to the database), the <strong>callback</strong> will be called with the optional <strong>kwargs</strong>, as well as a way to easily get to the changed value. As all handlers you can also list and remove monitors using the standard <strong>MONITOR_HANDLER</strong>.<strong>remove()</strong>, <strong>.all()</strong> etc.</p>
|
||||
<h2>The TickerHandler</h2>
|
||||
<p><strong>evennia.TICKER_HANDLER</strong> should be familiar to Evennia users from before - it's been around for a good while. It allows for creating arbitrary "tickers" that is being "subscribed" to - one ticker will call all subscribers rather than each object or function having its own timer.</p>
|
||||
<p><strong>evennia.TICKER_HANDLER</strong> should be familiar to Evennia users from before - it's been around for a good while. It allows for creating arbitrary "tickers" that is being "subscribed" to - one ticker will call all subscribers rather than each object or function having its own timer.</p>
|
||||
<p>Before, the syntax for adding a new ticker required you specify a typeclassed entity and the name of the method on it to call every N seconds. This will now change. This is the new callsign for creating a new ticker:</p>
|
||||
<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%;"><span></span>TICKER_HANDLER.add(interval, callback, idstring="", persistent=True, *args, **kwargs)
|
||||
</pre></div>
|
||||
|
|
@ -884,9 +891,9 @@
|
|||
<p>Here**, interval,** like before, defines how often to call **callback(*args, <strong>kwargs)</strong>.</p>
|
||||
<p>The big change here is that <strong>callback</strong> should be given as a valid, already imported callable, which can be <em>either</em> an on-entity method (like obj.func) or a global function in any module (like world.test.func) - the TickerHandler will analyze it and internally store it properly.</p>
|
||||
<p><strong>idstring</strong> works as before, to separate tickers with the same intervals. Finally <strong>persistent</strong>=<strong>False</strong> means the ticker will behave the same way a Script with <strong>persistent=False</strong> does: it will survive a server reload but will <em>not</em> survive a server shutdown. This latter functionality is particularly useful for client-side commands since the client Session will also not survive a shutdown.</p>
|
||||
<p>... So this is a rather big API change to the TickerHandler, which will mean some conflicts for those of you relying heavily on tickers. Easiest will definitely be to simply stop the old and start new ones. It's not clear yet if we'll offer some automated way to convert old tickers to new ones. Chime in if this is something important to you.</p>
|
||||
<p>... So this is a rather big API change to the TickerHandler, which will mean some conflicts for those of you relying heavily on tickers. Easiest will definitely be to simply stop the old and start new ones. It's not clear yet if we'll offer some automated way to convert old tickers to new ones. Chime in if this is something important to you.</p>
|
||||
<h2>Happening Next</h2>
|
||||
<p>The next steps involves making use of these new utilities to implement the basic OOB commands recommended by the MSDP and GMCP protocols along with some recommended functionality. We'll see how long that takes, but progress is being made. And if you are a web guy, do consider <a href="https://github.com/evennia/evennia/issues/924">helping out.</a></p>
|
||||
<p>The next steps involves making use of these new utilities to implement the basic OOB commands recommended by the MSDP and GMCP protocols along with some recommended functionality. We'll see how long that takes, but progress is being made. And if you are a web guy, do consider <a href="https://github.com/evennia/evennia/issues/924">helping out.</a></p>
|
||||
|
||||
<footer class="devblog-footer">
|
||||
<span class="devblog-copyrights">
|
||||
|
|
@ -904,7 +911,7 @@
|
|||
<div class="devblog-title-date">- February 14, 2016</div>
|
||||
</h1>
|
||||
<p><a href="https://2.bp.blogspot.com/-YRSejcCHpq4/VsDcZRdmTVI/AAAAAAAAEgE/oK4igrEnqWk/s1600/male-lazuli-bunting-bird-perches-on-branch-passerina-amoena.jpg"><img src="https://2.bp.blogspot.com/-YRSejcCHpq4/VsDcZRdmTVI/AAAAAAAAEgE/oK4igrEnqWk/s320/male-lazuli-bunting-bird-perches-on-branch-passerina-amoena.jpg" alt="" /></a></p>
|
||||
<p>Today I pushed the latest Evennia development branch "wclient". This has a bunch of updates to how Evennia's webclient infrastructure works, by making all exchanged data be treated equal (instead of treating text separately from other types of client instructions).</p>
|
||||
<p>Today I pushed the latest Evennia development branch "wclient". This has a bunch of updates to how Evennia's webclient infrastructure works, by making all exchanged data be treated equal (instead of treating text separately from other types of client instructions).</p>
|
||||
<p>It also reworks the javascript client into a library that should be a lot easier to expand on and customize. The actual client GUI is still pretty rudimentary though, so I hope a user with more web development experience can take upon themselves to look it over for best practices.</p>
|
||||
<p>A much more detailed description of what is currently going on (including how to check out the latest for yourself) is found in this <a href="https://groups.google.com/forum/#%21category-topic/evennia/evennia-news/xWQu_YVm14k">mailing list post</a>. Enjoy!</p>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue