Battletech Live

Online, Turn-Based Battletech – Development Logs

Battletech Live email closer to completion

The email system is getting close to being done.  So far, when a user is logged in, the system is actively checking for new mail and configuring a notification icon in the event that new mail is received.  Additionally, when the email panel is open, clicking between email folders is a live action.  If mail is present within a folder, the system will display those messages in the form of date and time received, subject and sender.  The address book works, sort of.  Mail composition needs to be cleaned up a little.  I’m currently working on mail folders and the ability to move messages between them.  I figure that a move button isn’t really necessary as long as it’s set up for drag-and-drop.

Several days ago, a comment came in about my attempts to speed up coding.  The author was absolutely correct, in that Modulizing the process is a much better way of doing things.  Originally, I began working on the project with Flex Builder 3, as a single mxml file.  This worked for a while but after a few thousand lines of code, it got to be a very slow process just to type a line of text or assign a variable and the longer the code got, the slower the actual website.  At that time, I began learning to write code in pure AS3, instanciating components at runtime.  This helped to speed up the coding process, but removed some of the ability of previewing the layout of a component and it still did nothing for the response time of the website.  Where I could, I began moving as much calculation as possible to php scripts and out of the mxml and as files but it still didn’t do much.  I had a few dozen files up to this point, separating pieces of code by component, functions for the calendar in their own file, registration functions in another and email in another.  Although I had read a bit about it, it didn’t really register how I could create multiple swf files and have them talk to eachother.  When I got the comment last week that talked about it, I went back to searching and reading about how it works and began putting it into practice.  So far, email, avatars and the development log panel are their own Modules, generated as separate swf files from the main project.  They load and unload as needed, which means that loading of the specific component can sometimes take a bit of time, but it makes everything else work more smoothly.

Modules force the code to be more organized.  Instead of having one large file to keep track of all variables and huge lists of states and transitions, the items relevant to a specific module are built into that module.  Modules get loaded into the main project with relatively few lines of code and where one module needs to communicate with another, variables are stored as part of the main project, which the necessary modules can then access.  One of my goals has always been to convert some of my components into Widgets and desktop applets that can be used by Google, Mac OS X or Ubuntu and sometimes placed in the taskbar of XP or Ubuntu.  These things would be items like mail notification, status updates for ongoing battles, helpdesk tickets, etc.  Modules can be very easily adapted for this purpose as the organization is there from the start.

I hope to have email wrapped up sometime this week, then finishing off the Instant Messenger system before moving on to the community forums.

Advertisements

March 30, 2009 - Posted by | Project Development

1 Comment »

  1. “One of my goals has always been to convert some of my components into Widgets and desktop applets that can be used by Google, Mac OS X or Ubuntu and sometimes placed in the taskbar of XP or Ubuntu.”

    I don’t have hands on experience with this, but you may be able to utilize Adobe’s AIR runtime/setup/system/? to export some of your modules straight for desktop use with minimal overhead.

    Comment by Ian Bellomy | April 3, 2009


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: