Project #3: IntelliWriter Update

A dictionary and 79 epubs walk into a bar…

IntelliWriter Logo

Word Suggestion Engine

This was the major theme of the first half of the work so far. After spending a few hours crawling the interwebs for someone who has done this in an open-source, information should be free, hack-the-planet kind of way, I gave up a decided I needed to do it myself. I took a hint from an old friend, Markov chains.  I needed an engine that when given a word, it would spit out a list of words that would most-likely come next. In this scenario, Markov chains basically say ignore everything but the word that comes before it and that works pretty well.

So! I grabbed a pile of almost 80 fiction books in epub format and wrote an analysis tool that calculates for any given word, what are the most likely words to come after it. Filter all those words with actual words from a fully resolved Open Office dictionary (which was a bit of a project on its own)…and done!

Here’s how we are looking so far:

IntelliWriter_update

Look good? I think it looks pretty good. The word recommendations are normally pretty close if not spot-on for this passage. There’s no tab-completion yet, which is really the linchpin to see if this little experiment is actually useful. Better get back to work!

The task list as it stands today, for posterity:

intelliwriter_taskudpate

 

Project #3: IntelliWriter

A typewriter and tab-completion walk into a bar…

IntelliWriter Logo

 

Definition

IntelliWriter is a distraction-free(ish) writer’s tool with a few twists. The first is that, like a typewriter, where you are typing stays in the same place while the document moves as you type. This keeps your eyes from having to travel around as you type. I’m not sure if this is actually a problem, but let’s try it out anyway.

Secondly, IntelliWriter will attempt to dynamically bring up suggestions on the word it thinks you are typing. If you see that the current suggestion is the word you are typing, you can simply press tab and the word will complete automagically. This is similar to word suggestions when typing on a smart phone but with a keyboard shortcut for completion.

Lastly, and this might be a stretch goal for the 24 hour timeline, the document will be continuously saving as well as keeping a history of past saves available. The writer will be able to see the draft from 30 minutes ago as easily as seeing the draft from yesterday without having to manually save off new copies. Again, I’m not sure this is actually a problem but it sounds like it might be cool. Engage!

Previous Work

HanxWriter – Tom Hanks’s typewriter simulator is the original inspiration for the centered-cursor feature.

DarkRoom – A Windows clone of OSX’s WriteRoom, is more-or-less the standard for distraction free text-editing.

Write! – A really pretty tool and the only one I’ve found with a solid auto-complete. It builds the auto-complete options from words you’ve already typed.

iaWriter – Another nice tool with a well thought out flow. Also has a great syntactic highlighting feature (adjectives, nouns, conjunctions, et cetera).

WriteMonkey – Slim, light, portable, auto-save with history, and extensible.

Design and Mock-ups

I’ll start with a white-on-black color scheme with a yellow highlight. There is a grand opportunity to support themes, but that can be a nice-to-have after the big features are up and running. Notice in the mockups that the cursor where you are typing never leaves the center of the screen…

A new document
A new document

 

Typing the first sentence
Typing the first sentence with suggestions

 

A tab-completed word!
A tab-completed word!
Editing mid-passage
Editing mid-passage

 

Work Items

I feel a little better about this list for the 24-hour deadline than I did in the last one. There are a few risky areas but I think I’ll be able to leverage previous work for things like the suggestions dictionary and possibly a historical save engine. …we’ll see!

  1. Feature: Typewriter
    1. Text surface
    2. Text surface configuration (e.g. width, font)
    3. Keyboard event handling
    4. Centered text surface
  2. Feature: Suggestions
    1. Engine
    2. Rendering
    3. Tab-selection and completion
  3. Feature: Auto-save w/ history
    1. Simple auto-save
    2. Version tagging
    3. History engine
    4. History browser
  4. Export to text file

Future Work

  1. Spell-checking
  2. Color themes
  3. Responsive to resolution changes (e.g. on-screen keyboard)
  4. Export to Word and PDF
  5. Document statistics (words, characters, read time, etc…)
  6. Focus mode (dim all but current paragraph)
  7. Cloud storage integration
  8. Markdown support
  9. Xamarin port

 

Project #2: Mars Commander 32 (ahem) hour update

Mars Commander Bettererer

It’s fun!

Today on Project Update: a demo video! I have most of the Hub unit’s functionality completed as well as basic unit-to-unit connections. I use a mouse for the video below so you can see where I’m clicking, but the multi-touch testing seems to work just as well. I waited until I had just enough stuff implemented to see if it was fun (read: throwing new units and blowing them up) before doing an update. It’s fun! Well, I think it’s fun, but I am…biased.

Gameplay

To review, the screen is split in half with a player on the left (green) and a player on the right (blue). Ideally, this would be played on a tablet flat on a table with players facing each other. When first touching a Hub you’ll see an interface come up to select which unit to throw. The only units implemented right now are the Hub (top left) and the Bomb(bottom left). There’s also the Eye (top, second from the left) which is meant to expose areas of the field, but since there isn’t a fog-of-war yet, it doesn’t do much. After selecting a unit you’ll get to aim the throw and then launch the unit using a press-and-hold style. Each unit is connected to the unit that threw it with a string of little connectors.

