Hi everyone,
Sorry if it is a basic question, but I'm new with SGDK2 and never used SGDK1 so I might be missing some experience or basic concepts, so please indulge me! :baby:
What I'm trying to do:
I'm trying to make a fighting game but not exactly in 2d. The fighters can move into the background or in the foreground. So rather than fighting on a single line (the traditional way like Street Fighter 2 - walking left-right, jumping and crouching) they can do all that and move in a semi-isometric way. (Which is like dodging sideways) I made a couple of rules so by holding a key the fighters changes from jumping to walking sideways and it works pretty fine but I've got a problem related to solidity. I explain this problem further down. There are 3 floors that I've made for the fighter, one in the background, one in the foreground and one between them (all on the same layer). Depending on the movement entered by the player, the fighter is supposed to react to the solidity of one of these 3 floors. (I hope I'm not confusing anyone, it is quite hard to explain and my english might not be top notch: I'm a french canadian, so english is my second langage.)
The obstacle I can't overcome for the moment:
For some reason, the fighter is not taking solidity into account. He falls (beacause of gravity) right through the "supposed" ground. The thing is that the fighter sprite size is 100 pixels by 100 pixels and the floor tiles are 13 pixels by 14 pixels. I wonder if this huge difference in size could cause a problem. I have to say that I followed all the steps the create a normal behavior with solidity (I passed through the tutorial and looked at the sample project) but somethings seems to be missing.
Here is what I did to create solidity (maybe I did something wrong):
1- I created 3 Tile categories for the floors (MatLow, MatMid and MatHigh)
2- I created 3 Solidity types (One for each) Each of these solidity specifies one of these floor is to be considered SolidTileShape and the two others are EmptyTileShape.
3- I included the floor tiles in the map layer editor (drawing the 3 floors)
4- In the layer editor, I set the fighter sprite to make him react to one of the three floors by default
5- In the Fighter sprite definition rules I added these rules in this order (maybe the order can be the cause of the problem) (I won't paste each rule's code, but the title of each is quite self-explanatory)
rule 1: scroll player into view
rule 2: inertia
rule 3: animate the fighter to base animation (little jumping on place, the sprite doesn't move, only the images in it)
rule 4: react to solidity
rule 5: snap to ground
rule 6: move by velocity
rule 7: Accelerate by inputs
rule 8: gravity
There are a couple of other rules under certain conditions, but I deactivate them and the problem is still there, so they should not be related to this problem.
Presently, I can make the character move around the mat, jump, etc, but he always falls through the ground.
Is there something I am missing? Do you need to see the project file to have a more precise idea? If someone asks me for it, I would gladly share or show what I've done, but the game is still in it's very early development phase!
Thank you for your time!
