Archive for the ‘AIR’ Category

AIR, Flex, Projects Goblin now comes with entities included

0 Comments

Here’s a quick post to show the entity panel of my game editor (click for full size version).

Editor entity panel

So on the left is the map view, where you see a really, really hiddeous jumble of a test map. The interesting thing there is the little heart with lips (a placeholder icon I borrowed from a casual game I made a couple years ago). That’s the entity icon, which in this case is a player spawner. That is where the player will start in this map. Yellow means that’s the selected entity, and the white square is where the cursor is (though the mouse pointer isn’t visible since pressing Print Screen doesn’t capture it).

On the right side, things are a little more fun. Those entity properties you see are generated dynamically. This is a really cool thing that I have wanted to try for a long time. The entity’s components define what is exposed and editable in the editor. The editor then builds the UI based on that. So I don’t have to add code to support editing new components; I just add the property definitions to the component, and the rest is magic. I’m hoping this will save me time in the long run. So far? It rocks. :)

In case it didn’t slap you in the face, the editor is an AIR application, which means I get to do all kinds of file system stuff like load and save maps and assets without security restrictions.

(Maybe in the next post I will finally show a map that isn’t just random lines.)

AIR, ActionScript, Projects Goblin game editor pre-alpha: second screenshot

2 Comments

I’m probably boring the world here, but I figured I’d follow up on the last post to show some progress on my editor. It’s still really ugly, and this isn’t anything more than a throwaway map scribble, but at least I can say that it’s running and I have conquered the Flex issues I ran into. So there. :)

(The magenta is transparent in the game engine.)

The editor also has undo. It’s hard to live without, so I implemented it now instead of later. It also saves maps as XML, which I will usually embed into the SWF, but doesn’t have to be there. The asset manager can handle either case, which makes life easier for test phases when you are changing the maps a lot.

I hope to get some “real” test maps put together and get right to testing things by this weekend. All depends on other demands on my time, of course.

AIR, ActionScript, Flex, Projects Goblin game editor pre-alpha: first screeny

0 Comments

How about a little self indulgence? :) After the amount of hair I lost wrangling with Flex, I deserve it!

I admit it: this is butt ugly. It’s just plain old Flex. I didn’t add any styling at all. Who has time for that?! And the screenshot is tiny (better ones will be bigger, promise).

Anyway, what you see is the new map dialog, where you enter some parameters for your new map. To the right you see the edit bar, a tile set, etc. This is laid out like the Lila Dreams editor, but the code is only slightly based on stuff I did previously (handling user prefs, finding asset directory, etc). It won’t actually make a new map yet, but I just need to hook that up to the UI.

Let me summarize: five hours of trying to figure out why Flex didn’t like my custom components and associated .as files. Finally I just decided to inline all the code, to hell with keeping it separate. I have always thought Flex is very tedious to use. It’s a love/hate relationship. Maybe in seventeen thousand years, after I have used it a little bit, I will feel more on the love side. Today… not so much.

On the positive side, it is coming together pretty fast despite these kinds of frustrations. There’s a chance I can achieve my goal! More updates to come.

Addendum:
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postId=7142

*Screams*

Well, at least now I know that you can’t subclass Canvas and expect it to behave like when you subclass UIComponent if you are trying to add a child Sprite to it. What I mean is, if you create a custom component that subclasses Canvas, it will throw an exception when you try to addChild() a Sprite. But if you subclass UIComponent, it will let you addChild() a Sprite.

*Slaps self silly, then gets back to work*