Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

The Sage2 Framework: An Incomplete Parting Gift

JaikoJaiko Member Posts: 15 ✭✭ - Stalwart
edited October 2013 in Tech Support
Sage is a telnet proxy and application framework written in Python and designed specifically to make writing code for Achaea suck less. Sage is not a curing system. It can, however, be used to create one.


The Whys and my thoughts on developing for Achaea:
  • There are huge advantages to be had by decoupling your system with a client/server architecture.
  • There are some Achaea-specific logical assumptions that a general client can't handle as well.
  • There are advantages to not having the standard curing system.
  • HTML5 is a superior platform to build powerful GUIs than Mudlet. We're just scratching the surface.
  • Lua is a great language but the features of Python are better suited for larger applications.
  • I wanted a modular framework that would allow me to share code with others easily. 
  • I like the unix toolkit, using the CLI, and text editors or IDEs. Developing inside a MUD client isn't fun. Mixing code in XML might affect your life expectancy. 
  • Twisted is amazing. 
  • Everyone loves their own brand.
Things that probably suck:
  • Live code reloading in Python is a mysterious black art.
  • Windows users probably shouldn't even bother (see Notes on Windows)
  • Writing your own system is a ton of fun and will teach you the game like nothing else, but it will consume huge amounts of time.
  • It's incomplete and there are bugs. This is alpha-quality software. 

Sadly I won't be able to finish the project. I'm no longer at a place in life that leaves much time for games. Every line of code I write for a game is being taken away from something more important. This post will also be my long overdue farewell. My hope is someone else will see the potential of Sage like the rest of us who use it and become the next developer for it. I'm happy to answer questions and help when I can. 

Special thanks to Daje, Sothantos, Ovid, Zeon, and everyone else that contributed. 

Thanks everyone for all the fun times!
MishgulRomSilasJovoloCahinDaeirPlatonusJhuiHavyn

Comments

  • VadimusesVadimuses Member Posts: 1,119 @ - Epic Achaean
    What's this about XML?
    Eld
  • DaeirDaeir AustraliaMember Posts: 6,288 @@ - Legendary Achaean
    This is beautiful, thank you for releasing this.
    Jaiko
  • JaikoJaiko Member Posts: 15 ✭✭ - Stalwart
    When I get a chance this weekend I'll patch up the documentation a bit.
    Rom
  • DaeirDaeir AustraliaMember Posts: 6,288 @@ - Legendary Achaean
    edited October 2013
    Found a few problems:

    EDIT2: I had to fix an issue in gmcp.py where characters with empty rifts would cause Sage to crash upon the first gmcp prompt received. After fixing that, it seems to work fine as a proxy, but doesn't attempt to sip at all. Is the example sipper broken? It looks alright.

    EDIT3: It is broken, you need to import sage.signals and uncomment the line connecting the onprompt event to the post-prompt signal. I'll be forking a branch and updating it with changes where I can shortly.
    Post edited by Daeir on
  • DaeirDaeir AustraliaMember Posts: 6,288 @@ - Legendary Achaean
    edited October 2013
    Live reloading anything involving balance states pretty much results in absolute hell. It's a neat feature for small changes, but I've gone through 5 vials of mana elixir for my hubris now.
  • JaikoJaiko Member Posts: 15 ✭✭ - Stalwart
    Hey Daeir, can you submit some issues and if you've already done work submit pull requests? I apologize that I had made some late changes and broke some of the examples. 

    As far as reloading... yeah it's a hard problem with Python's garbage collection. I'm trying to work on ways to improve it, but I'm lacking for time to work on it right now.

    Feel free to join #astralinae on freenode if you want to chat through some of the issues. 
  • JaikoJaiko Member Posts: 15 ✭✭ - Stalwart
    A bit more about reloading and balances:

    In the 'simplesipper' example, a new Balance is created and attached to sage.player as sage.player.sip. The problem is when you reload simplesipper it doesn't know you've changed sage.player. 

    Conflicting schools of thought come into play here. Assigning balances to sage.player is convenient but has the limitation just described. Keeping the balance as part of your app's namespace should allow it to reload correctly. The simplesipper example is merely a very basic example and not a demonstration of how you'd ultimately handle balances in Achaea. Ultimately you might have (or there might be created) a separate app that manages all balances and processes queues attached to those balances. 

    I debated including this in the framework itself, but decided against it as many of us have different opinions about how a balance (and a queue if you use one) should be managed. player.Balance is intended to be subclassed. And at some point I'd like to provide a more complete example of a Balance, a Queue, and other building blocks to a curing system in the (soon to come) sage.contrib package. 
  • DaeirDaeir AustraliaMember Posts: 6,288 @@ - Legendary Achaean
    I've started porting my system (essentially rewriting it) into Sage2 and am using git to track/control my progress.

    https://github.com/Ephemeralis/overwatch-sage

    Anyone interested in seeing a working example of a nested Sage2 app which has a little bit more detail than the examples, feel free to check it out. It's not perfect and very unfinished thus far, but it should be enough to get you up to speed with the general workings of s2
    JhuiJaikoTvistor
Sign In to Comment.