Results 1 to 22 of 22

Thread: Tiles and ****

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    5

    Post

    I want to make a strategy game... But i dont get this **** with using tiles. So if anyone wanna explain please do so.

  2. #2
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355

    Post

    I'm making a strategy game too. i've just figured out how to make tiles work.. its tricky cos you have to take scrolling into account, etc.
    Im still working on getting scrolling fully working.. for some reason my textures seem to just squash up when i scroll

    just try coding something simple to see how they work.. they can work

    ------------------
    cintel rules
    www.cintelsoftware.co.uk

  3. #3
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636

    Post

    Hi!

    This is one of my big problems in VB.
    I don't know how to do this either.
    If you please send me the answer for that
    from someone so send it to:
    [email protected]

    Thank you very much.

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    5

    Post

    Well, why dont you try to explain using tiles to me Kennny? Or someone else?
    Please? I am desperate!


    /Taz[bS]

  5. #5
    Lively Member *Super Sniper*'s Avatar
    Join Date
    Jan 2000
    Location
    Portland, OR
    Posts
    81

    Post

    With it squashing up the textures try using a (form).cls and redraw it. I don't know if you already tryed it but I would like to know how to do something like that to.

    [This message has been edited by *Super Sniper* (edited 02-07-2000).]

  6. #6
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Post

    OK guys,
    I'm making a RPG and I know something ybout tiles (I'm using BitBlt, but doesn't matter how to draw them).
    Well, my tiles are stored in DCs and I've got a 'map' array of indexes. I think that's what you have too. Make them scroll is a bit difficult, depending how you're storing the map array. I've taken a 1D array so I can resize it while it's running, but like I said that's a bit harder to make. With a 2D map you can easy calculate the positions, best will be to make a camera object or just 2 coordinates like CameraX and CameraY. By drawing the scene you have to include this coordinates to know what to draw and where to draw. Look at this example code:
    -
    Dim A as long, B as long
    Dim TempX as single, TempY as single

    'Calculate precise map coordinates
    TempX = Camera.x / TileWidth
    TempY = Camera.y / TileHeight

    For B = 0 to (Form1.Height / TileHeight)
    For A = 0 to (Form1.Width / TileWidth)
    DrawTile (A - (TempX - Int(TempX))) * TileWidth, (B - (TempY - Int(TempY))) * TileHeight, Tile(Map(int(TempX) + A, int(TempY) + B)).DC
    Next
    Next
    -

    I hope you can understand what I wrote . If not you can download my game at my website and take a look of it's code...

    Fox

    ------------------
    [email protected]
    ...
    Every program can be reduced to one instruction which doesn't work.


  7. #7
    New Member
    Join Date
    Sep 1999
    Posts
    14

    Post

    I personally store all the Images in DC, then have a 2d array to store which tile goes where. Then I use a viewport, somthing similar to:

    type viewport
    x as int
    y as int
    w as int
    h as int
    end type

    To do the scrolling, all I do is move the view port around the 2d array, then you redrawn what is contained within the viewport. Easy.

  8. #8
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355

    Post

    I do the same thing as space cadet, sort of. Anyway, I've got it working now, perfectly
    lovely 75 fps with DX7 - in fullscreen

    ------------------
    cintel rules
    www.cintelsoftware.co.uk

  9. #9
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Post

    (My code is the same technic like space_cadet's)

    Hm... I've lovely 200 frames with 24 bit true color, but not fullscreen.

    ------------------
    [email protected]
    ...
    Every program can be reduced to one instruction which doesn't work.


  10. #10

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    5

    Post

    Hehe, well how'd ya'll learn how to use bitblp? I just need to

  11. #11
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Post

    Learning by doing... It's really simple.

    I can send you a well-comentated demo project how to using BitBlt, if you want.

  12. #12

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    5

    Post

    Yeah sure, thanx
    email to [email protected]

    !

  13. #13
    Addicted Member drewski's Avatar
    Join Date
    Feb 2000
    Location
    WA
    Posts
    242

    Post

    Can I get a copy of that demo for bitblt too?


    Thanks a lot
    Drew


  14. #14
    Lively Member *Super Sniper*'s Avatar
    Join Date
    Jan 2000
    Location
    Portland, OR
    Posts
    81

    Post

    Can I get a copy too?
    e-mail: [email protected]

    ------------------
    Website

  15. #15
    Addicted Member drewski's Avatar
    Join Date
    Feb 2000
    Location
    WA
    Posts
    242

    Post

    sorry for not including my address its [email protected]

    thanks alot
    drew

  16. #16
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334

    Post

    Me too?
    Thanks.

  17. #17
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334

    Post

    Me too?
    Thanks:
    [email protected]

  18. #18
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Post

    Of course, I sent it to all of you. If you need a more complex example you can also download a demo game engine from my website.
    http://derzirkel.tsx.org

    If TSX doesn't work try it directly :
    http://members.xoom.com/Der_Zirkel/

    ------------------
    [email protected]
    ...
    Every program can be reduced to one instruction which doesn't work.


  19. #19

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    5

    Post

    Well, i know see how tiles work, some atleast. Thanks to you Fox and some other pepole.


    Thank you All!

    /Taz[bS]

  20. #20
    Lively Member *Super Sniper*'s Avatar
    Join Date
    Jan 2000
    Location
    Portland, OR
    Posts
    81

    Post

    Who wants to get back to the top?

    Cause

    <<<!BACK TO THE TOP!>>>

    ------------------
    Website

  21. #21
    Guest

    Post

    Yo, fox can I get a copy of the program too? It would really help me out. Also, anyone, do you know of any good newbie tutorials for someone just starting DirectX????

    Thanks

    ~~~~~~~~~~~~~~~~~~~~
    The Monkeys fly at midnight

    AGbsa84

  22. #22
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Post

    Of course, visit my website:
    http://derzirkel.tsx.org

    If TSX doesn't work try it directly :
    http://members.xoom.com/Der_Zirkel/

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