How do I handle different levels ?

Get help using Construct 2

Post » Mon Aug 31, 2015 12:11 pm

Hi,
I'm working on an online minigolf game.
I'm not sure about how to "store" the different levels inside Construct 2. Different layouts ? How I could select a random level at the end of each game ?
How could I use filters before starting a new game (like : no levels with water areas) ?

What if I want to create a side application in order to create our own map and include them later on another server ?

I previously worked on a shoot/platformer where I created the maps as small images (about 100 * 50). The image was included as a sprite into the map family and the game converted each pixel into the corresponding tile or sprite (purple pixel : wall, blue pixel : health bonus, red pixel : spawn point…) but that doesn't seem the best way to do so for my minigolf game.
B
12
S
7
G
7
Posts: 450
Reputation: 4,276

Post » Mon Aug 31, 2015 1:01 pm

To jump on random Layout you could use "Go to layout (by name)" -> name them with a string + (number from 0)

But, your platformer map loading makes a lot of sense, why can not you use it like that in your minigolf game?
B
10
S
2
G
1
Posts: 51
Reputation: 761

Post » Mon Aug 31, 2015 2:26 pm

Coin-coin le Canapin wrote:I'm not sure about how to "store" the different levels


Yes, I would make them different layouts, but they could all use the same event sheet - because the functionality of the game mechanics is the same.

Your menu layout would have to know details of what is on each level to be able to set filters... so you could store info about the levels in an array, or hard code it... it depends on how elaborate you want to get.
B
98
S
35
G
20
Posts: 438
Reputation: 17,875

Post » Mon Aug 31, 2015 3:59 pm

Thank you for your replies. Having one layout by map seems a good way to do so. I just have to think about a good way to create and share maps.

Borgi : at the current state of my development it could work as a sprite, but I want to store instance variables too in my level, I don't see how I could store this kind of information in my sprite where 1 pixel represents 1 sprite.
B
12
S
7
G
7
Posts: 450
Reputation: 4,276

Post » Thu Sep 03, 2015 11:04 am

Do you think it would be possible to save the map as an XML file, which could be parsed by C2 to be "recreated" in my actual game ?

Edit : I tried and it seems to work. Could be a good alternative to the image I used on my platform game.
B
12
S
7
G
7
Posts: 450
Reputation: 4,276


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests