Defining the Interfaces

Published May 09, 2011
Advertisement
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.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement