Non grid based tile maps

Post your own tutorials, guides and demos.

Post » Mon Jul 09, 2012 11:59 am

Here's an example on how to store a non grid based map using a array -

DOWNLOAD

Explanation -

PDF : DOWNLOAD
DOC : DOWNLOAD
ODT : DOWNLOAD
B
9
S
3
G
3
Posts: 366
Reputation: 2,301

Post » Tue Jul 10, 2012 5:18 pm

that's interesting, but isn't this what the construct editor already does under the hood?
B
3
S
1
G
3
Posts: 45
Reputation: 1,140

Post » Tue Jul 10, 2012 6:16 pm

@declan_gage
Only if you want to save the current state of everything in your layout. CC doesn't offer to just save the map.

@abhilash2863
I once made a thread about array and hash table and presented the same, but using the hashtable object. Its advantage in this situation is that you don't need to care about reorganizing your data when deleting. http://69.24.73.172/scirra/forum/viewtopic.php?f=8&t=8400 (See my second post)
And if you want to explore more things possible with the array object, have a look at "Verve!" about organizing, inserting and sorting of arrays. http://www.scirra.com/forum/example-verve-a-mini-game-of-skill_topic41461.htmltulamide2012-07-10 18:16:30
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Tue Jul 10, 2012 8:25 pm

Yay! 2 comments!

Ahem...
@declan_gage: This could be useful if your levels are not grid based but you want to load them using an array. This way you don't have to use different large size sprites for different levels.

@tulamide: I remember reading your article when you posted it, then completely forgot about it. I'll check out both the examples again. Thanks!
B
9
S
3
G
3
Posts: 366
Reputation: 2,301


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests