Results 1 to 4 of 4

Thread: Sector-based game

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2001
    Location
    Michigan
    Posts
    23

    Sector-based game

    Okay I have a new idea for my game. I want to use a single picture as the map (rather than tiles in bitblt). I want this to be a topview but from an angle (sorta like CHASE MODE in action games). Anyone ever play Darksun ? well thats what I mean. I will have the pictures for all of the players and monsters etc. I plan on defining walls and special areas by SECTOR. Like I'd draw a square on the area i want a wall at, and combine this with the bmp map. The sector would be a square with four points, the points being the pixel (X,Y) coords for ease of use. HELP

  2. #2
    Zaei
    Guest
    When you "Draw" on the map to create walls, just put the drawings into another bitmap image. "Walls" should be black, anything else, white. Then, in the game, each time a character moves, check to see what color he is on, in the other bitmap. If you get a 0 for the color, you cant go there.

    Z.

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    The power of GDI

    You could use GDI regions to list up the rects, and then perform region operations like combinergn, rectinrgn and pointinrgn to speed up your game, rather than coding the equivalents in vb.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4
    Hyperactive Member
    Join Date
    Aug 1999
    Posts
    482
    you could just load the map up, and have the map have values, 0 and 1.
    0 is walkable. 1 isn't.. (or you could set speeds, 0 - no movement, 1 - slow, 5- fast

    then just load that in an array

    then when your program calls the movement of the player.. say it's moving 2 left.
    it'll move ONE LEFT, is it moveable? , if it is 0, then just STOP and don't move there

    if you can move.. then move, and then check the next square,
    Rather, rinse.. repeat

    or you can check what image is on your map.. and if your charcater runs into the side of the image.. then just stop

    this probably isn't the best way.. but oh well

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width