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 8505045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:12:30+00:00 2026-06-11T02:12:30+00:00

I have replicated the classic helicopter game using libgdx. It was fairly easy. Now

  • 0

I have replicated the classic helicopter game using libgdx. It was fairly easy. Now I want to modify it such a way that the obstacles placement will be a mixture of predefined and randomly generated positions. This way I can also place coins with nice patterns for the predefined groups of obstacles.

To do that, I need to have imaginary grids in the screen using the obstacle size. Then create some groups of predefined positions for both obstacles and coins. Maybe create 10 sets of those predefined levels. Show them once in a certain period of time randomly for the players to have a different feel.

My question is how do I create imaginary grids on a phone screen considering different sizes, resoultion, and densities?

N.B. Please don’t give me links of android developer pages for reading on different sizes and how to handle them. I have read many times and still do read once in a while.

  • 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-11T02:12:32+00:00Added an answer on June 11, 2026 at 2:12 am

    You can account for different size screens by using relative instead of absolute values for your grid. E.g., you can set the height of a cell to be screenHeight/8, rather than “40”. This way, whether the screen is 320 pixels or 400 pixels tall, you can still be sure that your grid will be 8 “boxes” tall.

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

Sidebar

Related Questions

I have a DAL that is replicated across multiple apps (I know its a
I have a Classic ASP script that outputs an HTML table as an XLS
I have a problem that I've replicated in various browsers. I have divs with
I have a MS SQL database that is getting replicated to mobile SQL CE
I have replicated a stripped-down version of my code that has recently been re-written
I have a chart (code to replicate will be below) that has two lines
Hi have made this function which is made to replicate an error that I
Is there some way to replicate rails' link-to-unless-current? Ie. if i have a list
I'd like to have the stdout of a command replicated to stderr as well
I have a site/backoffice solution that works with this structure: /bo // mercurial repo

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.