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

  • SEARCH
  • Home
  • 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 3677352
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:12:40+00:00 2026-05-19T03:12:40+00:00

I have simple 2D puzzle game earlier I created it extending view and everything

  • 0

I have simple 2D puzzle game earlier I created it extending view and everything goes fine unless I tested it on smaller device. My half of the game doesnt appear on device someone told me to use surface view I tried that also but of no use can anybody tell me whats the problem I placed various graphics object like this

bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.ring);
canvas.drawBitmap(bitmap, 45, 250, paint);
canvas.drawBitmap(bitmap, 135, 250, paint);
canvas.drawBitmap(bitmap, 225, 250, paint);

i.e. I used static values is this not the correct way or what I am doing wrong?

  • 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-05-19T03:12:41+00:00Added an answer on May 19, 2026 at 3:12 am

    Get the screen’s height and width:

    DisplayMetrics dm = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(dm);
    int screenHeight = dm.heightPixels;
    int screenWidth = dm.widthPixels;
    

    Then scale everything using those values… You’ll probably need to specify all vertices of the bitmaps, so that it scales properly.

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

Sidebar

Related Questions

I have a simple puzzle game. There is an image consisting of 16 tiles
I am developing a simple game photo puzzle. I have 9 pieces of an
I create simple puzzle game and use next for this: I have an class
This is a bit of a puzzle - I have created a small game
I have a simple jigsaw puzzle i'm making. I have a method that is
I'm looking at trying to create a simple 'slider puzzle' game. You've seen the
What I am doing is very simple. I have a simple 2d Maze game
I have created a puzzle which is a derivative of the travelling salesman problem,
I have implemented a version of Rush Hour (the puzzle board game) in Python
I've created a puzzle engine for iPad (iOS SDK 4.2) I have a PuzzleViewController

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.