In the interest of time, I disabled the cool-down after launching a Hub. Normally a Hub would not be able to launch another unit immediately after a launch and would have to wait about 30 seconds (you’ll see a short cool-down when you see the Hubs throw an Eye in the video).

Here’s how the task list is shaping up

Project2 Task List Update 2

Project #2: Mars Commander 12…err…17 Hour Update.

Mars Commander Betterer

A little over halfway into Project #2 and I have discovered two mistakes that will certainly blow my schedule.

Mistake #1: Framework, Engine, Game

Near the bottom of the technology stack is a game framework. This provides entities like textures, vectors, something that draws stuff, and the like. The engine stacks on top of that entities like sprites, physics, models, and other delicious goodies that hold up the eventual top layer that is game. Developers and designers can spend whole careers sitting comfortably in any one of those layers and a few (well, more these days with all the indies) live throughout.

MonoGame, the technology of choice for Mars Commander thus far, is a framework. I planned the work similar to Project #1 in that I would be building the game layer while naively ignoring the relatively minor but not insignificant engine I would need to build first.

Woops! My time log shows me about 16 hours in before realizing that putting the engine together sure is taking a significant chunk of my precious 24 hours. There’s not much I can do about this except to paddle out of the middle layer as fast as sanity will allow.

Mistake #2: Developing Touch with a Mouse

My initial interface design not only looked like a four year old drew it, but in current hindsight it made just about as much sense. As a painful reminder:

Commander Mockup

It is probably hard to tell…well, anything from the picture, but the intent was to have a control bar at the bottom of the screen that lights up with whatever controls are available for a selected unit in the playfield. I’ve essentially neutered and spat that magic that is a touchscreen and tried to turn it into a keyboard. A mortal sin if there ever was one. I need to apologize to all the super smart folks that gave us touch screens: SORRY, GUYS.

The NEW interface drops that stupid bar at the bottom of each player’s screen and puts all of the controls in the world on or near the unit selected. This will even allow for (gasp) multiple touches into the play area. Maybe even throwing from multiple units at the same time! Neat!

Regroup!

I feel I have about 80% of the engine components completed (sprites, touch handling, draw layers) which is enough to support a completed prototype so I’ll call those bits good for now. I’ve started implementing the interface for the HUD which should serve as a template for the rest of the units. I will definitely not make 24 hours on this kid, but it is more important to finish the thing at all then to throw it away just because the schedule slips.

She ain’t much to look at, but there’s a lot of good stuff behind all that orange:

Checkpoint screenshot

 

Aaaand in the interest of posterity, the task list as it stands today:

Checkpoint task list

Aaaaaaaaaaaand back to it…

Project #2: Mars Commander

The game mechanic in Humongous Entertainment’s Moonbase Commander is great. It is a fantastic hybrid of strategy and timing-based skill that has sadly not been explored further. Let’s fix that.

Mars Commander

Definition

Each player controls a hub that can launch out new hubs or any number of other units and projectiles. When launching a new unit from a hub the player is given a rising power meter and needs to press “Launch” when they think the power meter is at a good spot. Moonbase Commander was a relatively long turn-based game for 1-8 players on a local network. This project is a fast-paced real-time head-to-head implementation of a the unit throwing mechanic.

To throttle each player’s abilities, each action will take a certain amount of energy with energy recharging at a standard rate. Players can speed up the recharge rate by deploying certain types of units.

Previous Work

I did some searching around to anything else (besides Moonbase Commander) that had this kind of mechanic in an strategy context with no avail. That’s either good news or something like passing a shrunken head on a stake as I walk onto ancient tribal lands.

Designs and Mockups

I went through the major design themes (Moon, Earth, Water, Space, Living Room) and, quite obviously at this point, landed on Mars. Though, should this go beyond the project, I should reconsider “Living Room Commander”. I’ll be trying out the cross-platform MonoGame  which is an implementation of the Microsoft XNA 4 API. A couple friends and I used XNA 4 to implement Pendulous and I thought it would be good to have some experience in the toolset for this one.

I really like the idea of a head-to-head real-time, so I’m going to set this up sit-down arcade style.

Commander Mockup

Each players sits at opposite ends of the tablet. At the bottom of the screen is their controls with their view of the world in the rest of their half of the screen. To the bottom right the launch button and power meter with the rest of the bottom of the screen showing the selected unit’s status and controls.

Tasks

This list, now that I look at it, is a little intimidating for the 24-hour limit. Bah, games are fun to write anyway.

  1. Render simple ground tiles
  2. 2-player camera with split
  3. Touch-based camera movement
  4. Rendering layers (ground, units, projectiles, overlay)
  5. HUD overlay
    1. Launch button
    2. Aim rotation
    3. Unit status and actions
  6. Units
    1. HUB
    2. Solar array (energy collection)
    3. Anti-air
    4. Shield
  7. Projectiles
    1. Bomb
    2. Missile
    3. EMP/Jolt (EMP off cord, Jolt on cord)
    4. Crawler
  8. Unified command queue (prep for network play)
  9. Fog-of-war
  10. Sounds
  11. Music (optional)
  12. Welcome screen

Future Work

Again, the “future work” category is more to remind myself what I should not be doing with my time even though it would super cool and super fun.

  1. More unit types and projectile types
  2. Multiple elevations
  3. Network play with more players (3+)
  4. AI opponents