Author Topic: Board Game - Best Practices  (Read 1847 times)

rookie_coder

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 14
    • View Profile
Board Game - Best Practices
« on: February 09, 2014, 07:58:53 PM »
Please give me some feedback on best practices for a board game. Here is what I need input on:

1. Creating the actual grid itself. Should I just create a 8 * 8 grid and anchor the sprites to each cell. Or is the Table layout what I need?

2. Also, I need to rotate some of the pieces, some of them could be in different directions with different angles of rotation. In Unity, this can be quite tedious. Is there an easier way in NGUI for sprite rotation? Is it accomplished by tweening? Are there any examples?

Thanks in advance

Cripple

  • TNP Alpha
  • Full Member
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 117
    • View Profile
Re: Board Game - Best Practices
« Reply #1 on: February 10, 2014, 03:59:25 AM »
Hi,

An UITable is used to arrange widgets into a variable cell size grid. You should use UIGrid for fixed items size.
You could use UIGrids (for the columns) in an UIGrid (for the rows). I didn't test it, but it must be OK.

UIGrid-Rows
 - UIGrid-Column1
     - Item1
     - ...
     - Item 8
 - UIGrid-Column2
    - Item9
    - ......
    - Item16
- ....

Tweening should be fine to animate your sprite.

Have fun.
Graphicstream Dev.