水效果“在Android上”对于 2D 游戏。从哪里开始?
我想在我的 Android 2D 游戏中添加一些水效果,给人一种物体在水下并且水变得越来越高的印象。有没有办法以编程方式执行此操作。也许有人可以给我一些代码建议,或者可以告诉我在哪里可以找到一些开始的东西。我喜欢以编程方式做事。有一次我看到一个用代码人造的火焰效果。在水的情况下也可能有同样的情况吗?
I wanna to add some water effects in my android 2D game to give the impression that objects are under water and the water becomes higher and higher. Is there a way to do this programmatically. May be someone can give me please some code suggestions or can say where can I find something to get started. I like to do things programmatically. One time I saw a fire effect artificial done with code. Is the same possible in the water case ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将为水效果编写一个 gl 着色器。
步骤:
在 2d 中编写水类型着色器有许多不同的方法。四处寻找最适合您需求的技术。
注意:着色器仅适用于具有可编程管道的设备(支持 OpenGL ES 2.0+ 的设备)
You're going to have write a gl shader for the water effect.
steps:
There are many different ways to write water type shaders in 2d. Search around for the technique that best suites your needs.
Caveat: Shader only work on devices with programable pipelines (devices that support OpenGL ES 2.0+