Getting started, some questions

  • Zeno
  • Zeno's Avatar Topic Author
  • Offline
  • Junior Member
More
31 Oct 2013 20:09 - 31 Oct 2013 20:10 #1 by Zeno
Getting started, some questions was created by Zeno
My MUD (BIYG) is fairly niche, so my goal has always been to aim outside the MUD community for players. At one point I had a Facebook app pointing to a webpage on my server that hosted FMud, which connected to the MUD. It brought in chunks of new mudders, but Facebook's API changes too much for me to keep up.

I'm definitely hoping to move to MudPortal as the main point of contact for non-mudders, so I'll probably have some questions as I begin to roll this out. Thanks for the site!

Some starting questions:

1) I'm implementing MSSP soon, any thoughts if MudPortal can interact/benefit there?
2) Is it possible to disable triggers on my client for BIYG?
3) Can we set a default window size? Would it be bad to default it maximized which overwrites the MudPortal MUD list?
4) Is it possible to setup chat windows? Maybe this is a good example for me to follow?
5) Can we personalize the client/play window? Add some text or images?
Last edit: 31 Oct 2013 20:10 by Zeno.

Please Log in or Create an account to join the conversation.

More
31 Oct 2013 22:09 #2 by plamzi
Replied by plamzi on topic Getting started, some questions

Zeno wrote: My MUD (BIYG) is fairly niche, so my goal has always been to aim outside the MUD community for players. At one point I had a Facebook app pointing to a webpage on my server that hosted FMud, which connected to the MUD. It brought in chunks of new mudders, but Facebook's API changes too much for me to keep up.

I'm definitely hoping to move to MudPortal as the main point of contact for non-mudders, so I'll probably have some questions as I begin to roll this out.


Welcome, and I hope you'll find this site useful. At some point, there will definitely be a Facebook version of the app, as well as a tablet-friendly version.

Zeno wrote: 1) I'm implementing MSSP soon, any thoughts if MudPortal can interact/benefit there?


Not in the short term. I'm not looking to build yet another MUD list. I'd rather have few but select games listed and maintained by devs who are interested in reaching non-vets or otherwise exploring the capabilities of a web interface. I'd like to see the portal app used as a foundation for next-gen MUD UX.

In the long term, everything that enhances the reach and effectiveness of the portal will be put to use.

Zeno wrote: 2) Is it possible to disable triggers on my client for BIYG?


I've added configuration parameters for this. Just add the following code inside a .js file that's posted in the "Official" category and linked to your MUD server:
Config.notriggers = 1;

I'll be starting a separate article soon that will document all the configuration options.

Zeno wrote: 3) Can we set a default window size? Would it be bad to default it maximized which overwrites the MudPortal MUD list?


If you're deep-linking to the app (e. g. via a "Play" button), you can use the &width and &height parameters.

In Javascript, you can do:
Config.width = 900;

This should also work:
Config.width = '100%';

If you want the default to be full-width, go for it. Note that people will always be able to resize the window. And if they are registered users, their window positions will be saved.

Also note that if you don't want the Game Center and Portal page header to be displayed, you can add '&clean' to a deep link. I'll soon add an option to not open the Game Center, or to limit the games shown in it only to your game (and any profiles the player has created based on your game).

Zeno wrote: 4) Is it possible to setup chat windows? Maybe this is a good example for me to follow?


Yes, that's the example showing how to activate and configure the ChatterBox plugin.

Zeno wrote: 5) Can we personalize the client/play window? Add some text or images?


Yes, in pretty much every way you please. When you post code in the "Official" category, you can, for example:

Use jQuery to change style sheets, such as add a custom background:
j('#page').css({
        background: 'url("/images/Bedlam_Bg.png") no-repeat fixed 0 0 #000000',
        width: '100%',
        margin: '0px auto'
    });

Register to listen for the 'scrollview_ready' event so you can manipulate the ScrollView after it's loaded:
Event.listen('scrollview_ready', function() { 
//customize
});

Please Log in or Create an account to join the conversation.

  • Zeno
  • Zeno's Avatar Topic Author
  • Offline
  • Junior Member
More
01 Nov 2013 00:40 - 01 Nov 2013 02:50 #3 by Zeno
Replied by Zeno on topic Getting started, some questions
Thanks, I'm starting some now. I created biyg.js but later when I tried to edit it, I get a 404 error.

www.mudportal.com/20-app-code/private/32-biyg-js
Last edit: 01 Nov 2013 02:50 by plamzi.

Please Log in or Create an account to join the conversation.

