Best way to display a table / graph

0 favourites
  • 6 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • This isn't really C2's cup of tea, so I'm wondering, what's the best way?

    I need a league table (sports table), showing 16 teams and 12 columns for each team. This is always set, so that makes it a bit easier. I want to be able to resize the table depending on the size of my screen.

    My initial thought is to just draw the table in a paint package and then stretch it to the correct size. I could put image points in for the various boxes to allow me to place the text. Not sure if this is ideal, but I know how to do it. The only downside I can think of is that the initial graphic will be large and take up a lot of memory.

    Another thought is to draw a single row graphic in a paint package, and then just stack 16 of them ontop of each other, placing the text inside the graphic.

    Any of methods? Draw lines individually maybe?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That's about 200 things on your horizontal axis which would seem to be tough to distinguish. If you want columns, the simplest way would be to create a single sprite and colour it using web effects, or to create one bar for each colour, and just scale it and clone it as you need.

  • I would opt for the 9-patch object and reuse it as often as needed..

    or

    create the lines (and background) with the tiled background object (which would only take two sprites of 8x8px)..

  • That's about 200 things on your horizontal axis which would seem to be tough to distinguish. If you want columns, the simplest way would be to create a single sprite and colour it using web effects, or to create one bar for each colour, and just scale it and clone it as you need.

    I didn't describe it properly. It would be 16 rows and 12 columns. Not 16 * 12 on each row.

    I would opt for the 9-patch object and reuse it as often as needed..

    or

    create the lines (and background) with the tiled background object (which would only take two sprites of 8x8px)..

    I was thinking about loads of 9-patches, basically one for each cell, which would solve it, including colouring each cell differently where necessary. But it's 192 cells which seems a bit many? Still, I do like this idea most so far. But what do you mean about the tiled background object using 2 sprites of 8x8? That sounds promising too, but I'm not sure how that'd work.

  • Not sure if it would work for your idea, but..

    I meant like this:

    https://dl.dropboxusercontent.com/u/485 ... Table.capx

    only three tiled backgrounds of 8x8..

  • Oh I see. That's pretty good, I hadn't thought of that and yes, it would work for my game. I'm not sure which would be fastest / most efficient. Since my game is turn-based and the screens are mostly static, it might not matter too much but the tiled backgrounds do seem to be using a lot less objects at least. I'd be looking at 200 objects (9patches) v about 40 or so.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)