Collision Mask Problem

For questions about using Classic.

Post » Fri Feb 19, 2010 6:17 am

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:







Help?
B
1
G
2
Posts: 4
Reputation: 633

Post » Fri Feb 19, 2010 6:32 am

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.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Feb 19, 2010 7:00 am

Eh, sorry.

My first time using a collision mask.

Anyway:
[url:6gu2pa8d]http://www.box.net/shared/3jlosxeeik[/url:6gu2pa8d]

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

It just so it won't look...bland.
B
1
G
2
Posts: 4
Reputation: 633

Post » Fri Feb 19, 2010 7:18 am

[quote="LegendaryBlade":2gczebmx]And that tree stump IS supposed to be in the background.

It just so it won't look...bland.[/quote:2gczebmx]

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.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Fri Feb 19, 2010 9:54 am

[quote="Somebody":8qaiaz89]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.[/quote:8qaiaz89]
Exactly.



Now! LegendaryBlade, listen up!

Pay close attention!

What you are doing is [color=#FF0000:8qaiaz89]wrong[/color:8qaiaz89]!

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.

:evil: [color=#FF0000:8qaiaz89]YES THERE IS A GRAPHICS JAIL DO NOT QUESTION ME[/color:8qaiaz89] :evil:

Okay then, here is your new grass tile:



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.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Feb 19, 2010 10:30 am

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.
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Fri Feb 19, 2010 5:48 pm

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.
B
1
G
2
Posts: 4
Reputation: 633

Post » Fri Feb 19, 2010 6:47 pm

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.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests