码迷,mamicode.com
首页 > 其他好文 > 详细

2D game engine essentials

时间:2015-01-08 07:03:50      阅读:171      评论:0      收藏:0      [点我收藏+]

标签:

All 2D Game Engines/Frameworks are trying to solve the same problems. Thus, the languages don‘t matter; they are simply the technologies, the bricks that make things happen. (Flash/AS, HTML5/JS, Cocos/ObjectiveC, MFC, Swift, etc.)

 

Display:

Stage, Canvas, RootViewController, they are essentially the same thing- the display entry point of an App.

DisplayContainer, Sprite, AnimatedSprite, MovieClip, they are just a family of displaying elements with deriviation hierarchy

DisplayContainer has child nodes, which could have children too

Animation, animations are basically a sequence of images being played at a certain speed/frame rate

 

Update/ticker funciton

Like in real world, things happen/progress as time elapses. In each timestep, coordinates being updated, images getting redrawed, calculation are performed, etc, etc. 

 

Observer / Eventlisteners

They are basically function pointers, upon events being fired, program looks into the registered function list. This method is opposed to polling, which constantly checking certain conditions in each update cycle.

 

Physics/AI:

In this way physics is independent from the game engine it‘s self, irrelevant to 2d or 3d, only the calculation space matters.

 

Sound:

This is another dimension. 

 

2D game engine essentials

标签:

原文地址:http://www.cnblogs.com/antai/p/4209857.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!