Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RelCollisionSpr help, NOW PLZ!
#1
Howdy ho Richard Eric M. Lope, or anyone else off course!
I need a really quick answer to this one since I do not have access to the internet from home and I will not be around for so long, only for apox. 1 hour from now...

I'm quite new to GAME programming with Qbasic, and when I downloaded RelLib I looked at your RPG example... I've tried to add a Collision Detector to that code using the RelCollideSpr function but with no good results. Let's say collision will be detected when I 'hit' the CatFrame that you have in your code, using RelCollideSpr off course... How can I do this?

Please post some code to show me exactly how to do this... And pplleeaassee hurry! Big Grin

Cheerz!
// Thy Majesty
Reply
#2
RelcollideSpr uses two images(GET/PUT). It first checks if the bounds(box) overlap and checks the pixels only in the overlapping parts of the images.

You have to Pass the Segment and offset of both sprs. There's a good example of it in action in the examples file called Collide.bas.

Rellib\examples\collide.bas
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#3
Quote:There's a good example of it in action in the examples file called Collide.bas

I did check it out, but I didn't get much help from it thou'

Quote:You have to Pass the Segment and offset of both sprs

Errr... What are u talking about? Big Grin
I don't know how to store the X and Y position of every, let's say Tile(TileIndex(77) and Tile(TileIndex(76) on the map.
Hope you know what the heck I'm talking about... My english isn't the best you know.
Reply
#4
You don't have to store the X and y positions of the tiles. Only the Sprites(Objects) because they are moving. For collisions with the area or level, you shoulf use RelCollide.

New Rellib Ver:

http://rel.betterwebber.com/junk.php?id=22
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)