对于2d纸牌游戏来说,开放GL是一个过犹不及的东西吗?

时间:2023-02-07 20:08:27

I was just have an idea of creating a card game and I was just thinking whether to use OpenGl or CoreAnimation.Can you please tell me whether it would be a bit of a overkill to use OpenGL for s 2D card game.Thanks :)

我刚刚有了一个创建纸牌游戏的想法,我正在考虑是使用OpenGl还是CoreAnimation。请告诉我使用OpenGL进行s 2D纸牌游戏是否有点过分。谢谢:)

3 个解决方案

#1


9  

It's hard to say without knowing more. You can get pretty far using CALayers, images or drawing with quartz for the cards though. It really depends on the level of visual effects you are considering. If it's just moving cards around, then I'd say use layers.

如果不了解更多,很难说。不过,你可以用压延机、图像或用石英画卡片。这真的取决于你考虑的视觉效果。如果它只是移动纸牌,那么我会说使用图层。

#2


2  

Might want to check out GeekGameBoard.

可能想看看GeekGameBoard。

"A small framework for building board and card games, using Apple's Core Animation."

“这是一个小框架,用来制作棋盘和纸牌游戏,使用的是苹果的核心动画。”

#3


0  

Given that Core Animation uses OpenGL for rendering, you probably won't notice much of a difference in performance or memory usage. I don't think that you would gain anything by using OpenGL. Plus, you would have to handle all the animations on your own, as opposed to the prebuilt "set it and forget it" technique in Core Animation.

考虑到核心动画使用OpenGL进行呈现,您可能不会注意到性能或内存使用上的差别。我认为你用OpenGL不会有任何收获。另外,你必须自己处理所有动画,而不是在核心动画中预先构建的“设置它并忘记它”技术。

#1


9  

It's hard to say without knowing more. You can get pretty far using CALayers, images or drawing with quartz for the cards though. It really depends on the level of visual effects you are considering. If it's just moving cards around, then I'd say use layers.

如果不了解更多,很难说。不过,你可以用压延机、图像或用石英画卡片。这真的取决于你考虑的视觉效果。如果它只是移动纸牌,那么我会说使用图层。

#2


2  

Might want to check out GeekGameBoard.

可能想看看GeekGameBoard。

"A small framework for building board and card games, using Apple's Core Animation."

“这是一个小框架,用来制作棋盘和纸牌游戏,使用的是苹果的核心动画。”

#3


0  

Given that Core Animation uses OpenGL for rendering, you probably won't notice much of a difference in performance or memory usage. I don't think that you would gain anything by using OpenGL. Plus, you would have to handle all the animations on your own, as opposed to the prebuilt "set it and forget it" technique in Core Animation.

考虑到核心动画使用OpenGL进行呈现,您可能不会注意到性能或内存使用上的差别。我认为你用OpenGL不会有任何收获。另外,你必须自己处理所有动画,而不是在核心动画中预先构建的“设置它并忘记它”技术。