6
\$\begingroup\$

I'm currently making a game on the Android platform. I don't know whether to do a "smartphone edition" and a "tablet edition" or simply to do one edition.

If I put high definition textures, the users of smartphones will have to download a heavy package, and thus will have very less space available as if it was "normal definition" textures. On the other hand, it's very hard to maintain two versions at the same time...

So how do you handle this? Even if you develop only for smartphones, do you send multiple versions of your game/app to the Android Market or not?

\$\endgroup\$
9
  • \$\begingroup\$ What's wrong with a version for tablets and one for smartphones? \$\endgroup\$ Commented May 3, 2011 at 18:08
  • \$\begingroup\$ If you change the code in one version, then you'll have to change it in the other too... It's not very handy. Or is there a way to sync the code ? \$\endgroup\$
    – Minishlink
    Commented May 3, 2011 at 18:20
  • \$\begingroup\$ I have no idea. But wouldn't you have it set up somehow that the code is exactly the same, but ship with different textures? \$\endgroup\$ Commented May 3, 2011 at 19:22
  • 2
    \$\begingroup\$ I haven't used Eclipse much, but isn't there a config manager where you can have separate builds depending on the config you choose? A la Visual Studio configurations \$\endgroup\$
    – Ray Dey
    Commented May 3, 2011 at 19:51
  • 1
    \$\begingroup\$ The iPhone 4 is already 960×640, I can't imagine Android phones will be stuck at 800x480 for much longer. I don't think you'd use substantially different assets for 640 vs. 720. \$\endgroup\$
    – user744
    Commented May 4, 2011 at 10:06

1 Answer 1

5
\$\begingroup\$

Usually, when you're making something that will be ported to different systems (whether a game for multiple consoles, or an app for various mobile devices), it's common to wrap your code so that anything that is specific to one system (rendering, event handling, etc) can be completely replaced without touching the code for the logic. SDL (and SFML) are examples of this sort of code, and there's other examples out there for various things.

Now, if the only difference between the mobile and tablet version is texture sizes, then you could probably set up your code to use either a configurable texture size, or different build options. If there's multiple differences between the two, then it gets more complex.

Of course, there's nothing wrong with focusing on one platform to start, and if your game does well/there's enough demand for it/you have free time, porting your game to a new platform once you make the gameplay solid for the initial version.

\$\endgroup\$
4
  • \$\begingroup\$ Thank you for your answer. In fact I'm porting a PC/X360 game written in C# using XNA for Android and also iOS. What means "wrap your code" ? I'm sorry for my ignorance, I'm just a young french guy... Do you mean, putting like in C #ifdef XBOX etc.. ? It would be messy, wouldn't it ? And I don't even know it'd work. So what are you calling "wrapping" the code ? Thank you again. :) \$\endgroup\$
    – Minishlink
    Commented May 3, 2011 at 20:29
  • \$\begingroup\$ What I mean by "wrap your code" is taking code that is tied to a specific library, or operating system (usually, rendering, event/input handling, or file operations) and removing it from the rest of your code. As an example: you might have code to get a list of files from a directory. Every OS has a different way to do this. So you would call getFileFromDirectory() function in your game code, then you would have different definitions of that function, using #ifdef WINDOWS. Yes, it can get messy :), but you can keep the definitions in a different file. Good luck! \$\endgroup\$
    – thedaian
    Commented May 3, 2011 at 22:05
  • \$\begingroup\$ Of course, from my understanding of Android and iOS, none of them use XNA, so you'd pretty much be re-writing your entire game from scratch, so lot of stuff about wrapping code doesn't apply here. The only stuff you'd probably be able to reuse would be the art and music/sound. \$\endgroup\$
    – thedaian
    Commented May 3, 2011 at 22:09
  • \$\begingroup\$ well he may not be rewriting everything. You could replace XNA with MonoGame, and then compile to mobile platforms using Xamarin \$\endgroup\$
    – jhocking
    Commented Apr 3, 2014 at 16:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .