@pix It's a mockup, but I already have my collision detection done. The game basically looks like that without the fancy decorations or user interface.
And I was gonna suggest Professor Bingley, but Sir Twotooto the Second is awesome. o.O
@HolyMack: is that an eye in the background... creepy. i like it.
Thanks, creepy is what I'm going for. Two eyes, actually - the laser is coming out of the other one. Guess I need to increase the contrast of the "whites" (or blacks?) of the eyes since they're hard to see when in front of the sky.
That's insanely cool. I think it needs some creepy trees though. D:
And would you care to tell me what algorithm you're using for collisions? I've been trying to make that kind of smooth collision detection (and response) for the past 4 years, lol.
If you don't that's fine -- I know some programmers like keeping their tricks under their hats. :3
Creepy trees are definite but I'll do them later. I didn't want to clutter the mockups with too many background objects.
The algorithm I'm using is very complicated. It's pretty accurate physically and probably isn't what you're looking for. To put it simply I've built terrain out of polygons and perform general polygon-polygon intersections with the player character's bounding box. Once an intersection has been detected I then position and re-test her position using a series of polygon-point intersections and ray casts instead of just using her bounding box, which allows partial intersection of terrain along slopes. It works very well, but it's complicated.
The simplest and most common method for player-terrain collisions is to use a hexagon, clipped rectangle (octagon) or capsule shape for the player's bounding shape. They allow you to traverse sloped terrain with minimal hassle.
Or were you thinking of a more in-depth answer? lol
Creepy trees are definite but I'll do them later. I didn't want to clutter the mockups with too many background objects.
The algorithm I'm using is very complicated. It's pretty accurate physically and probably isn't what you're looking for. To put it simply I've built terrain out of polygons and perform general polygon-polygon intersections with the player character's bounding box. Once an intersection has been detected I then position and re-test her position using a series of polygon-point intersections and ray casts instead of just using her bounding box, which allows partial intersection of terrain along slopes. It works very well, but it's complicated.
That sounds rather similar to what I was thinking of doing: Store polygons for the terrain, and check for collisions. I'm just not sure how to do response. Have you done anything special for corners?
The simplest and most common method for player-terrain collisions is to use a hexagon, clipped rectangle (octagon) or capsule shape for the player's bounding shape. They allow you to traverse sloped terrain with minimal hassle.
That's interesting, I've never heard of it before. Would the terrain be stored as a bitmap or polygons? I don't suppose you have an article or anything handy that goes into this with a bit more detail? Minimal hassle sounds good to me, lol.
Believe me when I say I've accumulated full days of searching google on the subject of collisions. I can find physics-based collisions, but they usually have problems with the player sliding down slopes (like N+), which is not what I want. I've done tile based stuff before with slopes using y = mx + b, but tiles are really limiting you want to make something like I drew above.
Ah, okay. My character has two modes: in air and on the ground. In the air, she is mostly physically realistic. On the ground, she has a different set of rules which allow her to walk and stand rather than roll down slopes (lol). Does that help? Trust me, I spent over a week thinking about how to do this. I'm glad it all worked out in the end, haha.
As for storing collision information. Bitmap collision data will only work for straight horizontal/vertical surfaces since pixels are, well square. (Unless you use some complex algorithms to generate polygons out of the pixel data. Yikes.) You can also do some sort-of diagonal and curved collisions but it's kind of a hack. Still, that works fine for tile-based games with simpler collisions and level shapes. But if you want curved and irregular slopes then you need to use polygons. (Unless you have a lot of very small intricate tiles xD) The player bounding shapes I suggested are only for polygon collisions, of course.
Yep I've seen the top one. I've implemented the second one before for my tile-based system, but it's not really polygon collision.
I actually started making a platformer with someone before using the SAT algorithm, but we had issues with stuff sliding down slopes since we were constantly applying gravity. However, if you don't apply gravity, then you run into some ridiculous issues like walking into the air or inside platforms. Constantly checking to see if there's ground below you seemed hacky and unreliable. My mind exploded at that point.
I had an idea where I'd simply check for line collisions and if the line is basically horizontal, simply move the player's midbottom to the "top" of the line, and if it's vertical treat it like a wall. This would work absolutely fine except where lines meet and form corners -- this is where I hit a wall (ha). I was thinking I could find the player's penetration and perhaps use that to move him out of the corner, but I'm not sure how I'd do that or how well it'd work.
Edit: Here's a rough sketch of what I'm talking about. Red lines indicate ground, blue indicate walls. The purple is the intersection. The arrow shows how he's falling. I'm thinking I could just correct him by the smallest axis' penetration. (in this case he'd correct by the y axis, so he'd move up to the top)
Oh I see. That picture looks painful. For corners like that I have a specific set-up which solves that problem. And... I'd be giving away secrets I had to think for weeks on end to figure out!
In essence you want to figure out which collision occurs first - his side or his feet. If his side collides first, pop him out sideways. If his feet collide first, pop him out upwards and land him on the ground. Easiest way is to use separate collision shapes for his feet and his body. Simple enough?
EDIT: Smallest axis would also work generally and would be less intensive. Try it out and see if it works.
I'll probably figure it out eventually. I had a really nice system back when I was just using rectangles, where I'd check for collisions each time an axis moved and perform one dimensional corrections. This doesn't work for slopes though.
That is TLinkerbell to you! [17:17] theblackdragon: considering i have neither an xbox nor a ps3 :3 [17:17] Corbie: Nintendo fangirl alert!!!! [17:17] James Newton: Uh oh The James Ne...
I made this banner for my Backloggery on New Year's Eve to celebrate New Year's; I started it that morning and finished it that afternoon. I thought I would share it with NintendoLife, I hope you all like it:
Forums
Topic: Pixel Art
Posts 2,201 to 2,220 of 2,408
This topic has been archived, no further posts can be added.