How do I make breakout brick patterns dynamically

Get help using Construct 2

Post » Tue Jun 23, 2015 5:52 am

Hi,

I'm working on a breakout style mobile game that will have at least 20 levels. So, that means 20 levels of different brick patterns to layout in a grid. I can make a layout for each level and hand-place the brick pattern, or I'm guessing I could use some code to do the grunt work.

Questions:
1. Would it even save on app size/performance to do it dynamically?
2. What would be the best way to do it dynamically? I've looked at Rex's csv2array plugin and kind of think that would work, but not being a coder, I'm not sure.

Here's a pic of what I mean if the question is confusing. Thanks for any help.
Image
Image
B
11
S
2
G
1
Posts: 40
Reputation: 746

Post » Tue Jun 23, 2015 6:23 am

1
Performance is likely not an issue with this. C2 is already very fast at loading layouts, and loading would be the only thing affected. Size may be a bit smaller depending how you store it, but it will be pretty negligible especially with only 20 levels.

2
You could do that, or use one of the array editors on the forum to get a json string to load in an array... There's lots of ways to do it, and not really any best way.

Your example isn't the best reason to make your own level format to load. Layouts with objects placed with a snap to grid is perfect for a thing like that. But then again how many blocks are you talking?
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993

Post » Tue Jun 23, 2015 6:53 am

B
66
S
24
G
7
Posts: 1,514
Reputation: 11,039

Post » Tue Jun 23, 2015 12:38 pm

Thanks for the advice and example! If i'm not gaining any noticible performance or decrease in app size, then snapping to grid the levels seems best for me.
Image
B
11
S
2
G
1
Posts: 40
Reputation: 746


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 33 guests