Sign in to follow this  
  • entries
    234
  • comments
    427
  • views
    114370

Defining the Interfaces

Sign in to follow this  
Battagline

186 views

Ok, there isn't much to see yet. I want to blog often to make sure I at least make a little progress every day. Today I took a little time to define the interfaces. So far everything is done in Flash Builder 4, but when I get to it, I'm going to use the Linkages in Flash CS5 to link Movie Clips to my classes so I can use Flash as a glorified art tool.

I personally prefer Flash Builder for writing the code. Flash is a pretty terrible coding environment. I find it much easier to lay out my classes and interfaces in Flash Builder.

SideScrollerInterfaces.jpg


I'm not sure I've divided the packages up the best way I can. I may have to reorganize. I put the letter 'i' in front of the interface names to make them stand out from the classes once I have added those.

For those who aren't familiar with Interfaces or what they are good for, most object oriented languages only let you extend a single class (C++ being a notable exception). You can, however, implement as many interfaces as you like. Since on screen objects will need to either extend MovieClip, Sprite, or some other DisplayObject I'm going to use interfaces as the primary way the game engine will interact with the display objects. Functions within the game engine will take the interfaces as parameters, and deal with the objects indirectly that way. Hopefully this will make the engine more extensible so that anyone who wants to use it for their own side scrolling games will be able to do so with less difficulty.

Hopefully I'll have more to show soon.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now