Wednesday, April 14, 2010

My response to Twitter

Well, that's better news than I was suspecting. Once I got to the notes about not favoring automated features, I was concerned that the whole idea would be a wash.

On the plus side, if I'm never going to release it, I'm basically feature complete. All I need to do is add some additional error checking. (It should have some error checking now, but it could use a little more.)

If you're curious, the thing is currently a 140 line BASH script using curl to make the Twitter calls. It took me ~2-3 hours to get all the features I wanted and to verify they all worked. (This would be how I got a fully functional proof-of-concept before I thought to ask about whether such a program would be allowed.) I may try out a show using the current script before I do much more to it. It would be cool to integrate location tracking and timed uploads of photos, but both of those can wait until I rewrite the thing in Python -- and I won't be doing that until I can prove the core idea is moderately successful.

You are correct that there will be no automated account creation. I clearly read the section about scraping the site will cause your account to be terminated. Automating web browser actions in such a manner is functionally the same, and sites can be programmatically scraped in a manner that they look like they're having automated browser actions, so each is really just as bad. The plan has always been for each character to get the account created manually. I am glad that I don't have to worry about limits there. It should be easy enough to stay within reason.

re:other limits. The FAQS or API docs or other site information mention specific limit numbers. That's where I found out such things existed and were enforced. It is easier to just plan for reason and check for error, though, so I'm happy with the answers. To pull this off, the timing on everything needs to look like normal human tweets, so there shouldn't be any problems over-stretching the bounds here.

re: Replying to @people. This wouldn't be at all random. This would be very specific feedback *initiated* by the human. This is really to help keep up the illusion that it is all really happening. If someone asks a specific question about the story, the answer can be presented as if it is just one person replying to another via Twitter. I would expect most people to just watch silently and that would be it, but if someone asks a question directed to a character it only makes sense for that character to respond. In general, the focus will be on the other characters. Randomly including names of followers would -- quite rightly -- be seen as spam.

Since this isn't going to be a distributed project, I'll sketch out an idea, then create a website for the particular show before requesting a "source" identifier. This should make it even easier to identify the tweets as coming from an automated source.

I hope that also clarifies my personal stance on some of the issues you raised.

Thanks!

Steven Black

Tuesday, April 13, 2010

And Twitter replied...

Hi,

Thank you for writing in. This application is indeed a cool concept but we agree that it presents some opportunities for spammers. Overall, we'd prefer that you not make it publicly available for general use, but feel free to move forward with your own uses. To answer some of your questions specifically:

2. We do not reveal our limits, as if they were to get out, users looking to abuse the system would operate just within the limits, and this would create bad user experiences. Account creation cannot be accomplished through the API, so it would be the operator's choice how many accounts to create, correct? Automating browser actions to sign up new accounts is not recommended.

4. If real people are @replied to, it should be made clear to them (either in the biography field or on an external site describing the play) that following these accounts subjects them to @replies. Unexpected or unsolicited @replies are often perceived as spam and could be reported as such, and even cause the sending account to be suspended.

5. Again, we do not discuss these kinds of limits. There are signals on both the absolute quantity of tweets but also the velocity of tweets, and even if you set a limit on the number, an account could theoretically post them all in a short time and still get suspended. Enacting an absolute limit would not therefore be required, as our systems would still monitor the accounts individually and take action as necessary.

Please let me know if you have any other questions.

Thanks,
[twitter representative name removed]


Sunday, April 11, 2010

Because I always need a new project...

The following was sent off to the Twitter folks to get their feedback:

#941064 Concerns about a new application I'm developing

I've prototyped an application which is designed to allow -- essentially -- plays acted out over Twitter. The idea is to essentially have a set of characters twittering from some altered reality. The idea is that I could put on a "War of the Worlds"-type drama (or perhaps a zombie invasion) using a small handful of Twitter accounts.

The application essentially runs a script, in a manner you would expect given the desire to put on "twitter dramas":

userid TIME-SPEC message

