Replies: 1 comment 6 replies
-
That is indeed an interesting problem, not only for collisions. Another problems is the display of the tile layers because the bridge should suddenly be rendered on top of the player. First of all, I fear with the current functionality of the plugin there is no built in way to solve this. To solve the display layer and collision problems I suggest the following features for GridEngine: We introduce GridEngine layers. Each GridEngine layer gets the two layers of the tilemap it should appear inbetween. So if you want your GridEngine chars of layer x to appear between tilemap layer 2 and 3, you can specify it while configuring GridEngine. GridEngine needs to use several own layers for correct character positioning. So it will adapt the depth settings of the tilemap and character sprites accordingly. So in your case you would create two GridEngine layers. One on top of the bridge and one below. In your code you need to make sure that your character switches layers when walking down/up the ramp/stairs. Regarding the collision problems: You are not the only one demanding a more granular control over collisions. There were collision layers in the room: #181 (comment) However, I suggest to use collision groups instead of layers. Layers are only needed if the order is relevant which is probably not the case for collisions. Each character can be part of zero or more collision groups. In the tilemap each tile can be part of zero or more collision groups. In your case you could then have a collision group for the ground floor and one for being on top of the bridge. When a character passes the ramp/stairs you need to make it switch the GridEngine layer AND the collision group. What do you think of that approach? |
Beta Was this translation helpful? Give feedback.
-
hey, so im using the engine, to clone a pokemon game, so far so good, got lots of basic things working, including a custom follow thing for the pokemon. given the img:
The player is supposed to move left to right across the bridge, ive added a
ge_collide_down
andge_collide_up
to the bridge tiles, the edge of the rocks are fullge_collide
(which is stopping the player in the img), but the player should also be able to move underneath the bridge in the img too...how do i handle the collision here?feels like i need collision based on what layer or tile the character is stood on but my head is hurting trying to figure this out XD
Beta Was this translation helpful? Give feedback.
All reactions