Need advice on media size and some "how to" questions

basil99

Active Member
Licensed User
Longtime User
Hi!
Just new here, spending all the time reading docs and running samples. My background is Windows coding with some basic clones and assembly. Have some ready game projects, so want to move to android market with 2D games for kids, like platformes, quests etc.

Atm, I found GameView lib is ideal point to start, seems fits all my demands.
Here are questions to community, hope to get some answers )

1. There are so many devices with various screen resolutions. Do i need to have a different grafix assets for each resolution and aspect ratio OR better to have one asset for, say, 480 / 800, then scale up and down, depending on device ? What is the best, having in mind package size and picture quality ?

2. As I got, i need to load game grafics ( png, jpg, gif ) with BitmapData ( an example from GameView Smiley sample ):

Smiley.Bitmap = LoadBitmap(File.DirAssets, "smiley.gif")

If i need to scale all game assets images in X and Y dimensions, knowing scaleXfactor and scaleYfactor, calculated depending on device resolution, how I must do it ?
With Bitmap.Initialize ? Or Bitmap.InitializeMutable ? what the difference ?
Could anybody be so kind to provide a sample code ? )

B4A is pretty different from basics languages i know, so i expect a long time to pass since i made smth worth to see

Thank you
 

basil99

Active Member
Licensed User
Longtime User
Hi, Erel! Thanks for reply


Will do, also learned some thing playing with sample code.

See the Jumping Smiley example. It uses the simplest scaling solution which is specify all the dimensions with %x and %y.

1. I can try this on my old phone with Android version 2.2 installed - with android:minSdkVersion="8" and hardware acceleration removed, but unfortunatly smiley fly away and nothing happens ( no sound, no collision and have no idea how to control it. Think its because of my old harware

2. This example is for sure more complex ) Need to play with some simple things before to feel confident enough.
 
Upvote 0
Top