What environment will work fine for a game like Tic Tac Toe on iOS?

I would like to make an iOS game whose features are comparable to those of a simple Tic Tac Toe game. I was wondering which environment is best for my needs.

  • using Cocoa interface components.
  • using Cocos2d.
  • Using OpenGL.

I need a comfortable environment.

+4
source share
1 answer

Key moment:

Since I'm new to iOS and OpenGL, and the game is not so complicated. I want to handle the environment easily.

so I suggest moving on to Core Animation. In Core Animation, you can use CALayer to represent tic-tac-toe cells; distribute them correctly; and change their graphic status using animation. Pretty simple.

Cocos2D will also work because it is a simple 2D engine, but harder to learn, since it will also take into account the requirements for more complex games (therefore, it offers several abstractions: sprites / nodes / layers / scenes / animation / spritesheets ... )

OpenGL would be redundant, but it might be a good choice to learn it.

Also, look at this: iOS 2010 fall course. Lecture 14 - Tic-Tac-Toe with inheritance

From What is Core Animation? :

Core Animation is a collection of Objective-C classes for rendering graphics, design, and animation. It provides fluid animations using advanced layout effects while preserving a hierarchical layer abstraction that is familiar to developers using the application suite and Cocoa Touch View architecture.

Dynamic, animated user interfaces are difficult to create, but Core Animation simplifies the creation of these interfaces by providing:

  • High-performance layout with a simple, affordable programming model.

  • A familiar visual abstraction that allows you to create complex user interfaces using a hierarchy of layer objects.

    • Lightweight data structure. You can simultaneously display and animate hundreds of layers.
  • An abstract animation interface that allows animations to run in a separate thread, regardless of the application launch cycle. When an animation is set up and running, Core Animation takes full responsibility for its launch at a frame rate.

  • Improved application performance. Applications only need to redraw the content when it changes. Minimal application interaction is required to resize and provide layers of hosting services. Core Animation also excludes application code that runs at animation frame rates.

  • A flexible model of the layout manager, including a manager that allows you to set the position and size of the layer relative to the attributes of related layers.

Using Core Animation, developers can create dynamic user interfaces for their applications without using low-level graphical interfaces such as OpenGL to provide decent animation performance.

+5
source

Source: https://habr.com/ru/post/1437581/


All Articles