Level maps

Discuss game development design and post your game ideas

Post » Sat Mar 05, 2016 5:00 pm

Hi, I'm making platform game with multiple levels.
Because levels are a lot I was wondering if there is a fast way to build them.

Let me explain better, I know that when coding a game in Java the fastest way to build a level is to create a .txt file and filling it with "0","1","2","3",..."N"

Something like this:
Code: Select all


  4                       4                        444
  4                      444                       444
     3                                    33                         
   1111        1111111111111111       111111111
111111111222211111111111111111112222221111111111111111111111111111111


and then associate every number to a specific object
(in my example, "1" = ground, "2" = lava, "3" = enemy, "4" = scores/money).

This is very efficient when your game have a lot of levels.


So here my question:
Is there in Construct 2 a way to build levels with this method (or anything similar) so as you can build a lot of levels fast?

(Sorry my bad english but I'm italian)

Thanks to everyone in advance.
B
4
Posts: 5
Reputation: 210

Post » Sat Mar 05, 2016 10:47 pm

You can use tilemap to associate with number as coordinates.

In that case you see ground tile number is 28 then you should set in dictionary as 28 = 1

Then import your map text and do action to create tiles from dictionary keys, also picking coordinates according to length and newline in txt like:

newline number max 9 goes to last tile.Y coordinate.
B
97
S
35
G
29
Posts: 3,139
Reputation: 28,371

Post » Sat Mar 05, 2016 11:46 pm

Sorry to hijack, it's a related question though.

If creating "screen size" levels, would it be best to use the dictionary method or to simply create multiple layouts using the tile map?
B
12
S
2
G
1
Posts: 42
Reputation: 879

Post » Sun Mar 06, 2016 2:21 am

I would say tile map is the best choice for that. I use it and is super useful to create my levels.
B
33
S
14
G
4
Posts: 172
Reputation: 4,033

Post » Tue Mar 08, 2016 1:17 pm

Exactly what I was looking for! Thank you!
B
4
Posts: 5
Reputation: 210

Post » Tue Mar 08, 2016 1:25 pm

Thanks alot... I thought so, but just wanted to check :)
B
12
S
2
G
1
Posts: 42
Reputation: 879


Return to Game Development, Design & Ideas

Who is online

Users browsing this forum: No registered users and 0 guests