Forums

Topic: Pixel Art

Posts 2,201 to 2,220 of 2,408

Punny

@pixelman: Congrats on post 2222!

Anyways, that fine, top-hatted gentleman should be called, "Sir Sillouette." Just a suggestion.

Edited on by Punny

I'm back (for the moment)!

retired_account

LMAO, I didn't see that. Awesome.

Maybe I'll call him Sir Twotooto the Second.

retired_account

HolyMackerel

@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

Boss fiiiiiiight!

Untitled

HolyMackerel

bro2dragons

@HolyMack: is that an eye in the background... creepy. i like it.

“I am a brother to dragons and a companion to owls." Job:30:29

Nintendo Network ID: bro2dragons

Rensch

Wow! That looks so sweet. HolyMackerel.

Friend code 3DS: 4210-4747-2358

HolyMackerel

bro2dragons wrote:

@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.

Edited on by HolyMackerel

HolyMackerel

retired_account

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

retired_account

HolyMackerel

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

Edited on by HolyMackerel

HolyMackerel

StarBoy91

That's really cool, pixelbuddy and HolyMackerel.

To each their own

retired_account

HolyMackerel wrote:

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.

retired_account

HolyMackerel

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.

As for tutorials, I learned the hard math behind this stuff through textbooks and at uni, not on the internet. Well here are a few tutorials I found anyway. I only did a quick search so you might have seen these before:
http://www.metanetsoftware.com/technique/tutorialA.html (great place to start, with pretty exhibits to play with)
http://thirdpartyninjas.com/blog/2010/07/28/sloped-platform-c...
http://www.codeproject.com/KB/GDI-plus/PolygonCollision.aspx
http://gpwiki.org/index.php/Polygon_Collision

We're cluttering up the pixel art thread with stuff that no one will understand lol.

Edited on by HolyMackerel

HolyMackerel

retired_account

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)

Untitled

Edited on by retired_account

retired_account

HolyMackerel

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.

Edited on by HolyMackerel

HolyMackerel

retired_account

Collisions? Simple? That's a good one, lol.

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.

retired_account

StarBoy91

That's actually quite good, Werble. Nice job.

To each their own

Turnip

StarBoy91 wrote:

That's actually quite good, Werble. Nice job.

eh. i don't really like it.

Cringing is really fun.

TLink9

Untitled
I made this today out of boredom.

Here is what I made in an hour on this day.
Untitled

Edited on by TLink9

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...

That's cool, TLink.


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:
Untitled

To each their own

This topic has been archived, no further posts can be added.