<small id='7K0v4'></small><noframes id='7K0v4'>

    • <bdo id='7K0v4'></bdo><ul id='7K0v4'></ul>

    1. <legend id='7K0v4'><style id='7K0v4'><dir id='7K0v4'><q id='7K0v4'></q></dir></style></legend>

    2. <tfoot id='7K0v4'></tfoot>
      <i id='7K0v4'><tr id='7K0v4'><dt id='7K0v4'><q id='7K0v4'><span id='7K0v4'><b id='7K0v4'><form id='7K0v4'><ins id='7K0v4'></ins><ul id='7K0v4'></ul><sub id='7K0v4'></sub></form><legend id='7K0v4'></legend><bdo id='7K0v4'><pre id='7K0v4'><center id='7K0v4'></center></pre></bdo></b><th id='7K0v4'></th></span></q></dt></tr></i><div id='7K0v4'><tfoot id='7K0v4'></tfoot><dl id='7K0v4'><fieldset id='7K0v4'></fieldset></dl></div>
      1. 无尽奔跑游戏的一般架构是什么?

        时间:2024-08-11
        <i id='B2VEZ'><tr id='B2VEZ'><dt id='B2VEZ'><q id='B2VEZ'><span id='B2VEZ'><b id='B2VEZ'><form id='B2VEZ'><ins id='B2VEZ'></ins><ul id='B2VEZ'></ul><sub id='B2VEZ'></sub></form><legend id='B2VEZ'></legend><bdo id='B2VEZ'><pre id='B2VEZ'><center id='B2VEZ'></center></pre></bdo></b><th id='B2VEZ'></th></span></q></dt></tr></i><div id='B2VEZ'><tfoot id='B2VEZ'></tfoot><dl id='B2VEZ'><fieldset id='B2VEZ'></fieldset></dl></div>

          1. <tfoot id='B2VEZ'></tfoot>

                <bdo id='B2VEZ'></bdo><ul id='B2VEZ'></ul>

                  <small id='B2VEZ'></small><noframes id='B2VEZ'>

                    <tbody id='B2VEZ'></tbody>
                  <legend id='B2VEZ'><style id='B2VEZ'><dir id='B2VEZ'><q id='B2VEZ'></q></dir></style></legend>
                  本文介绍了无尽奔跑游戏的一般架构是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我对无尽的跑步游戏实际上如何运作感到困惑,从概念上讲,就拥有一个永无止境的画布而言.Sprite Kit 在 NDA 下,所以我打算使用 Cocos2D 作为我的框架.

                  I am confused as to how endless runner games actually work, conceptually, as far as having a never-ending canvas. Sprite Kit is under NDA, so I am going to use Cocos2D as my framework.

                  网上有一些针对其他语言和工具的教程,但我只需要基本弄清楚:如果我创建一个特定大小的场景,我如何创建一个永无止境的错觉背景?我只是在场景后面设置动画背景,还是以某种方式动态地增加场景的长度,让我的跑步者真的沿着画布奔跑?

                  There are some tutorials on the web that are specific to other languages, and tools, but I just need to figure out basically: If I create a scene with a specific size, how do I create the illusion of a never-ending background? Do I just animated backgrounds behind the scene, or do I somehow dynamically add length to the scene, so my runner really is running along the canvas?

                  我说得有道理吗?我只是无法理解这些游戏使用的实际方法是什么.他们确实觉得跑步者精灵在画布上移动,但也许只是他保持不动而所有元素都在移动?

                  Do I make sense? I just cannot grasp what the actual method these games use is. They certainly feel like the runner sprite is moving along a canvas, but maybe it's just that he's staying still and all the elements are moving?

                  推荐答案

                  让我们想想像jetpack joyride这样的无尽跑步者.

                  Lets think of endless runner like jetpack joyride.

                  您可能希望有两个背景节点,每个都比屏幕尺寸大一些(可能是 1.5 或 2 个屏幕宽度).当您加载关卡时,您会加载第一个背景并在第一个结束的坐标处添加第二个背景,以便它们形成长屏幕.然后,当我们在第一个背景离开屏幕时开始沿着这个背景移动角色时,我们可以将它的坐标更改为第二个背景帧结束的坐标.这样,当事情结束时,我们也会这样做.这样,仅使用 2 张长图像,我们就可以模拟基本上无穷无尽的空间.您可以为您的游戏使用更长的序列.当它离开屏幕并呈现它时,您可以将其他节点添加到您的背景中,因此每次看起来都不同.

                  You might want to have two background nodes, each larger than the screen size by some amount (maybe 1.5 or 2 screen widths). When you load your level, you load first background and add second background at the coordinates where first ends, so that they form long screen. Then when we start moving character along this background when first background leaves screen we can take it, and change its coordinates to those where second background frame ends. This way when this comes to an end, we do the same with it. This way only using 2 long images we can simulate essentially endless space. You can use longer sequences for your game. You can add other nodes to your background when it has left the screen and present it, so it looks different each time.

                  这篇关于无尽奔跑游戏的一般架构是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:错误 ITMS-90035 - Xcode 6.3.1 [无效签名] 下一篇:cocos2d-android:如何显示分数

                  相关文章

                  <i id='9DQ8o'><tr id='9DQ8o'><dt id='9DQ8o'><q id='9DQ8o'><span id='9DQ8o'><b id='9DQ8o'><form id='9DQ8o'><ins id='9DQ8o'></ins><ul id='9DQ8o'></ul><sub id='9DQ8o'></sub></form><legend id='9DQ8o'></legend><bdo id='9DQ8o'><pre id='9DQ8o'><center id='9DQ8o'></center></pre></bdo></b><th id='9DQ8o'></th></span></q></dt></tr></i><div id='9DQ8o'><tfoot id='9DQ8o'></tfoot><dl id='9DQ8o'><fieldset id='9DQ8o'></fieldset></dl></div>
                  <tfoot id='9DQ8o'></tfoot>

                        <bdo id='9DQ8o'></bdo><ul id='9DQ8o'></ul>

                      <small id='9DQ8o'></small><noframes id='9DQ8o'>

                    1. <legend id='9DQ8o'><style id='9DQ8o'><dir id='9DQ8o'><q id='9DQ8o'></q></dir></style></legend>