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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:28:01+00:00 2026-05-27T04:28:01+00:00

See Having Some Issues With Making Pacman to understand this question fully. Just look

  • 0

See Having Some Issues With Making Pacman to understand this question fully. Just look at the first part of the accepted answer. And this is in java!

I am using the array as shown in the link above. I have my pacman character moving around fine other then the fact that it is moving 21 pixels every 100ms therefore it’s not smooth at all.

Currently I’m just multiplying the x and y of the current array position by 21. I’m wondering how I would go about making this smooth. I have tried some ways of how to move but they have not worked and I’m not very skilled and my ways are not efficient, therefore I have come here looking for a good way to move around smoothly.

Some things that you may need to know:
Pacman is first checking spot in direction of key press.(example: right arrow down. Is it clear?)
If clear it will proceed to call another class which handles moving pacman until there is a wall or enemy.

  • 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-27T04:28:02+00:00Added an answer on May 27, 2026 at 4:28 am

    You need to create two loops. A game loop, which works out the logic of the game, and runs every 100ms, and an animation loop, which runs more frequently, maybe every 20ms and calculates where all the sprites should be.

    // in pseudo code
    sleep 20 ms
    if i++ % 5 == 0
        do game loop
    do animation loop with i
    // passing i to animation loop will allow you to easily calculate how far sprite is along path to destination
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having some issues with C. I have this is my code: // First line
So, I'm having some problems with a MySQL query (see other question ), and
I'm following this tutorial attempting to learn XNA, but I'm having issues making my
Having some issues getting this MPMoviePlayerViewController to work. I have two sample URLs pointing
I am having some issues with a group query with MySQL. Question Is there
I'm having some issues with removing some HTML elements. Just a few words about
Im having some issues creating an array of objects in javascript Please see my
I am having some issues with my code, I cant see whats wrong with
Having some issues with my dropdown menu. Code here: http://jsfiddle.net/xY2p6/1/ Something simple I'm just
I'm having the following problem and wondered whether anyone could see why this is

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.