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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:49:32+00:00 2026-05-27T13:49:32+00:00

I am developing an Android Game. In this game some trains are moving on

  • 0

I am developing an Android Game. In this game some trains are moving on tracks. am able to move trains horizontally and vertically using two train images for horizontal train and vertical train separately.

Now i want to move train that is coming on horizontal track to vertical, i want to visualize it as it is now taking turn and moving on vertical track.

how can i do this, do i need to use so many images for each turning pixel, or is there any other way to turn train.

Please suggest
Thanks.

Edit:

am using draw to draw() image and update() to change its position.

public void draw(Canvas canvas) {
        canvas.drawBitmap(bitmap, x - (bitmap.getWidth() / 2), y - (bitmap.getHeight() /2), null);
    }

public void update() {
        if (!touched && !paused && !isDrag) {
            x += (speed.getXv() * speed.getxDirection()); 
            y += (speed.getYv() * speed.getyDirection());
        }

        if (!touched && !paused && isDrag) {
            x += (speed.getXv() * speed.getxDirection())* 2; 
            y += (speed.getYv() * speed.getyDirection())* 2;
        }
    }
  • 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-27T13:49:32+00:00Added an answer on May 27, 2026 at 1:49 pm

    Your question probably belong to
    http://gamedev.stackexchange.com

    But, assuming you are using some sort of Canvas, it has a method that applies rotation around a specific point.
    http://developer.android.com/reference/android/graphics/Canvas.html#rotate%28float%29

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

Sidebar

Related Questions

I am developing an android game. in this i have two moving images on
I am developing an android game, in which i have some trains moving on
I am developing a new game for Android. In this I am using Android
I'm developing an Android game that has to download some assets to the SD
I'm currently developing an Android game which saves data into a SQLite database. This
I'm developing a cross platform game engine this targets Windows, Linux, Mac, Mobiles(Android, iOS)
good day we are developing game for android and have some trouble with resource
I am developing an android game application played using bluetooth. While searching for bluetooth
I am developing a game for the Android platform using flash cs5 and AS3.
I'm unsure if this is possible -- I'm developing an Android game, and I

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.