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

Picking up a new puppy in a few weeks.

I’ve gotten a dog.  I just need to figure out how to pick her up, whether I’ll drive down 700 miles to get her or if she’ll be delivered.  She’s an 8-week-old black lab, quarter Collie named Kaylee.  I will be working with her each day to train her as a retriever and eventually get her certified as a service dog, not for any particular need, but for the discipline.  Getting her out for a walk every day might also help to get me back in shape.

lab2

March 22, 2009 Posted by | Off Topic | Leave a comment

BTL Progress, March 22

Progress on the site has been slow over the last couple of days.  It’s been very nice outside so I’ve been spending time outdoors, cleaning the Jeep and doing yard work, ripping out saplings, raking up pine needles and getting rid of creeping vines.  My roommate also got a dog, so pulling out the notebook to do any sort of work has gotten a little interesting.  The work I have gotten in has been to work on three administrative panels in the email system.  The first one is a preferences panel which will include a list for setting up mail forwarding, a blocked users list and a time selection for purging deleted mail.  The second panel is a help panel, in which I’ll have questions and answers listed and a feature which allows users to post their own questions.  The third panel is the search panel which will be very simple.  Performing a search will search through all boxes, including public folders, and will return results which indicate whether the message was inbound or outbound.

Part of the process that makes it take so long to get a smoothly working system is the contstruction of “Transitions”.  Each view within the site is considered it’s own state.  Going from the email panel to the calendar has a from state and a to state.  With all of the possible views on the site, I’m currently up to 273.  That’s 273 lines where you tell it to perform one action of sliding these two panels out of the way.  When that action is done, perform a sequence of sliding this panel down, slide this panel over then fade the contents into view.  The benefit is that if a few dozen objects have to change from one state to the next, you just have to specify what the layout should look like in the individual states and call one action, saying currentState = “whatever” and the system takes care of the rest.  It just takes time to account for it all.

One other minor thing was changed.  When a user registers, they don’t automatically show up in the users list.  The user must first go to their email and confirm their account.  Makes more sense that way.  Another thing that I have to fix is that when you change your gamer picture, it doesn’t seem to actually take effect until you sign out and back in, so I’ve got to figure it out.  Second thing I want to figure out soon is login notifications.  For example, if you sign into the site on a desktop and walk away, but later log in on a notebook, the desktop should be notified that it has been logged out.

March 22, 2009 Posted by | Project Development | Leave a comment

Are you a Mac or a PC or a …

Most of us have seen them, commercials that promote Apple Macintosh PCs or promote Windows-based PCs.  It started off with Mac ads, campaigning against Windows Vista, describing how certain aspects work on the two and making the point that things work more smoothly on the Mac than they do on Windows.  Microsoft later tried to fire back with their own set of ads, from Seinfeld, to Mojave, to “I’m a PC”. Each ad is biased on the side of the company that produced it.  Myself, I use Macs, Windows XP and Ubuntu but won’t touch Vista.  Each operating systems has it’s uses and it’s necessity and should be used accordingly.

However, the commercial that really annoys me is “I’m a PC and I’m seven.”  It should read: “I’m a PC because I’m too young to know any better.”

It’s also interesting that Microsoft supports the “I’m a PC” ads when they don’t make computers.

March 18, 2009 Posted by | Off Topic | Leave a comment

Continuing work on the email system.

I’m back to work today after my family visit and subsequent unexpected flu bug.  I fixed a problem with the registration script yesterday and got the changes posted.  When I get off work this evening, I’ll resume work on the email system.  Right now, it does check for new mail, although no mail exists on the server, so nothing is ever retrieved.  I simply need to get the composition portion in place, along with address book, rules and permissions.  Composition is fairly simple and will take more time to think about how to execute than to actually write it.  What makes it complicated and hard to think about are the other extra items.  In any case, I’ll be working on that every day for the next week, or however long it takes to finish it.

In looking at the registration script, I realize that I need to build a better error-reporting system.  It turns out that when the submit button was clicked, the script that completes registration was never being triggered.  I got an email from an individual who was trying to register.  If that person had never contacted me about the problem, I wouldn’t have known that the problem existed because no error messages were ever being generated.  After I finish the email submission portion, I’ll be going back through each server script and building in a responder before, during and after each contact so that it returns a “1” for an expected result and returns other elements depending on what went wrong.  For security reasons, users will not receive detailed error results. Results with too much detail, can benefit those with malicious intent.  It’s better to simply say an error occurred and send detailed reports to admin with the who / what / where / when / why.

March 18, 2009 Posted by | Project Development | Leave a comment