Collision Mask Problem

This forum is currently in read-only mode.
From the Asset Store
Particles support animations, collisions, effects and etc.
  • There is a problem with my collsion mask.

    I had set it for the ground, but the sprite will look like he is standing in midair.

    To get a clear look, here are some screens:

    <img src="http://i45.tinypic.com/qrc13d.png">

    <img src="http://i47.tinypic.com/2roqsrb.png">

    <img src="http://i46.tinypic.com/124bpmq.png">

    Help?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Candescence? Is that you? I thought this game was called Aria of Destiny.

    Anyway, two questions:

    1. Why are you making such a long ground sprite? It looks like a repeatable pattern, you should be using a Tiled Background for it.

    2. Is that tree stump really part of your background image? Why? It needs to be a separate graphic.

    3. Are you using Bounding Box collision mode for your sprite? How big is your sprite? What the hell is going on?

    Okay, that's like ninety questions. You should post your .cap so someone can take a look at what you're doing. No offense but it really looks like you're making a huge mess of things.

  • Eh, sorry.

    My first time using a collision mask.

    Anyway:

    http://www.box.net/shared/3jlosxeeik

    And that tree stump IS supposed to be in the background.

    It just so it won't look...bland.

  • And that tree stump IS supposed to be in the background.

    It just so it won't look...bland.

    I'm pretty sure deadeye means you not using a different object for the stump - this saves video memory and lets you place the stump as you wish.

  • I'm pretty sure deadeye means you not using a different object for the stump - this saves video memory and lets you place the stump as you wish.

    Exactly.

    Now! LegendaryBlade, listen up!

    Pay close attention!

    What you are doing is wrong!

    Game graphics are not made out of one large image. They're made up of tiles. This is because games are terrible, terrible memory hogs. Small tiles allow you to put the pieces together like a puzzle to make a bigger picture. You can reuse a small tile as many times as you like and there will be very little impact on memory, because your graphics card only has to remember how to draw the small tile just once. It can make a million copies in the blink of an eye with no problem. But large images on the other hand take up precious memory and if you use them then you are going to jail.

    Okay then, here is your new grass tile:

    <img src="http://dl.dropbox.com/u/529356/grass%20tile.png">

    Wowowee! It's only 64x64 pixels! Amazing. And you can tile it forever and it repeats seamlessly and everything.

    I've also updated your .cap file with all the other graphics you had in yours... take a look at it now.

    http://dl.dropbox.com/u/529356/fixed.cap

    v0.99.82

    As you can see, the tree stumps and rocks have been made into separate objects that you can put wherever you like. There is also a separate collision layer with a hidden solid tile for Sonic to run on. Now the doors of perception have been cleansed.

    On an unrelated note, you won't be able to make a Sonic game using the Platform behavior. I guarantee it. You will need to make your own platform engine using Custom Movement behavior, or by coding the whole thing from scratch with events. Also, you're very likely going to need a separate hitbox for your sprite. Per-pixel collision is bad news when it comes to platform games.

  • What the... Since when did the "*Something* of Destiny" title with a Mega Man ZX level become popular all of a sudden?

    WHAT HAVE I STARTED?!

    But, seriously, what Deadeye said. And, yeah, if you wanna make a Sonic game in Construct, don't use the platform behavior, wait for Sonic Construct Worlds to be finished, or just, well, make your own Sonic-like movement.

  • I must be one of the biggest idiots on construct.

    Anyway, thank you, I have seen where I've gone so wrong. I'll be sure to take your advice.

  • Not at all. Don't worry about it, you're not the first person to make this mistake, and you won't be the last. Not by a long shot, I would imagine.

    As for your original question about the collision masks though... There were three problems with what you were doing there. The first is that you cropped your mask down to the ground level. As far as I can tell, you shouldn't do that. Just re-draw the mask in the same space as your image, and leave the rest of the blank area untouched and uncropped. Otherwise you will have weird collision problems where the mask doesn't line up with the image. The second is that Tiled Backgrounds have box collision anyway. They don't do per-pixel. The third is that custom masks don't work on Tiled Backgrounds, for that very reason. Masks are for sprites. I'm surprised that the picture editor even allows you to edit the mask of a tile. Kinda strange, I think Davo should probably fix that.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)