Thread: game programming borders without a good shape

  1. #1
    Registered User
    Join Date
    Jan 2022
    Posts
    6

    game programming borders without a good shape

    My PACMAN game is not working.
    game programming borders without a good shape-pacman-gif
    I would like to stop my character from going out of bounds.
    Can somebody tell me how to do a non-square border?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Well nobody is going to tell you anything useful without seeing the source code.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jan 2022
    Posts
    6
    Quote Originally Posted by Salem View Post
    Well nobody is going to tell you anything useful without seeing the source code.
    Well ........

  4. #4
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    1,733
    My suggestion, make all of the parts normalised areas, so for example:

    map uses context as it's normalised area
    each individual map square (so turns, corridors etc) uses the map as it's normalised area, add the map position to it's own when passing the vertices, I count about 31 pieces vertically, I would expect the same horizontally
    actors use the map pieces as their normalised space, would have to examine up to 3 pieces away for borders since the actors will overshoot the normalised boundaries, maybe about 2.5 width & height?

  5. #5
    Registered User
    Join Date
    Jan 2022
    Posts
    6
    Quote Originally Posted by awsdert View Post
    My suggestion, make all of the parts normalised areas, so for example:

    map uses context as it's normalised area
    each individual map square (so turns, corridors etc) uses the map as it's normalised area, add the map position to it's own when passing the vertices, I count about 31 pieces vertically, I would expect the same horizontally
    actors use the map pieces as their normalised space, would have to examine up to 3 pieces away for borders since the actors will overshoot the normalised boundaries, maybe about 2.5 width & height?
    I fixed it, thanks.game programming borders without a good shape-pacman-gif

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 09-11-2012, 01:03 AM
  2. Good link for game programming
    By VirtualAce in forum Game Programming
    Replies: 1
    Last Post: 04-24-2006, 06:12 PM
  3. Good books on Game Programming
    By deadfingers in forum Game Programming
    Replies: 3
    Last Post: 03-14-2005, 08:24 PM
  4. I'm looking for a good book on 3D game programming
    By Music_Man in forum Game Programming
    Replies: 2
    Last Post: 09-09-2001, 09:29 PM
  5. Looking for a good book on 3D game programming
    By Music_Man in forum C++ Programming
    Replies: 2
    Last Post: 09-09-2001, 09:28 PM

Tags for this Thread