/me thinks you will like my new sprite routine which is blazing fast. it requires more work to make the sprites, but is much faster than hex sprites. :-p
Gonna make a tutorial on it?? Wink lol
Neutral

I will post it here if you want.

Its incredibly fast, Im going to be using it for an Turn Based Strategy game that rerenders the map every time you scroll
elfprince13 wrote:
Its incredibly fast


I just timed it, and it rendered 96 8*8 sprites in 20 seconds with no optimizations on the drawing loop.
Shock WTF! That's pwny.
KermMartian wrote:
Shock WTF! That's pwny.


Very Happy and it averages around 110 bytes per sprite.

My guess is it would be even faster to render with 16*16, since thats a quarter the number of tiles on a map, while still using a fairly small bit of code.

35ish lines of code gets you a ship, a plane, a city, a tank, and a truck.


and for download:

http://rancidmoose.unitedti.org/members/so...lc/RTSPRITE.zip


actually making the sprites is as follows:

First you try to see the lines (and individual pixels if you can find groups of 2) in the sprite, but without overlapping if possible.
Second you use a for loop to transform half the lines to the other half.

if you have one extra line or one extra pixel, stick that outside the loop.

if you have both, just put the line inside the loop, and make it so the start and endpoint are the same second time around.
Have you tried that out on an actual calculator?
thats what I wrote it on. and no, I didn't enhance the screenshot.
Yes, you showed me this before. And I have used the same technique before, but never got the resaults. The only question is. are these very reliable sprites? Can one move them around with out having to reset the screen all the time?
yup. the speed is the secret of this routine. and it lies in the fact that every monchrome sprite can be divided up into lines. and the total number of lines will always be a multiple of 2, or a multiple of 2 +1.

This means a For() loop can be used to dramatically reduce code, and thus the amount of time the parser has to spend skipping lines looking for :End
so how exactly does this work. because it would be awsome if i could program sprites that fast.
lafferjm wrote:
so how exactly does this work. because it would be awsome if i could program sprites that fast.


see my tile mapping routine (its in this subforum). It should convert easily to 83 basic.
Ah yes, I used this method for sprites in a few of my programs. Nice work.
KermMartian wrote:
Ah yes, I used this method for sprites in a few of my programs. Nice work.


you realise how old this right? see the newer topic...
elfprince13 wrote:
KermMartian wrote:
Ah yes, I used this method for sprites in a few of my programs. Nice work.


you realise how old this right? see the newer topic...
Oh, I thought you had resurrected this topic to announce that new project of yours. My mistake.
KermMartian wrote:
elfprince13 wrote:
KermMartian wrote:
Ah yes, I used this method for sprites in a few of my programs. Nice work.


you realise how old this right? see the newer topic...
Oh, I thought you had resurrected this topic to announce that new project of yours. My mistake.


nope, thats an entirely new project Wink
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement