View Full Version : 2 layer scrolling
Michael Clease
28-10-2012, 13:04
Here is a quick and rough demo of a two layer sprite based scrolling demo, it needs a lot of work but it shows whats possible.
I am still working on the tiles and the scroll routine.
Update :
08-nov-2012 - I have now finished my simple scroll routines that should be easy and flexible to use with the sprite system.
added cursor key support up,down,left,right.
next step clean up code and release.
25-Nov-2012 - Code has been cleaned up and is ready for release it has room for improvement and the map could be enhanced by adding the dimensions to the data file(map wdith/height and tile width/height). Have fun
Petr Schreiber
28-10-2012, 19:00
Very nice,
framerate is about 400 FPS on my GeForce G210M.
Petr
Oscar Ugolini
28-10-2012, 21:36
nice work! :)
Oscar
ErosOlmi
03-11-2012, 08:24
Michael,
sorry, I missed your great example.
But is it thinBasic developed? :D
Quite impressive. Here FR is quite fixed on 60FPS
I'm looking at your private suggestion ... ;)
Thanks
Eros
Petr Schreiber
03-11-2012, 16:52
Hi Eros,
I think your FPS is locked at 60FPS because your display is 60Hz and you have enabled V-sync (Vertical synchronization) in OpenGL settings of your GPU.
Petr
ErosOlmi
03-11-2012, 18:08
Right you are.
Set vSync off and now it runs at 700 FPS
Michael Clease
03-11-2012, 22:09
Thank you everyone, I have been tweaking it and now have a better speed control system.
Eros would you be as impressed if i had submitted this version.
Michael Clease
08-11-2012, 02:29
updated original thread
Click Me (http://www.thinbasic.com/community/showthread.php?11917-2-layer-scrolling&p=87415&viewfull=1#post87415)
ReneMiner
08-11-2012, 04:31
cool, when can i play the next level? :good:
Petr Schreiber
08-11-2012, 10:05
Does this example use periodic function? It has very low CPU usage here.
Petr
Michael Clease
08-11-2012, 11:09
Rene, I will be giving you the code so you can create your own.
Yes I tried clamping the framerate at about 20-30 fps.
Petr, I will send you the script for any tips you might have.
Mike C.
Michael Clease
25-11-2012, 23:54
updated original thread
Click Me (http://www.thinbasic.com/community/showthread.php?11917-2-layer-scrolling&p=87415&viewfull=1#post87415)
ReneMiner
26-11-2012, 00:07
sorry, but where are the textures? cannot find them :(
Michael Clease
26-11-2012, 00:08
As I said I would post the script, you can add your own textures.