java - Is it better to use Android's built-in frame-by-frame animation methods or create your own? -
i have downloaded several example android games, , of them not use android's animation methods. have seen several posts on site , other sites prefer not use android's animation methods, never explain why.
so, better not use android's animations games?
i not recommend using android's animation classes games. reason operate on views not lightweight enough high performance games require. views designed buttons, text, , images stay still, positioned in organized layouts, , not images move on place. 2 best approaches making games android are:
using canvas class. note work simple 2-d sprite-based games, tends quite slow. it's relatively easy beginners learn.
using opengl es. works pretty game - it's fast , can both 2-d , 3-d games. be warned, complicated , not recommend beginners use opengl es!
if new programming games, recommend buying book on topic such mario zechner's excellent book "beginning android games" (look on amazon). book starts making "snake" clone using canvas, walks through basics of opengl , shows how make 2-d "doodle jump"-like game, transitions 3-d making 3-d "space invaders" app. highly recommend book, explains clearly, not boring read, , used make first game on android.
hope helps!
edit:
there third option making games android: using pre-built game library. these libraries provide advantage of speed being based opengl easier use. many cross-platform, meaning code easier port other operating systems such ios. (keep in mind cross-platform solutions not ideal, though.) examples of game free libraries include cocos2d , libgdx. if choose go down path, make sure follow licence agreement (this may involve putting sort of logo on main screen).
these libraries , provide easy entry game development, keep in mind creating game scratch provide knowledge , sense of accomplishment won't anywhere else.
Comments
Post a Comment