Can a single Tile from a Tilemap be moved?

Get help using Construct 2

Post » Sun Mar 19, 2017 11:46 pm

Hi everyone, I been looking for this but I cannot find the answer

Can a single Tile from a Tilemap be moved to a different X,Y containing an image, but I need just to move a specific tile not the whole tilemap

Thanks in advance
B
39
S
22
G
77
Posts: 285
Reputation: 42,686

Post » Mon Mar 20, 2017 5:38 am

I don't think so, but you could erase it and set it in a new tilemap that is 1 tile wide 1 tile high and move that tilemap. That's the only way I can think of doing it.
B
45
S
21
G
65
Posts: 1,115
Reputation: 38,221

Post » Mon Mar 20, 2017 12:52 pm

Prominent wrote:I don't think so, but you could erase it and set it in a new tilemap that is 1 tile wide 1 tile high and move that tilemap. That's the only way I can think of doing it.


@Prominent Thank you That sounds really good idea, I have to try it and experiment with that, the only thing that I'm worrying off is that I will need more than one tile it could be up to 20 or more, so I will have to create a lot of tile maps, will that be better performance than use a normal sprite and many instances of that sprite?
I know I can create a sprite with the same image and size on exactly in the tile that I need but I'm worry because that will have to involve very very often create and destroy many sprites, If that make sense.

Thanks for you help
B
39
S
22
G
77
Posts: 285
Reputation: 42,686

Post » Mon Mar 20, 2017 1:58 pm

I don't know.. if the tilemap is just sized to 1x1.. it might not matter much, but I really don't know.
B
45
S
21
G
65
Posts: 1,115
Reputation: 38,221

Post » Mon Mar 20, 2017 5:23 pm

Prominent wrote:I don't know.. if the tilemap is just sized to 1x1.. it might not matter much, but I really don't know.



Cool thanks, I will have to try it and experiment with it.
B
39
S
22
G
77
Posts: 285
Reputation: 42,686

Post » Mon Mar 20, 2017 6:59 pm

Not sure watcha mean exactly. Lets converge.

https://www.dropbox.com/s/ctgyzpbek65aq ... .capx?dl=0

?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Mar 20, 2017 10:11 pm

99Instances2Go wrote:Not sure watcha mean exactly. Lets converge.

https://www.dropbox.com/s/ctgyzpbek65aq ... .capx?dl=0

?


@99Instances2Go Awesome you are really talented!! I really appreciate your reply!

you're being extremely helpful as usual and you saved me several times till now, it's funny because I was trying to follow your advice from the last post that you advised using tilemaps, instead of spawning objects, as I found out after your last post on the other thread that the spawning objects was causing the slow down on the game so I was looking for alternatives, as it was very heavy spawning and destroying objects.
This looks really cool and definitely will help me, I will have to experiment with that as I will need more than one fake Tile active at the same time.
Thank you so much, my friend

This is the Last post were we talked:
[url]
viewtopic.php?f=147&t=188885&p=1108560&sid=44adf1fc4a3b7d3f32c5e1d1f9964983#p1108560
[/url]
B
39
S
22
G
77
Posts: 285
Reputation: 42,686

Post » Thu Mar 23, 2017 4:42 pm

@tarek2

Ok, what about this ? Not finished, but the mechanics are there.
The world is a truly infinity world, well not sure how big coordinates C2 can take.
And the performance drop is minimal, well on my laptop, which is no ios device, and with a full HD resolution, which is also not needed, i think. It is all manged by 2 small tilemaps.

https://www.dropbox.com/s/3b2tcu3v489nc ... .capx?dl=0

Can probably be even more optimised by the smart guys in here.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Thu Mar 23, 2017 6:35 pm

@99Instances2Go wooow Thank you so much that is amazing, really really Awesome and the performance on the iphone6 is great around 60 fps, I need to spend some time studying the events as I still don't know what is going on, I have to admit I never used the loop "For" looks like it is very helpful this loop.
Again you are the best my friend thank you so much for all your help it will really help me a lot
B
39
S
22
G
77
Posts: 285
Reputation: 42,686


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 40 guests