Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9144281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:13:52+00:00 2026-06-17T10:13:52+00:00

I want to develop an Android 2D Game, with a playing field full of

  • 0

I want to develop an Android 2D Game, with a playing field full of rectangles and circles.
The rectangles and circles will be displaying objects, consisting of numbers, that have to be compared at some point.

Furthermore, all the objects (rect and circle) need to be dragable. I want to drag one object to another position, and then the surrounding objects-values should be compared with the value in the dragged object.

What I have so far is one abstract base class, and two sub classes, that represent the objects displayed in the rectangles and circles.

Furthermore the base class extends View, so that I can override the onDraw method for each of the two subclasses. Now I draw a rectangle of the one object, and a circle for the other object, furthermore i draw text containing the numbers of each object.

My question is, am I on the correct path concerning the development of an application like this, or would there be a better approach?

Thank you very much in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:13:53+00:00Added an answer on June 17, 2026 at 10:13 am

    Regarding your class-hierarchy I would say you are on the correct path. That is assuming that the base-class has implemented the drag-mechanism. Also your base class should define the method for comparing two objects, so that the sub-classes have it as well. The place for actual logic of object comparison depends on the algorithm. You can either let the parent class compare the objects, but that only works if you only need members of the base-class and the actual object types for the comparison. If you need anything specific to the distinct sub-classes, you would need to override the comparison method in each sub-class.

    What you also need is a mechanism to find the neighbouring objects. This could be done with a simple coordinate-check (if you can drag around freely) on a List of all game objects, or with the base-class containing references to all adjacent objects that is updated whenever a piece is dragged around (if it is more like a jigsaw puzzle game).

    However, I would strongly recommend using OpenGL for any complex game. Unfortunately, I only hava a good tutorial in German, but I’m sure there are many English tutorials available also.

    If you have any more detailed questions let me know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to develop an Android app that will fetch geo-tagged tweets from Twitter
I want to develop an android app that uses image recognition technology similar to
I have an app that I want to develop for Android 2.1, 2.2, 2.3.3,
I've to develop an android application that allows users to chat I want to
I want to develop an Android App, which will give me the speed with
I want to develop a card game to deploy on multiple platforms: Android, iOS,
I'm a noob to Android development and i want to develop a game you
I want to develop a small game in Android. But for this I need
I want to develop an Android application that visualize Dicom files and present them
I want to develop an Android typing based game. I would really want this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.