Jump to content

TEDWARDS

Member
  • Posts

    268
  • Joined

  • Last visited

Awards

This user doesn't have any awards

3 Followers

About TEDWARDS

  • Birthday Jun 23, 1994

Profile Information

  • Gender
    Male
  • Member title
    Junior Member
  1. Hi, My brother has university project to create a Pacman game and is currently stuck on the bounding box collision. What happens when you debug the game in visual studio is all of the munchies disappear as if they are all being collided with and hes spent sometime trying to figure it out but hes reached a point where nothing works as he thinks its something to do with how he is using the sprites. This is the check collision: boolean Pacman::CheckCollision(int x1, int y1, int width1, int height1, int x2, int y2, int width2, int height2) { int left1 = x1; int left2 = x2; int right1 = x1 + width1; int right2 = x2 + width2; int top1 = y1; int top2 = y2; int bottom1 = y1 + height1; int bottom2 = y2 + height2; if (bottom1 < top2 && top1 > bottom2 && right1 < left2 && left1 > right2) { return true; } } This is the Munchie collision, the pacman pellets: void Pacman::MunchieCollision() { for (int i = 0; i < MUNCHIECOUNT; i++) { if(CheckCollision(_pacman->Position->X, _pacman->Position->Y, _pacman->Position->Width, _pacman->Position->Height, _munchies[i]->MunchieRect->X, _munchies[i]->MunchieRect->Y, _munchies[i]->MunchieRect->Width, _munchies[i]->MunchieRect->Height) ) { _munchies[i]->MunchieRect->X = 1300; _munchies[i]->MunchieRect->Y = 1300; } } } This is where the rectangle is located: // Load Pacman _pacman->Texture = new Texture2D(); _pacman->Texture->Load("Textures/Pacman.tga", false); _pacman->Position = new Rect(350.0f, 350.0f, 32, 32); _pacman->SourceRect = new Rect(0.0f, 0.0f, 15, 15); //Load ghost _ghosts[0]->texture = new Texture2D(); _ghosts[0]->texture->Load("Textures/GhostBlue.tga", true); _ghosts[0]->posRect = new Rect(rand() % Graphics::GetViewportWidth(), rand() % Graphics::GetViewportHeight(), 28, 28); _ghosts[0]->sourceRect = new Rect(0.0f, 0.0f, 16, 16); // Load Munchie Texture2D* munchieTexture = new Texture2D(); munchieTexture->Load("Textures/MunchieText.png", true); for (int i = 0; i < MUNCHIECOUNT; i++) { _munchies[i]->MunchieTexture = munchieTexture; _munchies[i]->MunchieRect = new Rect(rand() % Graphics::GetViewportWidth(), rand() % Graphics::GetViewportHeight(), 20, 20); _munchies[i]->munchieSourceRect = new Rect(0.0f, 0.0f, 7, 7); } he also wanted me to attach the game incase anyone wants to take a look Thanks for your help Pacman.rar
  2. It has two S1 Fixed mounts with M3A's on both and One S1 Pylon mount with 2x S1 Marksman HS.
  3. I got Direct X 11 Multi thread 1.4 million draw calls and Direct X 12 at 12.6 Million on a 4670k and a 780Ti.... Didn't realize the difference would be that different
  4. Have you looked at any Razer ones? they typically only ship in the US layout
  5. Many of my friends had this problem with them, one phoned up and they said maintenance is in there area it will be fine in two weeks, 6 months later they said the same thing so he left and Sky is his ISP now lol
  6. Username - T3DWARDS Favorite Videos: https://www.vessel.com/videos/KEWkTk6st https://www.vessel.com/videos/doIainCU-
  7. OOOOOOOOOOOOOOOOOOO That makes sense then
  8. Pretty sure they have a deal with GoG so people who dont want to use DRM can just buy it from there
  9. from google yes other places I don't know
  10. lol headseat, Razer krakens are pretty good audio but the mic for me was abit of a letdown
  11. If you only use it for documents and media consumption have a look at a chromebook
  12. Yeah aria is a good site, TinyTomLogan recommends it all the time so I trust his word
×