如何实现“圆形侧滚动"?在我的游戏中? [英] How to implement "circular side-scrolling" in my game?

查看:98
本文介绍了如何实现“圆形侧滚动"?在我的游戏中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个游戏,该游戏的很大一部分是关于滚动圆形"背景的(背景图像的右端可以与背景图像的左端相连).

I'm developing a game, a big part of this game, is about scrolling a "circular" background ( the right end of the Background Image can connect with the left start of the Background image ).

应该是这样的:(实体移动并显示箭头,以显示背景应在何处开始重复)

Should be something like this: ( Entity moving and arrow to show where the background should start to repeat )

替代文字http://img89.imageshack.us/img89/9308/circular .jpg

发生这种情况是为了让实体走动,并且背景一遍又一遍地重复.

This happens in order to allow to have an Entity walking, and the background repeating itself over and over again.

我不使用图块地图,背景是简单的纹理(400x300像素).

I'm not working with tile-maps, the background is a simple Texture (400x300 px).

谁能指出我的链接,或者告诉我实现此目的的最佳方法?

Could anyone point me to a link , or tell me the best way I could accomplish this ?

非常感谢.

推荐答案

或者,您可以使用适当的纹理矩阵.这使您不必重新计算/上传每帧的UV坐标.

Alternatively you can translate the texture using an appropriate texture matrix. This saves you from having to recalculate/upload your UV coordinates each frame.

这篇关于如何实现“圆形侧滚动"?在我的游戏中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