Best way to implement Heads-Up Display?

Software: Away3D 4.x

cyrix, Newbie
Posted: 08 May 2014 12:41 AM   Total Posts: 9

I am working on a game and ready to start adding the HUD (player health, score, etc). What’s the best way to implement this in A3D? I know one method would be to use Sprite3D, but since the camera moves we’d have to move the HUD with it. You can place standard Flash display classes (e.g. flash.display.Sprite) over the A3D container, correct? Would making the HUD with standard Flash display classes work or would this degrade performance? Any other suggestions?

Thanks!

   

Mr Margaret Scratcher, Sr. Member
Posted: 08 May 2014 11:39 AM   Total Posts: 344   [ # 1 ]

I’ve not done any tests to see how it affects performance, but I can confirm that just using usual 2d Flash elements will see them drawn on top of the 3d, so doing it this way is fine.

   

dlx, Newbie
Posted: 08 May 2014 01:40 PM   Total Posts: 12   [ # 2 ]

Depending on your target platform (mobile, web, etc) and how complex your HUD is (alpha, filters, etc), you will see some perform drop if you use the classic displayList.
To make sure that everything is rendered through the GPU, I highly recommend that you use a 2D stage3D lib (Starling is really easy to use + Feathers components for skinnable UI components )
You can share the same Context3D from Away3D to Starling (everything is explained here : http://away3d.com/tutorials/Away3D_and_Starling_Interoperation), and it`s much more flexible than the displayList (you can have several layers for 2D, and render them in the order you want)
This way, you will have some great performances, even on mobile!

   

cyrix, Newbie
Posted: 12 May 2014 11:44 PM   Total Posts: 9   [ # 3 ]

Ok, thank you. It’s a school project and we are running low on time; I don’t know if we’ll have time to stick Starling in on top of everything else; we’ll have to see how performance is with the built in displaylist and then decide.

Thanks for the feedback.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X