Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question
    
What's wrong with a version for tablets and one for smartphones? –  The Communist Duck May 3 '11 at 18:08
    
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 ? –  Minishlink May 3 '11 at 18:20
    
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? –  The Communist Duck May 3 '11 at 19:22
2  
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 –  Ray Dey May 3 '11 at 19:51
1  
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. –  user744 May 4 '11 at 10:06
show 4 more comments

1 Answer 1

up vote 5 down vote accepted

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.

share|improve this answer
    
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. :) –  Minishlink May 3 '11 at 20:29
    
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! –  thedaian May 3 '11 at 22:05
    
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. –  thedaian May 3 '11 at 22:09
    
Ok, thank you for your answer ! :) –  Minishlink May 4 '11 at 7:54
    
well he may not be rewriting everything. You could replace XNA with MonoGame, and then compile to mobile platforms using Xamarin –  jhocking Apr 3 at 16:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.