AtomicGameEngine / AtomicExamples

Examples for the Atomic Game Engine
https://www.AtomicGameEngine.com
96 stars 58 forks source link

Add 2d viewport hud to c# ragdoll example #91

Closed ghost closed 8 years ago

ghost commented 8 years ago

This example show the technique of using a 2D viewport as a hud, having the same real estate as the 3D viewport. The non-clearing renderpath makes it all work, and then you just operate both scenes as separate but equal entities. I had a heck of a time making the 2D scene elements, only because I haven't done that before, it could be better, but demos well. There are new features to make the HUD work. I added the rotating coin to make sure animated sprites work. Using the "U" key, you can change the mass of the ball, "I" = Speed, "O" = Size, then you can see the appropriate HUD change in response to your selection. Then fire at will, or Jack, as it were. When Jack is hit, he gets the donuts blown out of him. Once all the Jacks are down, you can press "R" to restart the "level".

ghost commented 8 years ago

And I enhanced the sample code some, to be able to write to the instruction text after it has been created, and ensured the cursor is visible after it exits an example program.

JoshEngebretson commented 8 years ago

Thanks for the PR, I plan on checking it out soon 🇺🇸

ghost commented 8 years ago

Retrofitted the cpp ragdoll example with the 2 viewport hud. I also added sparkles to the donuts, because you need that.

JoshEngebretson commented 8 years ago

Cool, I landed this in #93

The feature examples are minimal and targeted to the feature they are showcasing. The plan is also to keep the ones ported from Urho in sync. So, created a Mods folder and a README to describe the mod and how to apply it.