The definition of TIME-SPEC is sufficient to allow both exact times, as well as offsets from the previous message, so it should be both accurate enough and not clunky.

What I have now works -- I've done just enough testing to know that -- but I want to make sure that I neither violate any Twitter rules, nor make it easy for spammers to abuse my application.

1. Is the very concept of this something expressly not allowed?

2. On "serial accounts": To perform a twitter drama, multiple accounts are required. One account for each character -- otherwise the effect just doesn't work. However, to follow the drama either each post needs #marked, or the "viewing public" needs to follow every account. I think a larger cast with #ImATwiterDrama breaks the feel when compared to a smaller set of actors that the viewers need to individually follow. I think the strength here lies in limiting the number of characters. Allowing that writers can work within reasonable limits, what would be a reasonable limit to keep the spammers at bay?

3. Since these tweets would be a work of fiction, limiting their ability to post to trending topics makes a lot of sense. I can see the possible need for #ShowName, but other than that they shouldn't be allowed to #mark posts to influence trending topics.

4. The Twitter platform provides a unique method of integrating "viewer feedback" in to the show. While most of the replies will be between characters, real people will be @replied to -- but this is only allowed when the @human is currently following the character. This puts the human in charge, and should prevent reply-spam.

5. Regulating the number of tweets a day: This application makes tweets, but isn't designed to read tweets. (Reading tweets would be done by the author using their normal application.) The number of tweets normally allowed is pretty large. Should I add an application-side limit on the tweet frequency, or is this not needed? If a story has too many tweets it can start becoming clutter, but a slow build-up may lead to a couple days of frenzied activity. I just don't want to be too attractive to the spammers.

6. Absolutely no support for following people. If the character's accounts are to follow anyone it needs to be done by the author using their normal software. The goal is to get people to follow these accounts, not for these accounts to follow people. Also note, since the software should only allow @replies when the targeted human is following the character, allowing the character to follow a human does nothing as far as the software is concerned.

Since this program is essentially an automation tool, things need to be thought-out well before it is released so that it doesn't become attractive to the spammers. I know that. Once I had the proof-of-concept done I became upset as I realized how it could be abused. I still think it is an interesting idea, though, and provided it doesn't implicitly violate the terms of service, I would like any feedback you may have which would allow me to do this while still evading the spammers.

Thank you.

Saturday, September 5, 2009

STEW update

I was preparing a check-in to my private STEW Bazaar repo, and I thought I'd post an update.

Localization work continues. I'm working on a zipgettext to allow me to pull message catalogs out of zipped files. At this point, though, I want to support full localization for individual games, but the requirement really is just that the core library is fully localized. A zipgettext is required to support drop-and-go functionality for games using the library. They'd be self-contained and not installed via a system installer. They could be localized, and shouldn't need to rely upon the user extracting the message catalogs and putting them in some obscure path.

The initial languages supported will be US English and Pig-Latin. All languages should support variants -- including unofficial "silly" variants. Pig-latin is a good test of internationalization, as you can programatically turn English in to Pig-Latin, so it is fast to roll out a pig-latin version of the native development language. Ideally, these "silly" localizations should actually work when specified via an environment variable, this has not been verified, though.

Keymap progress has been started. The idea is to support nearly official keymaps for various roguelikes, in addition to having our own keymap or two. The draft "native" keymap supports a concurrent ROGUE and NUMBER_PAD layout, while containing all the functionality required to allow it to be used as a replacement for any of the other keymaps. (Through the use of more general "use " functions, as well as menus for the less-used commands.) My play-a-like games will also have this flexability.

I've developed an initial concept of keyboard layouts, with the aim to allow game keys to remain in the same key positions, when the physical keys are in different places. This is particularly important in TTY mode when using a keymap with roguelike keybindings.

While introducing a roguelike to a friend, I came upon a realization of a particular need. Now, early on in development there will be a "keytrainer" game designed to assist new players in learning the keys.

