Author Topic: Map Collision Detection Demo  (Read 4638 times)

0 Members and 1 Guest are viewing this topic.

Offline valis

  • C= 64
  • **
  • Posts: 35
  • Karma: -6
    • View Profile
Map Collision Detection Demo
« on: January 21, 2011 »
The collisions are broken in a couple of ways but I think they're quite literally corner cases having to do with the fact that the colliding objects are points with 0 width and height.  Will implement collision of all four corners in the colliding square, though I vaguely forsee some more problems that may come from that.  Perhaps it will make things easier, however, because I will be able to simply revert to oldx, oldy.  Maybe this needs some sort of Verlet integration to do it in the easiest way possible.

Code: [Select]
Source removed; not everyone has blitz installed.  Sorry to be a bother, the last thing I want is to annoy anybody.
« Last Edit: January 28, 2011 by valis »

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Map Collision Detection Demo
« Reply #1 on: January 21, 2011 »
Interesting, nice touch with the moving background.

Offline va!n

  • Pentium
  • *****
  • Posts: 1432
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: Map Collision Detection Demo
« Reply #2 on: January 21, 2011 »
After running for about 2 seconds, it crashes here on Win7 x64 with following message:

"Windows Exception: EXCEPTION_ACCESS_VIOLATION"
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: Map Collision Detection Demo
« Reply #3 on: January 22, 2011 »
Nice one and (@zawran) thanks for the exe.

I think it would be cool if the particles die when they are at the bottom level, That way
it would be more interesting following their path.

Background is indeed quite kewl, too!
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1217
  • Karma: 230
    • View Profile
    • Homepage
Re: Map Collision Detection Demo
« Reply #4 on: January 22, 2011 »
Good stuff, but I get the same error as va!n, using Windows 7.
www.kirl.nl
Challenge Trophies Won:

Offline valis

  • C= 64
  • **
  • Posts: 35
  • Karma: -6
    • View Profile
Re: Map Collision Detection Demo
« Reply #5 on: January 22, 2011 »
That's strange because I don't have the problem on windows 7.

NO idea.  Are you compiling from source or using the one Zawran built?

It's not that important anyway and frankly the demo is not that interesting, I only put it here for people who might want to learn how to do tilemap collisions.