need help to develop game

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

need help to develop game

Postby mikethelearner » Mon Feb 15, 2010 3:36 pm

hai guys,
iam a android developer but new to android game development.

1)could u suggest me links or books to gain knowledge on how to dev a game.

2) my game requirement is , it should be compatible with all versions of android Android 1.1+ and
HTC Sense UI.
what kind of precausions i need to take to achive it.

3) as part of game i need to interact with server i need to use XML Socket communication for it.
could u explain me what is that and how to use it.

4) minimum screen resolution is 240 X 320 and for above screen resolutions it should be auto scaling for every time full screen (images).
do i need to different images for different screen resolutions or is there any auto scaling mechanism in
android.


this info important for my project please help.....
mikethelearner
Junior Developer
Junior Developer
 
Posts: 13
Joined: Mon Feb 15, 2010 3:16 pm
Location: us

Top

Postby MichaelEGR » Tue Feb 16, 2010 11:31 am

Yes... Welcome to Android or in the larger context Java game development.

There is much to learn and a lot of it falls under the "dark arts" category such that you will have to search and assimilate the appropriate knowledge yourself.

Some general answers to your questions.

1) http://www.javagaming.org is a great resource for Java game development and there is an Android section on that forum.

2) Android 1.5+ is a reasonable target these days and recommended for several reasons such as it's the 1st release to take into account separate resource directories for various screen size and other parameters.

3) You should be able to find this info if you search for it; it's not game dev specific.

4) You need to manage your images as there isn't auto downscaling of images and any auto-scaling features built into Android should be avoided. I suggest looking into OpenGL ES development, but it's a lot to take in as it can make it easier to handle different screen sizes because of the use of projection. IE you work with world coordinates and through projection from a camera perspective/position screen sizes are taken into account. GL ES dev is not for the faint of heart though and you'll have to dig in to learn the details.

-----

I will be releasing a significant framework for real time app / game development for Android covering 2D (Android 2D API) and 3D (OpenGL ES) including a number of tutorials on the subject at http://www.typhon4android.org, but release is still a month+ away. Bookmark it and check it out soon.

Also start small and verify your work then make something larger. Don't start off creating an epic first game!
Founder & Principal Architect; EGR Software LLC
http://www.typhonrt.org
http://www.egrsoftware.com
User avatar
MichaelEGR
Senior Developer
Senior Developer
 
Posts: 147
Joined: Thu Jan 21, 2010 5:30 am
Location: San Francisco, CA

Postby mikethelearner » Wed Mar 03, 2010 4:13 pm

thanks for reply.

based on your suggestion i choose android 1.5 version to develop and minimum screen resolution is 320 X 240.

i am doing UI work to my game.

i got a problem with multi screen support in android 1.5.

multi screen support is available from 1.6.using drawable-hdpi-v4 etc..

this works if i use android1.6 as target api for my application. if i develop application using 1.5 it is not recognizing the folders and showing errors.

forums suggested me to build application aginest 1.6 and use
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>

so i developed my sample application in android1.6 and build against 1.6 it is working i achieved multi screen support.


i deployed the same application in emulator which uses 1.5 from command prompt. the application is working but multi screen support is not achieved.


can i conclude that if we develop applications in android 1.6 they will run in android 1.5 but multi screen feature will not appear.

if my statement is correct, which version of android i need to use for my app.
if i use android 1.6 what about users of 1.5 my application look ugly because of no feature of multi screen

simply, my query is "how to achieve multi screen support in android 1.5".

please suggest me...

i am in big confusion ...
mikethelearner
Junior Developer
Junior Developer
 
Posts: 13
Joined: Mon Feb 15, 2010 3:16 pm
Location: us

Postby MichaelEGR » Thu Mar 04, 2010 9:01 am

To support 1.5 and the various drawable resources use the following:
drawable-120dpi for drawable-ldpi
drawable for drawable-mdpi
drawable-240dpi for drawable-hdpi

As things go you won't find the above in documentation, but it works on 1.5+.

Any unscaled resources should go in drawable, but you have to load them with a little special code on Android 1.6+ to load them as unscaled. The 1.6+ equivalent that doesn't work in 1.5 is drawable-nodpi... I do believe I have posted about this unscaled loading code before on anddev, so search around.
Founder & Principal Architect; EGR Software LLC
http://www.typhonrt.org
http://www.egrsoftware.com
User avatar
MichaelEGR
Senior Developer
Senior Developer
 
Posts: 147
Joined: Thu Jan 21, 2010 5:30 am
Location: San Francisco, CA

Postby mikethelearner » Fri Mar 05, 2010 8:28 am

thank you very much

your suggestions are very useful.

i have problem not only with resources but also with layout files.

my game is cards game.

in game screen there will be game table and some seats are arranged around the table like in poker.

to arrange seats i am using "dip" to specify the position of seat and i am using "absolute layout" for it because we can specify the positions in absolute layout only.
like this,

<AbsoluteLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/AbsoluteLayout01"
android:layout_width="480dip"
android:layout_height="320dip"
android:keepScreenOn="true"
android:background="@drawable/game_background1">


<include
android:id="@+id/P_seat1"
android:layout_width="100dip"
android:layout_height="60dip"
android:layout_x="190dip"
android:layout_y="210dip"
layout="@layout/player_view"></include>

<include
android:id="@+id/P_seat2"
android:layout_width="100dip"
android:layout_height="60dip"
android:layout_x="190dip"
android:layout_y="40dip"
layout="@layout/player_view"></include>
</AbsoluteLayout>


and the api version i used is android1.5.

it is good in 320 X480 emulator i tested in 480 X800 but i observed that seat positions are not same, seats went to corners.

is "dips" also wouldn't work in android 1.5.

what is the solution for my problem...
is <Absolute Layout> deprecated?
do i need to prepare different layout files for different screen resolutions

like res/layout-small/my_layout.xml, res/layout-large/my_layout.xml.

and once again this is possible in android 1.6 only.

what should i do.

please suggest me...
mikethelearner
Junior Developer
Junior Developer
 
Posts: 13
Joined: Mon Feb 15, 2010 3:16 pm
Location: us

Re: need help to develop game

Postby mmavacations » Thu Feb 14, 2013 1:58 pm

I hope you have made your game. And the given suggestions are really helpful.
User avatar
mmavacations
Freshman
Freshman
 
Posts: 7
Joined: Fri Jan 11, 2013 7:46 am
Location: USa

Top

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 5 guests