52ky 发表于 2022-11-9 14:26:37

Android研究院之游戏开发飞行射击游戏(十)源码

举个简单的比如吧,同学们都坐过火车吧,坐火车的时候都遇到过自己的火车明明是中止的可是周围铁轨的火车在向后行驶,会有一种幻觉感觉自己的火车是在向前行驶吧,呵呵。飞翔射击类游戏的地图原理和这个完全一样。玩家在控制飞机在屏幕中飞翔的方位,背景图片一向向后翻滚从而给玩家一种幻觉自己控制的飞机在向前飞翔,如下图所示两张地图图片在屏幕背面替换翻滚,这样就会给玩家生成向前移动的幻觉。

(For example, all students have taken the train. When taking the train, they have encountered their own train that was apparently stopped, but the trains on the surrounding tracks are moving backward. They will have an illusion that their train is moving forward. The map principle of flying shooting games is exactly the same as this one. The player is controlling the position of the plane flying on the screen, and the background image always rolls back, giving the player the illusion that the plane under his control is flying forward. As shown in the figure below, two map images replace the roll on the back of the screen, which will give the player the illusion of moving forward.)




页: [1]
查看完整版本: Android研究院之游戏开发飞行射击游戏(十)源码