Author Topic: Correct way to do smooth scrolling in a tilemapper?  (Read 9500 times)

0 Members and 1 Guest are viewing this topic.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Correct way to do smooth scrolling in a tilemapper?
« Reply #15 on: December 20, 2012, 12:27:42 pm »
It's worthy to note that smoothscrolling should not affect collision in any way, since scrolling is just a graphical effect.

Offline BrownyTCat

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 420
  • Rating: +37/-8
    • View Profile
Re: Correct way to do smooth scrolling in a tilemapper?
« Reply #16 on: December 20, 2012, 12:40:12 pm »
The way I had the "smoother" set up in my original code was that it advanced the actual "X" by 1 once the offset reached 8 (or reduced it by 1 when the offset hit -8). I had problems with not being able to check horizontally and vertically, and everything eventually hit the fan. It should be obvious how poor I am at this if you check the original source at the end of this thread. My method was probably horribly incorrect, but I can't find a simple way to pull off movement that's not in multiples of 8, as I am the worst mathematician to exist.
Also, how do you actually display a variable in Axe? It just shows garbage symbols due to pointers, but I was sure a function existed to convert to string. I can just never find it. In BASIC, it's usually just:
Code: [Select]
Disp X

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Correct way to do smooth scrolling in a tilemapper?
« Reply #17 on: December 20, 2012, 12:55:55 pm »
You should check out the command list for Axe, it has all sorts of useful information like that :D you can use the >Dec command to display the value of a number instead of a string