Basic game HUD

So, I’m currently trying to make a top-down action game. What I’ve got so far is a character with some basic actions (move around, attack in the direction he’s facing, block). I’m thinking of the HUD now, but I don’t know how I should make it. Some feedback here would be appreciated.
Should the game area be one movie clip, and the HUD another? Or should only the HUD be a movie clip while the game area is _root? Or something completely different?

First and foremost… I wouldn’t make the game on the _root at all… But you did get it right with them being on seperate movieClips.

As for the design… it’s up to the game as to how you want to handle the design of the HUD… Look and play some popular games with HUD’s and pick one that closely resembles your style of game… And go from here… Write down and plan out how you would set-up everything and bam… Just code from there.

Elaborating on marz’s point, all the action in your game should be in one mc, all the static stuff in another. This way you can direct the all your movement (and other related actions) scripts to the action mc, and all your static stuff (ie. HUD) stays in one place. It’s all really to help you as the coder, rather than the player, in keeping your project organized. This is all just what I would do by the way, do whatever you please.

don’t wish to hijack someone else’s thread but if I was to do the same, how would I reference the mouse x and y co-ordinates (which are properties of _root, i.e. _root._xmouse) by making all of the action in a separate movie clip but keeping the coding in that clip RELATIVE rather then absolute?

You would still want to access a mouse’s properties by using _root._xmouse or _root._ymouse no matter what movieClip you are in. Even if you were on the _root you would not want to access the moue by saying _xmouse. Always try and put a path to all of your code and movieClips… It makes for faster debugging times and seriously helps out in the long run.

:slight_smile: