walk through the "ground" tiles?

Hi all,

I’m a newbie in Corona and I’m testing it with the purpose of make a game using Lime.

I’ve a question and I don’t find nothing about this in the forums, I’m going to explain my problem:

I need that the player walk through the platforms in my game, but when will be neccesary, the player walk over the platform, I’m going to try to explain this with a image:

I’ve a map similar to the example, in this, the player can go in two directions, walk to the right or jump to the stairs, the problem is that I need to mark the tiles of the stairs with the “IsGround” property for walk over there, but if I mark the tile with the “IsGround” property, then I can’t walk through the tiles to go to the right

Any idea?

Thanks in advance [import]uid: 84597 topic_id: 13961 reply_id: 313961[/import]

I’ve found a game made with Corona (but I don’t know if it’s made with Lime) that works as I want. It’s Bloo Kid, the player can jump below the green platforms, jump through these and stay gone up

Thanks [import]uid: 84597 topic_id: 13961 reply_id: 51439[/import]

in the first example, are the graphics yours?? if they are, then you should spend time collaborating with good developers as you can get some really cool mean sprites.

Anyways,

the way to do that would be to mark your tile with attributes on each side. So if you approach a tile from the top, it is ground, from the bottom, left and the right they are passable, so if a player can jump through them, walk left and right from them, but only stay on them if approached from the top.

hope that makes sense to you,

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 13961 reply_id: 51474[/import]

Thanks for your quick response,

In effect, the graphics are for our game, but at the moment, we only have concept art, so far, we have made several test to check the sizes of the graphics, the posibilities of the tiles to construct the houses, the graphics style, etc. This is only an example to explain my question.

This is an example of the game running in the emulator:

I think that I understand the solution, but I’ve many doubts, I think that you mean to assign a property to the adjacent tiles (in the floor?) and when the player collide with them, change the property “IsGround” of the tile that I want to through. Isn’t?

[import]uid: 84597 topic_id: 13961 reply_id: 51483[/import]

Hi there, I would like to get this thread going again.

In theory it makes perfect sense to mark the tiles depending on which direction you interact with them, but how is this actually done? Do you give the tiles a specific attribute in Tiled then handle the rest in Corona?

Edit: By the way I’ve spoken to the creator of Bloo Kid before. Extremely knowledgeable and helpful person but did not use Lime. He created his own tile engine. [import]uid: 31262 topic_id: 13961 reply_id: 53585[/import]

hey fnavarro, how does your simulator show an iPhone, on windows? [import]uid: 79135 topic_id: 13961 reply_id: 54514[/import]

@anddrewscott

I’ve upgraded Corona, and the last version support the view as Iphone and IPad [import]uid: 84597 topic_id: 13961 reply_id: 54739[/import]

@aaaron

I’m afraid that is not so simple, you need to mark the tile with a property in TILED, but Corona will not do anything for you. You need to check the collision with the tile, depending on where you are and where you go, ignore that this is a wall tile or not.

I’ve added a custom property to the tile called “Through” and in the collision event I’ve this code:

if event.other.Through then  
 if player.state == STATE\_WALKING then  
 -- The player through the wall when walking  
 end  
 if player.state == STATE\_JUMPING then  
 -- The player through the wall when jumping  
 -- It's necesary to check if the player is going  
 -- up or down  
 end  
end  

This system is like the tutorial “Collectible items”

The real problem at this moment is: how can I modify the wall tile to make that the player walk through this?

Could you help us, Graham? [import]uid: 84597 topic_id: 13961 reply_id: 54738[/import]

You could try marking the physical body of the tile as a sensor when the player collides with it allowing the player to fall through however you may not be able to do this until the collision has ended which would be tricky, maybe place a very small sensor above the floor object ( only slightly ) to detect the collision first and work out the direction etc and then modify the floor tile?

Or you might be able to do something similar but destroy the tile and then create a new one with new properties in its place with this - http://justaddli.me/api.php?c=tileLayer&m=createAndBuildTileAt [import]uid: 5833 topic_id: 13961 reply_id: 54823[/import]

Thanks, Graham.

I’ve tried the first option, but it’s very dificult the control of the collisions.

I think that I’m going to put a decorative ground without physics and a hidden and real ground (with full transparency), combined with the second option, then I can destroy and create tiles without the person that is playing can see that the tiles appears and disappears.

When I have tested this option, I will tell how well it works
[import]uid: 84597 topic_id: 13961 reply_id: 55198[/import]

Cool, please do keep me informed. [import]uid: 5833 topic_id: 13961 reply_id: 55779[/import]