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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:03:57+00:00 2026-05-28T16:03:57+00:00

Right, the game I’ve got is a 2D car racing game. I have implemented

  • 0

Right, the game I’ve got is a 2D car racing game. I have implemented the finish line image in the game and so on. And I’ve got it as a separate sprite sheet. Here’s the code I’m attempting to alter in such a way, that ‘If car1blue intersects finishLine1, end game.’ But I just can’t seem to get it right. Here’s the code I’m attempting to alter;

if (IntersectPixels(destinationBlueRect, finishLine1TextureData, finishLine1Rectangle, finishLine1TextureData))
{
    blueHit = true;                 
}

It would be even better if you could show me how to add an end game message saying ‘Player 1 wins’ (when car crosses finishline1) and end game roughly three seconds after that?

Any help is welcome please (I’m a newbie). Thank you!

  • 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-28T16:03:58+00:00Added an answer on May 28, 2026 at 4:03 pm

    You may want to implement this Game State Management system, as for your delay:

    float delayTime = 3000;// Time to delay in milliseconds
    float delayBuffer = 0;// This will count how much time has passed
    
    // In your Update method
    if (blueHit) {// You should change this to whatever way you find if someone has won the game
        if (delayBuffer < delayTime) {
            delayBuffer += (float)gameTime.ElapsedGameTime.TotalMilliseconds;
        } else {
            // Show the last screen
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a very simple game going here..., right now the AI is
I have a game I'm making in .NET at the moment. Right now I
I am working on game engine prototype and have the following question: Right now
I have a simple game that is in progress. As of right now all
I came up with a problem right now when my game is almost finish.
I'm current building a game in as3; the proplem I have right now is
I have made a flash game for facebook. All happened right expect when I
I'm working on a game right now where I'm going to have paths dynamically
I have 5 columns corresponding to answers in a trivia game database - right,
Right now for my game, I have a scene manager and it runs a

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.