Author Topic: Smoothscrolling tilemapper  (Read 36235 times)

0 Members and 1 Guest are viewing this topic.

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: Smoothscrolling tilemapper
« Reply #15 on: November 05, 2010, 08:16:19 pm »
Wait didn't you make a smoothscrolling parallax scrolling mapper for your ball game? o.O
Yeah but that isn't a real tilemapper. It's like two rows of tiles displayed at specific locations, not a full grid-based tilemapper.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Smoothscrolling tilemapper
« Reply #16 on: November 06, 2010, 11:45:13 am »
Ouch, the one I'm using for A:P is only 8 fps. Does not redraw every frame, walking up/down is slightly slower than right/left. But mine also uses 12x12 masked grayscale tiles..so that means it's drawing 64 masked tiles per frame walking up and 56 when walking side to side x.x
« Last Edit: November 07, 2010, 05:20:23 pm by squidgetx »

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: Smoothscrolling tilemapper
« Reply #17 on: November 07, 2010, 01:08:42 am »
Oh btw, I forgot to specify something, the thing Supersonic Ball to draw stuff that looks like a tilemap draws 65 tiles per frame.

1) The background (Parralax scrolling) is made of 13 tiles, which are copied on the rest of the screen with Copy() to save a considerable amount of time.
2) The ceiling, made of 26 tiles, 13 of which are always plain black, drawn on the back buffer, for collision detection.
3) The floor (same way) :P

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Smoothscrolling tilemapper
« Reply #18 on: November 07, 2010, 05:22:50 pm »
Come to think of it, 8 fps is quite nice with having to draw over 50 tiles per frame with Pt-Mask() as opposed to Pt-On() or Pt-Off() and with 3lvl gray. Maybe I should try regular 8x8 monochrome and see how fast it gets :P

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Smoothscrolling tilemapper
« Reply #19 on: November 07, 2010, 05:46:19 pm »
Regular 8x8 monochrome seems to work pretty fast for me. I get about 60 fps scrolling for the most part (about 75 for aligned vertical scrolling). The screen is updated after every arrow key has been checked and the buffer image has been scrolled for each pressed key.

The screenshot will probably appear to have more blocky movement and/or move slower, but the above statistics are correct.
« Last Edit: November 07, 2010, 06:51:51 pm by Runer112 »

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: Smoothscrolling tilemapper
« Reply #20 on: November 07, 2010, 05:52:15 pm »
Wow that's fast! Is that drawing 96 tiles per frame?

One thing I dislike with the calc data is that when not aligned, it takes much longer to display than when aligned, so horizontal scrolling games seems a bit slower than if they just scroll vertically.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Smoothscrolling tilemapper
« Reply #21 on: November 07, 2010, 05:53:39 pm »
One thing I dislike with the calc data is that when not aligned, it takes much longer to display than when aligned, so horizontal scrolling games seems a bit slower than if they just scroll vertically.
If you want it to be the same, you can use ClrDraw:Pt-On() instead of Pt-Off(). :)

That looks great Runer.  Can you post the source?  It's sure fast. ;D

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: Smoothscrolling tilemapper
« Reply #22 on: November 07, 2010, 05:56:35 pm »
Could you clarify what you mean? ??? Do you mean Pt-On doesn't slow down when not aligned?

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Smoothscrolling tilemapper
« Reply #23 on: November 07, 2010, 05:57:14 pm »
That looks really sweet Runer :)

Z, didn't you have a smoothscrolling engine a long time ago with an early Axe version?
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Smoothscrolling tilemapper
« Reply #24 on: November 07, 2010, 06:05:20 pm »
Wow i am astounded by the speed you get! O.O How in the world do you do that?  I did some tests and displaying 96 sprites every frame yielded a 22 FPS at the worst case scenario, and 60 FPS at best case scenario (alligned)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Smoothscrolling tilemapper
« Reply #25 on: November 07, 2010, 06:06:30 pm »
Could you clarify what you mean? ??? Do you mean Pt-On doesn't slow down when not aligned?
Pt-On has the same speed because it does not speed up if it is aligned. :)

Z, didn't you have a smoothscrolling engine a long time ago with an early Axe version?
http://ourl.ca/4161/79940
« Last Edit: November 07, 2010, 06:08:13 pm by ztrumpet »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Smoothscrolling tilemapper
« Reply #26 on: November 07, 2010, 06:09:55 pm »
Pt-On has the same speed because it does not speed up if it is aligned. :)

Hmm tests would say otherwise, i got 60FPS with PtOn(0,0) 96 times, and 22 FPS with PtOn(7,7) 96 times

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Smoothscrolling tilemapper
« Reply #27 on: November 07, 2010, 06:11:55 pm »
Pt-On has the same speed because it does not speed up if it is aligned. :)

Hmm tests would say otherwise, i got 60FPS with PtOn(0,0) 96 times, and 22 FPS with PtOn(7,7) 96 times
Okay, looks like I'm wrong.  :-[ Sorry.
(I think I must be remembering from a previous version of Axe or something.  :-\)

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Smoothscrolling tilemapper
« Reply #28 on: November 07, 2010, 06:24:24 pm »
My program only draws tiles as they scroll onto the screen. That means it's drawing at most 13 8x8 tiles per frame. This means you couldn't have animated ground tiles, but it would work great for static ground tiles. It could also be easily extended to working with grayscale tilemaps.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Smoothscrolling tilemapper
« Reply #29 on: November 07, 2010, 06:29:13 pm »
My program only draws tiles as they scroll onto the screen. That means it's drawing at most 13 8x8 tiles per frame. This means you couldn't have animated ground tiles, but it would work great for static ground tiles. It could also be easily extended to working with grayscale tilemaps.

can you post the source? great job on the speed