We have a concept of stand-alone interactive tools that exist parallel to the game tree. The base logic there is essentially the same as for the game tree. This is in addition to the capacity to have command-line tools specific to a particular game. The idea is that some tools -- such as a map/room/vault editor may exist independant of any particular game.

We're starting to build data models for the various rulesets. The two core rulesets are currently Fudge and D20 (3.5). It appears that all of the table-top RPGs have some implicit terrain knowledge that needs spelled out in something like a rogue-like game. We're setting aside all thought about rulesets to do some exploration in to practical roguelike terrain. For terrain basics, this means terrain that would work for a narrative-based roguelike.

The exploration of practical roguelike terrain should help clear up some of my current questions and concerns. It will also get me thinking about narrative roguelike games, and the narrative roguelike game includes features that broadly span any of the underlying rulesets. At this point, it really seems like the best angle of approach.

Tuesday, June 30, 2009

Ripping audio tracks from a DVD

My brother-in-law wound up with a bunch of his songs on DVD. (They're his songs, as in he wrote them.) He asked for help getting the songs off the DVD on on to a CD.

The research phase is done. Two tools will both do the job.

From http://www.ubuntugeek.com/how-to-rip-dvd-audio-to-mp3-or-ogg.html :

transcode -i /dev/dvd -x dvd -T 1,20 -a 0 -y wav -m track20.wav
or from http://www.linuxquestions.org/questions/linux-software-2/rip-the-audio-from-a-dvd-349796/ :
mplayer -vo null -ao pcm -aofile audio.wav dvd://01
Now, it certainly seems easy enough... We'll see how it plays out in practice.

Sunday, September 14, 2008

Roguelikes for the blind?

I'm the sort of guy that likes to plan ahead.

Part of planning ahead is foreseeing potential problems and preparing for them beforehand. This means, I think about things like special needs. Because I may well have a need of it myself some day.

This is why I want a single-story house. If I wind up in a wheelchair some day, I don't want to deal with stairs. Plus, if I'm just old and enfeebled, I could fall down the stairs and break my back. Stairs are dangerous. Stairs kill.

Anyway, I was working on PyGame support in STEW, and looking at how PyGame handles keycode input. It occurred to me that it only has the capacity to tell me that keys have changed state, and it certainly doesn't appear to have any built-in accessibility features. Things like sticky-shift states would need to be accomidated at the application-layer. (Why sticky shift states? Well, a number of neurological disabilities could cause me to be unable to simultainously press the correct modifier keys with the correct target key.)

While I was thinking about this, it occurred to me that it would be nice to play a roguelike if I was blind. Of course, that would cause things to get much weirder, though. Ideally, I'd want to present an interface that could not only be read by screen readers, but could actually interface directly with a screen reader. This makes the whole visual representation of the map/rooms hard to present.

It also starts turning the result in to something more resembling a single-user MUD. I was actually thinking of keeping the internal representation of the map, but each room also needs an identifier -- a number will probably do, though we could just as easily do named rooms when something special comes along.

Then, there's the contents of the room. In general, I think I favor a bucket approach. A room has a certain size, and that size is filled by things in the room, with no relationship to the real-world shape of those things.

Melee combat is one thing that doesn't take in to account, though. If we're dealing with two creatures, we can easily take the empty space in the room and pick a random amount of space between the two opponents. However, some rooms are literally packed with creatures. While we can easily state that at most 6 or 9 creatures can attack you at once (depending on whether we want an implied hex map or a standard roguelike grid) you still have things like wands and breath weapons that can strike a large number, bounce off walls, and hit even more.

We could go with a literal roguelike grid, with the ability to look various attackable directions. We'd need short-cuts so that you could also just look at and attack a particular monster type. Sometimes attacking a monster would have implied movement to reach it.

It does seem to me that after thinking about it a little, we need to retain the roguelike map. We'll just need to have sufficient short-cuts to make visual representations of the map unneeded.

Here's a potential example of what it could look like:
You travel 10 feet. You turn east to follow the corridor. You travel 60 feet. You stop 10 feet from the doorway to room 1 on floor 7.

To the easy, you see:
  • a broken door
  • an orc chieftain
  • 3 orc soldiers
To the west, you see:
  • an acid blob
This would break down the line-of-sight by cardinal direction. There could then be eleven direction labels, one for the eight cardinal directions, above, below, and around (for when you get swallowed by something).

Above isn't normally used on roguelikes. Below has common meaning when you're levitating over hazardous ground. Each of those should describe your cell only. The cardinal directions, however, cover more than just the usual lines. Each cardinal direction covers a 45 degree arc in that general direction.

The order is sorted first by monster type, and then by proximity to player. Once the list is sorted, it is compressed so that adjacent monsters in the list form a single line. This means that if 4 orcs are all 100 feet from you in the same general direction, they would show as "4 orcs", and if there is a line of 4 orcs coming toward you at 70, 80, 90, and 100 feet from you they would also show as "4 orcs". If there was a bat amist the orcs, though, in the earlier cast it would always continue to bundle the orcs, but in the later case it would likely wind up splitting the orcs in to two groups with a bat in the middle.

You would need to be able to query how close a given monster type is, what monsters are at a given distance, as well as what monsters are in a given attackable direction.

Doors will also need identifiers. I think we can go with letters, so that a room number + door letter unique identifies a door. This would allow us to say:

You enter room 6. It is 30x60. There are four doors here (A, B, C, D).

There appear to be no monsters in the room. The room contains:
  • ...amulets...
  • ...gems...
  • ...wands...
That is, we identify doors solely by the letter. While we could state, "Door A is on the north wall, and 20 feet from the north-east corner." It just starts getting harder to remember, and having less value. Likewise, we can drop the number of steps taken when walking the corridors. When intersections are presented we should state the direction we came from, and the directions now available. When monsters are nearby the behavior should be as earlier described whether in a room or not.

When monsters are not visible in a room, we can do as described in the most recent example, and bundle all objects together. While this doesn't make as much sense on an open-plain map, rooms are small enough that it makes little difference where an object is within the room. They should still be sorted by proximity, so after you take the first object you can always modify your path. (Assuming we don't short-cut that behavior when in a room and monsters aren't around. I wouldn't be against picking up objects as being 1 turn activities -- particularly if we make entering a room a multi-turn activity.)

