Results 1 to 1 of 1

Thread: VB6 TileHandling and Unicode-Shapes

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,253

    VB6 TileHandling and Unicode-Shapes

    There's a lot of Unicode-Symbols in the upper CodePoint-Ranges, which are suitable for simple Game-Purposes.
    - e.g. for Chess-Pieces: https://en.wikipedia.org/wiki/Chess_...2_chess_pieces
    - but also for Cards: https://en.wikipedia.org/wiki/Playing_cards_in_Unicode

    With proper Unicode-Textoutput-Methods (as e.g. TextOutW, which is used here),
    one can use these "complex Shapes in a single Character" instead of Image-Resources.

    The whole thing was inspired by this thread: https://www.vbforums.com/showthread....=1#post5569943
    (and the questions which followed, which were also about the TileHandling)...

    So the Code below shows an "Excel-like" Cell- (or Tile-) addressing,
    using a Dictionary behind a cTileArea-Object, to manage each Tile individually.
    The addressing-scheme is currently "Bottom-Up" like in Chess (from "a1" to "h8") -
    but this can be switched in cTileArea.Init (along with the amount of Tiles), to make it "Top-Down" like in Excel.

    An additional cCanvas-Object (bound to a normal VB.PictureBox) provides special Rendering-Support.

    Here is, what it produces:
    Name:  TileHandling.png
Views: 426
Size:  122.4 KB

    And here is the Project-Code:
    TileHandling.zip

    Have fun,

    Olaf
    Last edited by Schmidt; Jun 7th, 2022 at 12:25 AM.

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