pourcelaine Posted June 4, 2006 Report Share Posted June 4, 2006 Hello again. I'm having some issues with Damizean's 360 Engine..again :e See, the problem is that his collision detection is tooprecise. What am I do to with grassy levels where the pixels kind jump all over the place? Is there a way to make detection like, smoother? Or should I just hand make smooth obstacles, and layer them with the non-obstacle grass? Help is much appreciated Link to comment Share on other sites More sharing options...
Kain Posted June 5, 2006 Report Share Posted June 5, 2006 It shouldn't be that much of an issue since it's spaced a good deal apart, a few pixels shouldn't matter, but it'd still be a little bumpy. Anyway, I don't know much of MMF (but am assuming it works the same as his GM engine), but there are three options I see. One is the simplest and is to round the angle to the nearest 15 or so degrees, but this can look jerky in loops or on slopes that could be one or the other. Next is to use a small circle to detect the slope instead of the dot. It could be a tad slower and might be hard to implement, but it'll keep the grass from effecting it too much. The last is to use the grass background as a non-collisiding tile and have a seperate, flat, invisible layer to do all the collision detecting (the way you mentioned). This is simple and peobably the best way for Game Maker, but, again, I don't know if it's worth it in TGF/MMF. Edit: A little elaboration on the first option since it's the option I'd choose if the third's too tedious: First of all, it's best to divide it into 22.5 degree segments. To round them you first divide by 22.5 then round then multiply by 22.5. That's simple enough, but to make it smoother in one of my engines, I made it to where you have to go, say, 5 + 22.5/2 pixels beyond the middle of the angle you're on to change to the next angle. This is a little tricky to implement, though, since you have to take into accound that angle1-angle2 won't always give you the correct answer. 2 Link to comment Share on other sites More sharing options...
Damizean Posted June 5, 2006 Report Share Posted June 5, 2006 Using a separated background object without collision for the grass should be enough Link to comment Share on other sites More sharing options...
pourcelaine Posted June 5, 2006 Author Report Share Posted June 5, 2006 I'll try all those (er..or try as best as I understand how XD) Maybe I should just stay away from grass. Link to comment Share on other sites More sharing options...
Asuma Posted June 5, 2006 Report Share Posted June 5, 2006 Nonsense, just make two backgrounds. 1 for the grass(which wouldn't be collided) and the regular bg, which would be collided.... Link to comment Share on other sites More sharing options...
pourcelaine Posted June 5, 2006 Author Report Share Posted June 5, 2006 Thats all good and well until you get to complicated slopes. And this engine is all about flowing movement. Link to comment Share on other sites More sharing options...
Asuma Posted June 5, 2006 Report Share Posted June 5, 2006 Do the same thing with the slope=E Link to comment Share on other sites More sharing options...
pourcelaine Posted June 5, 2006 Author Report Share Posted June 5, 2006 yar, I know, but its difficult for an entire level! Link to comment Share on other sites More sharing options...
Damizean Posted June 5, 2006 Report Share Posted June 5, 2006 Since you'll be using premade set of tiles for all the slopes kind, just start copy-pasting them Link to comment Share on other sites More sharing options...
Gamerdude Posted June 5, 2006 Report Share Posted June 5, 2006 You don't need to break them up. Why don't you just turn off the fine collisions for each of the flat pieces? That way it treats the object as a block with a flat surface instead of a block with a bunch of ridgy things on top. To do this, right-click on the background object, go to Properties, then to Obstacle. Uncheck the box that says "Collision with box". Sorry if you've already tried this method >_>. For the slopes, I've always had the grass flat on slopes anyway, but if for some reason you have the bumps on the slopes too, you may need to do what Damizean originally suggested. Treating a slope like a block would like...completely defeat the purpose of it being a slope... Link to comment Share on other sites More sharing options...
pourcelaine Posted June 6, 2006 Author Report Share Posted June 6, 2006 Then my character is walking on a floating box. Link to comment Share on other sites More sharing options...
JJames19119 Posted June 6, 2006 Report Share Posted June 6, 2006 Ugh. Just make completely black and flat (Or sloped depending on the object) backgrounds and make THEM the level. (Ie make them have collisions) Then, paste all the visual backgrounds on top. (As safety, you might wanna make sure the black backgrounds invisible) The black backgrounds will mark the "silhouette" of the level that your character can collide with. All the rest of the background can be for show and visuals. Link to comment Share on other sites More sharing options...
Rael0505 Posted June 6, 2006 Report Share Posted June 6, 2006 I prefer the way GD said. Link to comment Share on other sites More sharing options...
pourcelaine Posted June 6, 2006 Author Report Share Posted June 6, 2006 Would that save or waste memory? o.O Link to comment Share on other sites More sharing options...
Gamerdude Posted June 6, 2006 Report Share Posted June 6, 2006 It won't waste much memory, it's just a lot of extra work to do, which is why I kinda prefer my method...call me lazy, but I don't want to lay down the tiles of a level twice... Link to comment Share on other sites More sharing options...
DimensionWarped Posted June 6, 2006 Report Share Posted June 6, 2006 Then my character is walking on a floating box. Raise the bottom sensor. Link to comment Share on other sites More sharing options...
Gamerdude Posted June 6, 2006 Report Share Posted June 6, 2006 Raise the bottom sensor. Or lower the character sprite...might be easier depending on how you chose to position the character. Link to comment Share on other sites More sharing options...
Damizean Posted June 6, 2006 Report Share Posted June 6, 2006 Or just use a damn separate object for the grass, for position concordance! Link to comment Share on other sites More sharing options...
Gamerdude Posted June 6, 2006 Report Share Posted June 6, 2006 Or just use a damn separate object for the grass, for position concordance! The problem is that it gets very tedious. We're trying to suggest possible alternative methods that could significantly cut down on the workload. Either way, I'm pretty sure just about every method known has been suggested by this point >_>. Link to comment Share on other sites More sharing options...
Andrew Posted June 6, 2006 Report Share Posted June 6, 2006 I second whoever said make seperate objects. Link to comment Share on other sites More sharing options...
Rael0505 Posted June 6, 2006 Report Share Posted June 6, 2006 Yeah, it's what I do, anyway. Link to comment Share on other sites More sharing options...
Gamerdude Posted June 6, 2006 Report Share Posted June 6, 2006 I guess I'm the only lazy one :3. *sulks into special corner* Link to comment Share on other sites More sharing options...
Rael0505 Posted June 6, 2006 Report Share Posted June 6, 2006 You pansy. Anyway, it would probably be easier to just make the level and bother putting all the grass on after. Link to comment Share on other sites More sharing options...
pourcelaine Posted June 6, 2006 Author Report Share Posted June 6, 2006 XD I think I'm good guys, I'll try every method when I start level design and see what works. Thank you all! Link to comment Share on other sites More sharing options...
Recommended Posts