More
01 Nov 2013 02:51 #4 by plamzi
Replied by plamzi on topic Getting started, some questions
Which category was the script in when you tried to edit it?

When I looked at it, it was in "Official" but in an unpublished state, which may have erroneously prevented you from editing it further. I published it and authorized your account to post official code for your game. It's now loading fine on the app page and disables triggers.

Note that players are able to opt out of official code, so this is not going to stop anyone determined to use triggers (nothing will).

Please Log in or Create an account to join the conversation.

  • Zeno
  • Zeno's Avatar Topic Author
  • Offline
  • Junior Member
More
01 Nov 2013 03:00 #5 by Zeno
Replied by Zeno on topic Getting started, some questions
I put it under App Code->Private per this guide: www.mudportal.com/forum/site-app-support...elop-for-the-web-app

I did see it was unpublished, but that seems like the default state it was in even after hitting save the first time. Thanks, I can access it now.

(Yeah it's not like I can prevent triggers with normal MUD clients, so that's fine)

Please Log in or Create an account to join the conversation.

  • Zeno
  • Zeno's Avatar Topic Author
  • Offline
  • Junior Member
More
14 Nov 2013 02:30 - 14 Nov 2013 02:43 #6 by Zeno
Replied by Zeno on topic Getting started, some questions
On the topic of the chat window, I've got it in my JS file and the window appears but it doesn't appear to be grabbing any of my MUD tells.

I did fix up the regex and it should catch my tell format:
Batman tells you 'hello'

Assuming you can view my JS file, any thoughts what I'm doing wrong?

On the subject of questions, is there a way to pass the original IP address?
Last edit: 14 Nov 2013 02:43 by Zeno.

Please Log in or Create an account to join the conversation.

More
14 Nov 2013 06:07 #7 by plamzi
Replied by plamzi on topic Getting started, some questions
There's color inside your chat line, so you'll need to adjust the regex more.

I tweaked the ChatterBox code to show more in the console when you have &debug=1. Let me know if that helps.

Please Log in or Create an account to join the conversation.

  • Zeno
  • Zeno's Avatar Topic Author
  • Offline
  • Junior Member
More
14 Nov 2013 17:27 #8 by Zeno
Replied by Zeno on topic Getting started, some questions
Interesting. Is there a way to ignore or strip the color? My chat looks like:
<GREEN>Zeno chats '<CYAN>Hello there<GREEN>'

But sometimes players personalize their chats, and can make it like:
<GREEN>Zeno chats '<CYAN><WHITE>Hello there<GREEN>'

So matching colors is pretty hard when players can control their own colors sent.

Please Log in or Create an account to join the conversation.

More
14 Nov 2013 17:50 #9 by plamzi
Replied by plamzi on topic Getting started, some questions

Zeno wrote: Interesting. Is there a way to ignore or strip the color? My chat looks like:

<GREEN>Zeno chats '<CYAN>Hello there<GREEN>'

But sometimes players personalize their chats, and can make it like:
<GREEN>Zeno chats '<CYAN><WHITE>Hello there<GREEN>'

So matching colors is pretty hard when players can control their own colors sent.


I see. It's probably doable with just RegEx but it will be a tough cookie to crack.

It may be a bit easier if you subscribe a custom function to "before_process" that strips color codes from certain lines, but then you lose the ability to display those lines in the colors the author intended.

The cleanest solutions I can think of involve doing some things on the server side. You can cc certain communications out of band and send them exactly as you want them to be shown in the ChatterBox (e. g. colors stripped). Or, you can pre-format communications differently for this client, e. g. ignore people's custom colors.

Please Log in or Create an account to join the conversation.

  • Zeno
  • Zeno's Avatar Topic Author
  • Offline
  • Junior Member
More
18 Nov 2013 17:11 #10 by Zeno
Replied by Zeno on topic Getting started, some questions

but then you lose the ability to display those lines in the colors the author intended.

I think I'd actually prefer this. So what would I be stripping, the raw ANSI color tags from the output? I'll play around with before_process.

On the subject of questions, is there a way to pass the original IP address of the user?

Please Log in or Create an account to join the conversation.

More
18 Nov 2013 17:48 #11 by plamzi
Replied by plamzi on topic Getting started, some questions

Zeno wrote:

but then you lose the ability to display those lines in the colors the author intended.

I think I'd actually prefer this. So what would I be stripping, the raw ANSI color tags from the output? I'll play around with before_process.


"before_process" is the earliest hook, so yes, the colors would be still in ANSI. I added a quick function to strip ANSI inside the Colorize module. So try this:
Event.listen('before_process', function(d) {
var lines = d.split('\n');
//for each line in lines
//if line is communication
line = Colorize.stripANSI(line);
return lines.join('\n');
});

Zeno wrote: On the subject of questions, is there a way to pass the original IP address of the user?


If you mean the proxy passing the user's IP to the game server, that's already being done in 3 ways: TTYPE, MSDP, GMCP. If you are negotiating any of these, you should be getting it already.

Please Log in or Create an account to join the conversation.

  • Zeno
  • Zeno's Avatar Topic Author
  • Offline
  • Junior Member
More
19 Nov 2013 03:36 #12 by Zeno
Replied by Zeno on topic Getting started, some questions
I haven't looked at Colorize yet; if I want to say view the file (I see it in the article list), is there a way to do that? I don't have edit permission of course but when I click the title (URL goes to www.mudportal.com/?id=7) under the assumption it'd let me read-only view it, I get redirected to the homepage.

Please Log in or Create an account to join the conversation.

More
19 Nov 2013 05:52 #13 by plamzi
Replied by plamzi on topic Getting started, some questions
This is fixed. I've also updated the Colorize.js example to the latest version.

The examples are there just for easy viewing. You can always see the latest code for all of these modules on the page itself.

Please Log in or Create an account to join the conversation.

  • Zeno
  • Zeno's Avatar Topic Author
  • Offline
  • Junior Member
More
19 Nov 2013 17:06 #14 by Zeno
Replied by Zeno on topic Getting started, some questions
Oops thanks, I had it there originally but moved it around when it wasn't working. I moved it back.

The notriggers config still doesn't seem to work though?

Also, is there a config to make the Game Center start minimized? I'd like to have it open but start minimized.

Please Log in or Create an account to join the conversation.

More
19 Nov 2013 18:06 #15 by plamzi
Replied by plamzi on topic Getting started, some questions
Currently, the 'notriggers' option disables triggers from taking effect, and informs the user in the loading sequence that triggers are disabled by official code. That's much easier than hiding them for some games but not others in Game Center. It's also nicer to the end user and informs them they have the option to disable official code.

There's no config for GC starting minimized but it can be easily added. You can plan for "Config.collapse = [ '#control-panel' ];".

Please Log in or Create an account to join the conversation.

  • Zeno
  • Zeno's Avatar Topic Author
  • Offline
  • Junior Member
More
21 Nov 2013 03:44 #16 by Zeno
Replied by Zeno on topic Getting started, some questions
Ah okay thanks. I was gonna try testing that trigger dialog box, but I can't seem to load my MUD page under my user.

www.mudportal.com/play?host=biyg.org&port=1801

This will take me to the raw MUD, with none of my JS loaded. It works as a guest. In the JS console, there's an error:
Uncaught TypeError: Cannot read property '' of undefined on MacroPane.js?v=62:26

Please Log in or Create an account to join the conversation.

More
21 Nov 2013 06:00 #17 by plamzi
Replied by plamzi on topic Getting started, some questions
Try now.

Please Log in or Create an account to join the conversation.

  • Zeno
  • Zeno's Avatar Topic Author
  • Offline
  • Junior Member
More
22 Nov 2013 00:49 #18 by Zeno
Replied by Zeno on topic Getting started, some questions
Hmm, same issue.

Please Log in or Create an account to join the conversation.

More
22 Nov 2013 14:20 #19 by plamzi
Replied by plamzi on topic Getting started, some questions

Zeno wrote: ...I can't seem to load my MUD page under my user.

www.mudportal.com/play?host=biyg.org&port=1801

This will take me to the raw MUD, with none of my JS loaded. It works as a guest. In the JS console, there's an error:

Uncaught TypeError: Cannot read property '' of undefined on MacroPane.js?v=62:26


I'm not actually able to reproduce this so I'm working in the blind. I think the key here is that you're saying your official code is not loading when you view the app page with your user. That should not be the case. Can you trace what is being loaded on the page and look for a URL like this one:

www.mudportal.com/index.php?option=com_p...1801&_=1385129357707

If it's not there at all, or is there, but empty, that will help me understand what's going on.

Thanks!

Please Log in or Create an account to join the conversation.

  • Zeno
  • Zeno's Avatar Topic Author
  • Offline
  • Junior Member
More
23 Nov 2013 23:42 #20 by Zeno
Replied by Zeno on topic Getting started, some questions
It's working now, maybe I just had a cache issue.

Please Log in or Create an account to join the conversation.