Author Topic: Grappler!  (Read 26800 times)

0 Members and 2 Guests are viewing this topic.

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Grappler!
« Reply #180 on: December 16, 2011, 10:50:29 pm »
* epic7 scans
You mean for how fast the velocity is, the farther down and larger area to check for pixels?
exactly. (so it doesn't accelerate through stuff) :)

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Grappler!
« Reply #181 on: December 16, 2011, 10:52:46 pm »
Parser's right ^
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #182 on: December 16, 2011, 11:04:05 pm »
That's exactly what I tried! However it always detected a pixel and tragically failed. I thought I was using the wrong strategy. I guess I was right!

I still have that code commented out in grappler, so I'll tweak untill I give up or fix it.

In other news, this has been my 1000th post!
« Last Edit: December 16, 2011, 11:21:11 pm by epic7 »

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Grappler!
« Reply #183 on: December 16, 2011, 11:05:28 pm »
That's exactly what I tried! However it always detected a pixel as tragically failed. I thought I was using the wrong strategy. I guess I was right!

I still have that code commented out in grappler, so I'll tweak untill I give up or fix it.

In other news, this has been my 1000th post!

Haha this is my first ever working attempt at accurate collision detection. I have seriously tried >9001 times.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Grappler!
« Reply #184 on: December 16, 2011, 11:08:21 pm »
Butts that's a pretty inefficient way, though. It means that the faster you go, the more checks it will take and the slower it will go.
In-progress: Graviter (...)

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Grappler!
« Reply #185 on: December 16, 2011, 11:09:14 pm »
Butts that's a pretty inefficient way, though. It means that the faster you go, the more checks it will take and the slower it will go.

Eh, it was the only way I could think of for purely pxl-test based collisions. I'm sure tilemap collisions are more efficient.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #186 on: December 16, 2011, 11:09:43 pm »
What the efficient way?

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Grappler!
« Reply #187 on: December 16, 2011, 11:10:25 pm »
Butts that's a pretty inefficient way, though. It means that the faster you go, the more checks it will take and the slower it will go.
Eh, it was the only way I could think of for purely pxl-test based collisions. I'm sure tilemap collisions are more efficient.

From my experience it's usually faster to move the object by all the velocity, then move it backwards pixel by pixel until it stops colliding.
In-progress: Graviter (...)

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Grappler!
« Reply #188 on: December 16, 2011, 11:10:48 pm »
Well, the thing about tilemap collisions is that it's harder to support things like slopes and really small tiles. In a tilemap based system, you collide with tiles regardless of whether or not you chose to display them.
« Last Edit: December 16, 2011, 11:11:14 pm by buttsfredkin »
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #189 on: December 16, 2011, 11:12:13 pm »
That's a good idea :D

Would you reccomend pxltests or tilemap collisions?

My tilemaps are all 8x8 square that all collide with the guy
« Last Edit: December 16, 2011, 11:12:52 pm by epic7 »

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Grappler!
« Reply #190 on: December 16, 2011, 11:14:48 pm »
That's a good idea :D

Would you reccomend pxltests or tilemap collisions?

Personally, I'd go for the pxltests, however you want to implement it. Leafy, the way I see it a problem with that way is that if you want to have really thin tiles, like a line, you might end up accelerating right through them.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #191 on: December 16, 2011, 11:17:40 pm »
And Ill have bricks that have a border but on the inside will be somewhat empty.
So it might stop colliding early with leafy's.

But... If I wanted to, how would I do a tilemap collision?
« Last Edit: December 17, 2011, 12:09:07 am by epic7 »

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Grappler!
« Reply #192 on: December 17, 2011, 04:50:32 pm »
uh...I would PM BuilderBoy or leafiness0. I know how to do it in theory, but have yet to implement it.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #193 on: December 17, 2011, 05:30:56 pm »
I think I'll probably use leafy's strategy from above and try to tweak the tiles so it won't stop colliding early.
« Last Edit: December 17, 2011, 05:32:15 pm by epic7 »

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Grappler!
« Reply #194 on: December 17, 2011, 10:09:56 pm »
You could also just cap the "terminal" velocity of the character.  This would limit the checking so it would have a maximum of places to check.  For instance, if you capped your Yvelocity var at 512, the character could only move a maximum of two pixels down per frame (assuming *256 inflation).

As for tilemap based collisions, check here: http://ourl.ca/4279/169823