Battletech Live

Online, Turn-Based Battletech – Development Logs

Cleaning up the coding process.

Over the last couple days, I’ve been working on compartmentalizing the Actionscript code, trying to shorten the body of the main application file so that I’m able to code at a decent speed instead of waiting for the interface to catch up with keystrokes.  Many of the things I’ve been working on as of late, aren’t going to be activated for the next couple weeks.  In my development version, I’ve relinked the helpdesk system and built the transitions for the forums.  I’m currently back to work on the Mech Lab, making use of the lower-right menu panel and eliminating a lot of label objects.  I can’t give a timeframe for it’s completion, but I found an invaluable method today, the ability to parse the MTF files used by MegaMek.  I will have the ability for people to import these units directly into the game, save them to the server, print record sheets or export them to PDF files.  I’ve seen record sheet generation before, but most examples are very rough text only copies.  Mine will be full graphic, looking almost exactly like the ones found in sourcebooks.  The import feature, in itself, will save hundreds of hours of labor.  I’m hoping to find ways to import files from other applications such as The Drawing Board and MechWorks, as well as performing OCR tasks from PDF documents.

December 31, 2008 Posted by | Project Development | Leave a comment

States and Transitions.

So far, the game has something like 29 individual pages, one state for each and a total of 185 transitions.  I was doing some work today, moving the logic for switching states to an external file, making things easier to work with.  In the process, I uncovered a fatal flaw, in that if anything beyond the sign-in screen is clicked after the initial load, it switches over to a blank state and can’t go anywhere else.  That should be fixed now, although I’m not posting another live update until I get a few other things cleaned up a little.

December 30, 2008 Posted by | Project Development | Leave a comment

World Builder Update

Initial settings are in place to allow for the construction of maps.  We can select the resolution and it will populate fields according to that selection but I have a bit to do before I can consider putting in play.  It currently pulls from a preconfigured array instead of building the hexes from scratch.  I need to build that back end first.

mapgenerate

December 30, 2008 Posted by | Project Development | Leave a comment

Map Editor – Tile Sets

Construction of the map editor is underway.  I have the first two steps more or less lined out.  Upon entering the world builder, the user will decide what size of map they want to create or select free form.  Next, they will select the desired tile set.  Tile sets took me a little bit of time because up to this point, I’ve only made three different hex types, grass, straw and water.  My target here, will be six different environment types, although there might be some crossover from one type to the next.  For instance, a map may include both stone and volcanic, a map might include stone and sand or a map might include volcanic, grasslands and stone.  Next steps include building the logic for the map to generate itself based on defined parameters and to calculate seams when a user changes the elevation of individual hexes.  The ultimate goal will be to provide the engine parameters for width and length, max and min elevation and terrain types and have the system generate random maps.

tilesets

December 29, 2008 Posted by | Project Development | Leave a comment

Battlefield Maps

I am fed up with building maps by hand.  I’m saying “screw it” and starting work on a map editor.  Users will select a map resolution or free-form, then use a series of toggle buttons to determine what type of hex to place.  Clicking on the map position will then place the hex appropriately.  I’m going to build logic into the system so that it sets elevation of surrounding hexes accordingly so that there aren’t any gaps.

map

December 29, 2008 Posted by | Project Development | Leave a comment

Demolition Test 1

These should partly illustrate what I mean by battle damage.  The models will be broken into several pieces, including foundations, wall sections and roof.  Larger models may be broken into more pieces.  When a building takes damage, the game engine will detect from which direction damage was inflicted and when the damage threshhold is reached, remove the appropriate section.  This will continue until the building is rubble, as shown below.  I’ll be enhancing the models by putting chunks of the structure in and around the foundations and in the case of other buildings such as barracks, hangers or garages, you may find pieces of airplane or automobiles burried in the rubble.  Days and weeks after battles, the peoples will begin repair of these structures.  Speed at which repairs take place will depend on the amount of damage to a given area and the population of that area.  More people, faster repairs.

adfull

adbroken

adground

December 29, 2008 Posted by | Model Rendering Tests | Leave a comment

Chemical Plant

The Chemical Plant model is a little different than the original.  Each model that I make will actually be built to as many as five sections so that they can be destroyed.  Each model variation will then be saved out and each will be loaded into memory for the particular map.  When damage takes place, the current model will be hidden and the next appropriate model shown.

origchemplant

chemplant

plant

December 29, 2008 Posted by | Model Rendering Tests | Leave a comment

Graphics Test – Ammo Depot

My DSL was out last night, apparently crossed with another user’s lines who was now using my connection.  Should be straightened out today.  I performed the first of several graphics tests, working with the Ammo Depot model from MechCommander 2.  I began by reskinning the original model with original textures.  I used Lightwave to convert the object to a 3ds file and found it shreaded.  Third, I rebuilt the object with Lightwave using original textures and finally, made all new textures for the model.  The results of each step are below, starting with a picture of the original object.

mc2_conversion002

ammodepot1

ammodepot2

I learned later that before exporting a 3ds file from Lightwave, press Ctrl+u to break all polygons so that vertices are not shared between them.  This helps it to preserve the UV coordinates of each triangle.  When loading the object into Alternativa3D, a weldVertices function is used to rejoin the points.

picture-11

December 29, 2008 Posted by | Model Rendering Tests | Leave a comment

The Graphics Engine

Battletech Live is built primarily through Actionscript 3 in Flex Builder.  It connects to a server so that users don’t have to store their own data and each user acts as a front-end.  Each client checks in with the server and time-specific tasks can be triggered by anyone.  The entire game and associated site is viewed through Flash with the map editor and battles rendered by the Alternativa 3D engine.  Being a server-driven Turn Based Strategy game, it is perfectly acceptable to sign in, perform your turn, then sign out and go about your day.  Members receive email notices when it’s time to perform their next turn.  Players can use the system as little or as much as they like.  Alternatively, if all participants of a game are online at the same time, games can progress more like Classic Battletech, with everyone sitting in the same room.  Email, live chat rooms and voice conferencing enables open communication between allies, individuals or teams.

The only requirements are Flash Player 10 and a monitor that supports at least 1280 x 1024 resolution, although it’s designed to be adaptive up to 1920 x 1200.

battlefield

December 29, 2008 Posted by | Project Development | Leave a comment

Interface Development

Battletech Live is a long-lived project in development for creating an online turn-based version of Classic Battletech.  The project has existed in various forms since 2006 and includes a 1-year break from December 2006 to December 2007.

Battletech Live has a development staff of one so progress is sometimes slow.  The working interface can be seen at http://www.battletech-live.net and examples of gameplay maps can be found at http://www.battletech-live.net/battlefield

December 29, 2008 Posted by | Project Development | Leave a comment