Porting 640x480 game to mobile platforms (hirez display)

I’m a new game developer and I’m starting by porting a FOSS X Windows game to Android using SDL2. The port now runs on the tablet but the assets are all wrong.

The original game is 640x480 and I’ve been playing around with updating assets to look good on: 1280x800 px (Galaxy Tab 2 10.1) as well as trying to understand how SDL_RenderSetLogicalSize(sdlRenderer, _width, _height) changes things. Most of my work now is trail and error … sooooo

Does anyone have any good links, HOWTOS, or tutorials on methodically going from a smaller size to a larger size game. I know there may be blitting implications to using a different size canvas, but suspect there are many other things I don’t know about that will bite me. So I wanna read up before I start throwing code around.

thanks in advance,


Hi there,

I have a similar problem right now, I just posted it here.

Depending on how your rendering is done, I think you may want to use SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, “linear”) as well as SDL_RenderSetLogicalSize(sdlRenderer, _width, _height).

I think that if you can use OpenGL with SDL, you’ll be in good shape. Ryan Gordon (a major contributor on SDL, and professional game-porter) used some OpenGL when he upgraded a port of SDL 1.2 to SDL2. He talks about it here.

You can download this book for free as a pdf. Although it is focused on the Android Java API stuff and not SDL, it talks about your exact problem of rendering assets to different resolutions on an Android.

Best of luck to you!