Yeah, we can see where I suffer from a case of feature-bloat. Particularly for this project.

Saturday, September 13, 2008

Things that slow STEW down...

So, STEW was reasonably documented... in SDF, which I'm no longer using. I'm now favoring RST all-around.

I had ncurses working reasonably well, but... the goal is full Unicode support, and it certainly appears ncurses wasn't the best choice there. Ncurses itself isn't available everywhere. I needed a GUI version to work everywhere.

My first thought was Tkinter. I even started working towards that end. But, of course, Tkinter doesn't reliably ship with Unicode support.

The goal is always rich colors, rich fonts, while still holding onto the heart of the roguelike genre. No graphics, except to enhance the text. I do want to have some things now normally allowed in TTY mode.

Things like, on old-school terminals:
  • 88/256 color mode on an xterm
  • unicode support (widechar in ncurses)
  • separate background/foreground color

Of course, with a GUI-based setup we can make things much better:
  • full true-color support (better than normal, as we can have fore/back colors different than each other, everything becomes more legible)
  • font characteristics (nornal, italic, bold, strike-through, etc.)
  • atypical diacritic marks (etc) (d with a cedilla.)
  • background/foreground color
  • cell boxing lines which do not interfere with primary glyph
  • cell "glow" color -- blob of color smaller than background color in the middle of the cell
  • underline/strikethrough/shadow a different color than foreground
It is possible to take it a little further, and provide the map-grid with a large primary glyph, plus a small subscript/superscript glyph.

But, of course, first I need to get something working in a GUI with some chance of success. I'm currently thinking PyGame. Yeah, I know it seems quite unlike something used by a true Rogue-like. Still, it should provide what I need, and it is portable. The native full-screen support makes it present itself more like a true rogue-like than something designed first for a GUI.