draw a table/grid?

Get help using Construct 2

Post » Tue Jul 23, 2013 2:02 pm

Imagine a simple bingo ticket - if we did it in HTML/CSS it could be a simple table containing numbers, and the table lines stroked with CSS.

how would one do this in C2?

I guess I could write a plugin, but expect this would take a number of days/weeks as, having read the SDK docs there is a lot of complexity and things to know to develop something like this.

Anyone know any existing plugins?
B
17
S
6
G
3
Posts: 370
Reputation: 3,942

Post » Tue Jul 23, 2013 2:11 pm

You can always use tiled backgrounds to represent lines and use them to create any kind of grid you want. All of this without any particular plugin, all done with events.
B
60
S
24
G
23
Posts: 934
Reputation: 17,528

Post » Tue Jul 23, 2013 2:26 pm

hmm, so you would use a horizontal image, and a separate vertical line image, then stretch them to the right hight and thickness, duplicate them, then place them in the right possitions? Would the corners not overlap/look ragged? i need to put numbers in the centers of the grid, which seems tricky too. This has to work on html5 mobile, so will have to scale for any screen size, and will need to move around to support landscape and portrait with a single layout (two layouts breaks the game state).
B
17
S
6
G
3
Posts: 370
Reputation: 3,942

Post » Tue Jul 23, 2013 2:37 pm

How about a simple square image with a border.



Then array them 5x5 and voila... BINGO



klkitchens2013-07-23 14:43:55
B
22
S
4
G
1
Posts: 100
Reputation: 2,150

Post » Tue Jul 23, 2013 2:45 pm

You could also create the card itself as a an image (would be fancier that way) and then have the card be a single sprite. Use multiple image points in the center of each square to align your numbers.
B
22
S
4
G
1
Posts: 100
Reputation: 2,150

Post » Tue Jul 23, 2013 2:45 pm

Magistross was suggesting this, I believe:
grid_BHT.capx
ImageImageImage
B
71
S
20
G
191
Posts: 3,535
Reputation: 108,844

Post » Tue Jul 23, 2013 2:55 pm

Use the tiled background sprite make a square with edges and stretch and go.. and set the numbers as one sprite with animation-frames.

Like this
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Jul 23, 2013 2:56 pm

Ninjaad by @blackhornet..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Jul 23, 2013 3:05 pm

And I only needed two lines!
ImageImageImage
B
71
S
20
G
191
Posts: 3,535
Reputation: 108,844

Post » Tue Jul 23, 2013 3:35 pm

You guys are awesome!
Great work.
B
17
S
6
G
3
Posts: 370
Reputation: 3,942

Next

Return to How do I....?

Who is online

Users browsing this forum: pokka and 5 guests