Author Topic: Binary collisions  (Read 2883 times)

0 Members and 1 Guest are viewing this topic.

Offline noahbaby94

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 585
  • Rating: +29/-24
    • View Profile
    • My blog
Binary collisions
« on: February 03, 2009, 10:37:53 pm »
So I've started using celtic III so I using binary strings for tilemapping my question is how might you use them for collision detection?
That's what she said!!!

Offline Iambian

  • Coder Of Tomorrow
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 739
  • Rating: +216/-3
  • Cherry Flavoured Nommer of Fishies
    • View Profile
Re: Binary collisions
« Reply #1 on: February 04, 2009, 12:01:39 am »
You'd have to jump through a couple of hurdles, but you'd, in essence, use the "stringread" command to extract the byte that represents the tile you're moving into, the "hextodec" command to convert it to a number, then some simple tests in BASIC to determine if that number belongs to a tile that you can/cannot move into.

Beyond that and manually having to do what a matrix does internally, there's really no difference between using binary strings for the string tilemapper and using a matrix-based one found with xLIB.
« Last Edit: February 04, 2009, 12:05:59 am by Iambian »
A Cherry-Flavored Iambian draws near... what do you do? ...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Binary collisions
« Reply #2 on: February 04, 2009, 01:13:30 am »
moved to Calculator Help And Support

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
Re: Binary collisions
« Reply #3 on: February 04, 2009, 03:46:02 pm »
Iambian: do you plan on making a section on the TI|BD wiki? Or if you know of someone writing one?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Binary collisions
« Reply #4 on: February 04, 2009, 04:39:47 pm »
someone writing one?
Kalan_Vod %) (j/k)