Blog

  • Application Icon for Emergent Task Planner App

    August 27, 2012

    Application Icon Sketches I’m working with my friend Al Briggs on an iPad version of the Emergent Task Planner, primarily on user interface concepts and layout. Al’s doing the coding. As is the case with these kind of projects, programmer Al is excited to see graphics, as designer Dave is excited to see working code. Al suggest that I start designing an application icon, and while I’m not sure exactly what the icon should be, I started doing some sketches.

    The concepts above are the result of a quick 15-minute sketch session at Starbucks, playing with the following concepts I’d written down on a previous page:

    • Emergent
    • On-the-fly
    • Low resistance
    • Freeform
    • Nonjudgmental
    • Focus without strictness
    • Planning
    • Encouraging

    These words are some of the associations I have with the Emergent Task Planner, so I then tried to think of visual ways to portray them. On the left are the idea of something that “emerges” from a collection of parts; the metaphor is that of a puzzle or tower of pieces (sort of like Jenga). Then on the right side, there are notions of buckets that can be filled with marbles, and multiple paths leading to a structured resolution. There’s nothing really here yet, but I am thinking of jumping into a 3D program and moving some stuff around to see what can arise. So begins the design process!

    UPDATE: Hoo, here’s the Apple Icon Guidelines…I didn’t realize how high-res we could get. Exciting!

    Read more
    DSri Seah
  • Deck Tomato Update

    August 26, 2012

    I first wrote about the deck tomatoes in mid-June. It’s been 2.5 months since then, so here’s an update.

    tomatoesJuly 3rd – Two weeks of growing, the sub-irrigation tomatoes are looking good.

    tomatoesJuly 7th – First flower buds appear on the sub-irrigation planters.


    tomatoesJuly 9th – About to head to California for a week of work, deployed these capillary house plant feeders to keep the upside-down tomatoes watered.


    tomatoesJuly 29th – First sign of tomatoes growing on the sub-irrigated tomatoes.


    tomatoesAugust 8th – The upside-down tomatoes finally show flower buds, a whole month later. This is due to the reduction of sun and lack of consistent watering with the upside-down planter design.


    tomatoesAugust 8th – Here’s the state of the upside-down tomato plant. You can see how the design of the planter actually shades the plant too much until it gets to a certain size.


    tomatoesAugust 13th – The upside-down planter flower finally open.


    tomatoesAugust 16th – In the meantime, the sub-irrigated planters are doing pretty well. That first tomato from July 29th is now the size of my thumb.


    tomatoesYou can see how much taller the plants are compared to 6 weeks ago. I had to start tying the plants to the supports, and then run stay lines like the rigging of masts on a sailing ship to keep everything from falling over.


    tomatoestomatoestomatoes August 20 to 23 – More and more tomatoes appear on the sub-irrigated tomatoes. There are at least 15 or 16 of them, all growing. I now need to water the tomatoes every day…they are very thirsty.


    tomatoesThe current size of the tomatoes. I wonder when they’ll start changing color?
    Read more
    DSri Seah
  • XNABS2: Pondering the Next Stage, Loader Code

    August 25, 2012

    Yesterday I finished cobbling together the first rudimentary bits of plumbing, clarifying some architectural issues that would make this version of the codebase a little easier to work with. There are a few interesting rabbit holes to explore along the way too, because .NET is a gigantic framework that encompasses all manner of programming tomfoolery.

    Anyway, what’s in the current codebase is this:

    • A startup sequence that works within the confines of XNA’s notion of a Game Loop + Initialiation.
    • A pretty well-defined procedure for handling the creation of my own main game objects of various type and vintage within the context of the XNA Game Loop + Initialization.
    • A rudimentary Debugger and Console, though I haven’t rewritten the command stuff yet
    • An Input Manager
    • A Settings Manager
    • A package hierarchy
    • A Mercurial repository and central Bitbucket.org repository
    • A rudimentary event listener structure and inter-object communication setup for main game objects
    • Graphics Initialization and Debug messages written to the console

    What was most important to me was to get the procedures, settings, and debugger setup so I could start building the rest and have some way to debug it. There are a lot of different things I could implement next, and I’d love to just dive write in and port the graphics routines. However, this routines are already written; what I should work on first is a new object creation language.

    Currently, game engine 1.0 uses XML files to define everything that appears in the game at the Piece, Visual, and Player level. However, all this does is declare and name pieces and their associations visuals, along with players and their associated pieces. Also, the XML definition is a bit cumbersome, requiring multiple definitions to set up even a simple test. What I’d like for it to do is be a lot less redundant, and scale from very simple declarations of a handful of pieces in a space to complex hierarchies with behaviors attached to them. This GameXML language should be strive to minimally describe any game startup sequence. Each GameXML file also should serve as the defining datastructure for any level, presuming there are multiple levels in the game.

    I’m thinking of something like this:

    • [piece name="uniquePieceName" [attributes]] is the way to declare any piece. This automatically adds the piece to a global piece dictionary if the name doesn’t exist, or updates its attributes if it already does. If the name attribute doesn’t exist, the piece is created with a unique name.
    • If the piece declaration occurs inside a [player] declaration, then the piece is created as described above AND it is added to the player’s piece array.

    • A piece can appear in multiple contexts like [player] and possibly other groups that are of interest to the game.

    <

    p>Pieces have the following attributes:

    • name = unique identifier of this piece
    • template = a piece name to copy attributes from

    Initialization that may execute a script somewhere to complete the initialization as well as tagging the pieces with this role

    • type = type of piece, as defined in the game
    • visual = the type of visual to associate with this piece
    • role = logical role(s), comma separated
    • tag = logical tag(s), comma separated
    • behavior = an AI behavior
    • init = an initializing script to use to initialize any other parameters

    3D world representations

    • position = vector3 coordinate of where this piece exists in space
    • scale = the size of the piece, defaults to unit 1 meter
    • direction = vector3 pointing
    • speed, maxspeed = how fast this can go up to maximum
    • turn, maxturn = how many degrees per second this object is allowed to turn

    So, the next step would be to write the parser that reads this information and calls a myriad of functions and factories to set all this stuff up. Not the most fun, but it will make creation much easier. After that, we’ll port the visual classes to verify that it’s working correctly. Then, we can port the physics engine and AI behaviors. Then, we can write game logic for the referee classes.

    AFTER SLEEPING ON IT

    The very minimal piece would be to do the piece reading, and maybe read player and visual data structures. So let me start by porting the GameScreen.Prologue() routines XML reader, and see what I can do to encapsulate it.

    Where to put this routine? GameScreen.Prologue() is executed as soon as the screen is created and pushed on the stack, which is handled in the LoadContent() part of the call. So that’s where I’m going to put it in the new architecture, except we don’t have a GameScreen to hold this data. So where does this live now?

    For now, I think it makes sense to store this information in BaseGame somewhere. Creating a BaseGame Data.cs partial class and a Game.XML file. I also need to create a rudimentary piece class now.

    PORTING

    BaseGame Data has a new InitalizeDataStructures() and LoadDataStructures() methods that are called from the corresponding BaseGame.Initalize() and BaseGame.LoadContent() master entry points.

    The piece-building logic is built around XmlReader, and there’s the option of having a validating reader that using an XmlSchema. I’m going to disable this for now. Related to this, though, is a class called StringUtility that converts the strings in the XML file. The current implementation uses default values in case the attribute being read doesn’t exist. This makes the code not only harder to read, but it also will mask problems with the game initialization XML file. I’m going to remove this feature.

    Read more
    DSri Seah
  • IOS Session 01: Installing the environment

    August 24, 2012

    As part of the ETP on iPad initiative, Al Briggs has opened the nascent source code to me so I can see what a real app looks like in the dev environment! It’s also my hope to be able to implement some of the drawing code directly.

    First thing first…setting up!

    1. Installed Mountain Lion, Clean, on my MacBook Pro 17″ from late 2007. It’s old, but it works.
    2. Installed Xcode via the App Store.

    3. Installed GitHub for Mac.

    4. Downloaded the project from Github.

    5. Tried to open the project file and run it. BOOM. Missing header files. I wondered if I had to install the TestFlight SDK, so I emailed Al.

    6. He emailed back that he was using CocoaPods, which is a “library dependency manager” for Objective-C. You can specify the library you want to use, and CocoaPods takes care of grabbing everything that this library needs to work properly so you don’t have to do it manually. It relies on something called /ruby, which is a package manager for programs written in the ruby language, which I needed to install.

    <

    p>After some farting around, I found I had to go to XCode’s Preferences and under Components select “Install Command Line Components” so I could run the sudo gem install cocoapods command (gem was already installed as part of the dev tools, I believe), followed by pod setup. I also had to run sudo gem update --system to get the most up-to-date version of whatever gem is.

    After that, I went to the directory where I downloaded Al’s source, and typed pod install per Al’s instructions. It started doing this:

        Installing Objection (0.13.0)
        Installing TestFlightSDK (1.0
        Installing OCMock (2.0.1)
        Using Objection (0.13.0)
        Using TestFlightSDK (1.0)
        Generating support files
    

    Al then said to look at the “workspace file” that has been created, which I’m guessing is the file that ends with .xcworkspace. I double-clicked it to see what would happen. I was able to build the project and run it in a simulator. Very exciting!

    I poked around the file explorer in xcode, and was reminded of just how old-school Objective-C is compared to C#. I’ll have to read up a bit on this.

    Read more
    DSri Seah
  • Project: XNABS2 Session 02

    August 23, 2012

    SUMMARY: Last time, I got as far as creating the beginning of a Screen architecture and supporting concepts. The short-term goal is to get enough of this hooked in so I can just write debug messages to a console. That’s really all I want to shoot for tonight. (more…)

    Read more
    DSri Seah