2D Collision

Blitz3D Forums/Blitz3D Beginners Area/2D Collision

Jaydubeww(Posted 2008) [#1]
So I need some help on collision with my player and the level itself. I’ve added gravity to the player so it would drop until it would hit the ground then stop dropping, but when the player goes down a hill, it goes down perfectly, but when I try to go back up it goes into the level and not back up the hill. Any help or tips?


Jaydubeww(Posted 2008) [#2]
OK, so I know I've only waited 1 day, so...is it good to use a .bmp made in paint as a level? or should I use data or something else? Although I dont really like the datas product or because it looks kind of "blocky" let alone know how to use it.


Cp(Posted 2008) [#3]
Use some kind of grid system, and use panels for pictures, rather than one big picture.That's the best way to do it.


GIB3D(Posted 2008) [#4]
Ooh ooh hey look at this thang I made :D!!!
http://blitzbasic.com/Community/posts.php?topic=77659

It's a 2D map editor that YOU can edit to make it your own.


Ross C(Posted 2008) [#5]
When using 2d graphics, i've always found it better to move your character horizontal first, then check collisions, then move it vertical, then check collisions. That way, you reduce the chance of your character getting stuck or falling through. Also, when collisions are detected, always record the characters previous co-ords. If a collision is detected along the horizontal, then restore the characters previous x co-ord.

Only check once for bullets and such, AFTER you've done the characters movement both ways.


stanrol(Posted 2010) [#6]
you can make terrain using data.


GfK(Posted 2010) [#7]
you can make terrain using data.
I don't know if you're taking the p***, or if there's something wrong with you, but did you really think it was worth digging up a two year old thread just to post some random and entirely useless comment about terrains, in a thread that has nothing whatsoever to do with terrains??

Oh, and PLEASE get your signature under control.


Hotshot2005(Posted 2010) [#8]
Hey stanrol

I am not being funny....cant you have all the signature links in just ONE LINKS!! It isnt hard to ask is it!