MHEG+ Game Development Tutorial, Part #2 — Animation - Online Free Computer Tutorials.

'Software Development, Games Development, Mobile Development, iOS Development, Android Development, Window Phone Development. Dot Net, Window Services,WCF Services, Web Services, MVC, MySQL, SQL Server and Oracle Tutorials, Articles and their Resources

Tuesday, August 7, 2018

MHEG+ Game Development Tutorial, Part #2 — Animation

In part #1 of this series we built a basic MHEG+ scene which was capable of firing timer events at a consistent rate. In this part we will look to extend the code by adding an animating graphic to the scene. A further aim of this part is to explain some more of the language features exclusive to MHEG+, including foreach loops, sequential blocks and ifs. Adding our graphics to the scene I have hand crafted the following 5 png graphics to use for this tutorial: Using an MHEG+ foreach loop, we can add all these graphics to our scene in one fell swoop: foreach num (0..4) { {:Bitmap bmpPac = [constPacObjectIdOffset + ] :OrigPosition [(720 - 32) / 2] [(576 - 32) / 2] :OrigBoxSize 32 32 :OrigContent :ContentRef ('/tut/.png') :InitiallyActive false } } endfor There a number of subtleties of this loop which are probably worth discussing:- foreach loops are preprocessor instructions, not run-time loops. Because of this we can use foreach loops around object declarations, or in fact any code section at all.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

MHEG,BBC,freeview,game development,interactive tv,MHEGPLUS

No comments:

Post a Comment