This is my first beta for my Mappy routine. Just really need to add in the collision detection code.
Quite a simple demo, just use the cursor keys to move around.
The graphics are processed from within the FMP file itself.
It uses a bit from Moru's routine (converted to C), and will use the collision detection routine when I get around to it!
[attachment deleted by admin]
Nice work :-)
Can the included grafics handle an alpha channel?
welcome to Battle Squadron :D
http://www.youtube.com/watch?v=6JDJOaTcpz4&feature=related
QuoteCan the included grafics handle an alpha channel?
What I do is write the RGB values to a screen (with a sprite), and set the transparency to 0, although I'll be changing that to use the transparency value in the file.
Very nice work! Runs at 1 FPS, but that is very good for not having hardware GL support on this clunker =D
Ow, what sort of computer is that? 386? :-)
Close: Athlon 1.4GHz :D (1GB RAM, GeForce4 MX 4000 64MB, XP SP2. The speed is because I am just using the drivers that came with XP SP2 (ie, no hardware GL support). No biggie as it is an internet only machine. I keep meaning to install the drivers, but I never get around to it.)
Hmm, even the 200 MHz GP2X gets at least 30 FPS with 8 layers of tiles... Has to be the drivers.
There may be a few more efficiency savings I can add to make it up to 2FPS
This should produce a fair speed increase. Also give the second one a go too :)
[attachment deleted by admin]
That second demo is nice, but there is significant slowdown when scrolling diagonally, which is quite odd.
Cant say I noted that... :S Will have to have a look there...
See if this is any better...
I've reduced some error checking that wasn't really needed, but beyond that there isn't much else to improve speed...
[attachment deleted by admin]
Tested the latest on my two dev machines. Very nice and extremely smooth. :good:
This is also a good advertisement for Mappy (which I haven't touched in years).
very strange. It's not all that smooth for me, here. It's smooth, but when I scroll to where there's less stuff, it scrolls faster.
Quote from: Kitty Hello on 2010-Apr-14
It's smooth, but when I scroll to where there's less stuff, it scrolls faster.
Yep. This ^^^. Speed definitely reduces when there are more tiles on screen, especially around the animated features.
Give this a go - removed a bit more error checking
[attachment deleted by admin]
Doesn't seem to be much of a difference really.
MrTAToad: What method are you using to control your framerate?
There isn't - its just going as fast as possible. LIMITFPS is set to -1
Using VIEWPORT does hammer the program speed, especially with 4 sections :)
There is one more bit that can simplified - I'll try that later on...
I'm getting the same result as others; the more tiles displayed the slower it goes. On an old Pentium 4 3.2GHz the processor is getting fairly well hammered.
There must be some reason for that. How much is the routine doing other than displaying the map sprites?
[edit: Nevermind. I saw you posted the code elsewhere. Thanks.]
Aside from displaying the tiles, it just animates them.
Have a look at the source code and see if you can speed it up...