Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: billthecat on November 02, 2007, 04:38:00 pm

Title: sprite map maker
Post by: billthecat on November 02, 2007, 04:38:00 pm
really easy sprite map maker for xlib. you put the sprites on a map, and it makes the matrix for you. supports multiple pic files (and all 256 pics) on one map. supports 8x8 and 16x16 sizes. i believe its already finished. you can email me at [email protected] if you wanna have it, im not going to bother uploading it to any site. most of all, its easy

Title: sprite map maker
Post by: DJ Omnimaga on November 02, 2007, 05:16:00 pm
well i can always add it to this site when I get some time if you want. But I don't understand how you can get all 256 pics support on one map, because if i remember xLIB didn't grabbed sprites further than 3 pics away, for example if the main pic used for the map was 1 you could grab sprites from pic 2 and 3 but not the others
Title: sprite map maker
Post by: billthecat on November 03, 2007, 03:31:00 am
QuoteBegin-DJ Omnimaga+2 Nov, 2007, 22:16-->
QUOTE (DJ Omnimaga @ 2 Nov, 2007, 22:16)
well i can always add it to this site when I get some time if you want. But I don't understand how you can get all 256 pics support on one map, because if i remember xLIB didn't grabbed sprites further than 3 pics away, for example if the main pic used for the map was 1 you could grab sprites from pic 2 and 3 but not the others  

 thats not what i meant i just meant you can access any of the 256 pics, but not on one map  :paf:tripaf.gif:paf:tripaf.gif:paf:tripaf.gif
Title: sprite map maker
Post by: DJ Omnimaga on November 03, 2007, 03:51:00 am
ah ok I see you edited your post now (it was saying 256 pics on one map) <_<dry.gif thanks for claryfying up :Ptongue.gif
Title: sprite map maker
Post by: billthecat on November 03, 2007, 04:29:00 am
this is what it looks like

first you have your sprite sheet
user posted image

you paste the sprites onto your map
user posted image

and you have your completed matrix!
user posted image
Title: sprite map maker
Post by: nitacku on November 03, 2007, 05:55:00 am
QuoteBegin-DJ Omnimaga+2 Nov, 2007, 22:16-->
QUOTE (DJ Omnimaga @ 2 Nov, 2007, 22:16)
well i can always add it to this site when I get some time if you want. But I don't understand how you can get all 256 pics support on one map, because if i remember xLIB didn't grabbed sprites further than 3 pics away, for example if the main pic used for the map was 1 you could grab sprites from pic 2 and 3 but not the others  

 It only supports up to 256 sprites.
Since pictures can hold 96 sprites each, 256/96 = 2.666667 or in other words 2/3 of the third picture.

Now if you are working with 16x16 sprites, each picture can hold 24 sprites.
Therefore 256/24 = 10.666667 meaning up to 2/3 of the eleventh picture.
Title: sprite map maker
Post by: DJ Omnimaga on November 03, 2007, 03:06:00 pm
nice billithecat, does it supports 8x8 sprites too?
Title: sprite map maker
Post by: billthecat on November 04, 2007, 04:31:00 am
ya it does, and now it has a collision detection generator that lets you box in the collision surfaces. it puts them in a string so you can just do if not(expr(str1:then:collision logic....

i have two questions.. does the length of the string affect the time it takes to expr( the string? and does if .. and .. take less time than if ... :then if ...
Title: sprite map maker
Post by: Halifax on November 04, 2007, 07:28:00 am
You realize you can always time these things yourself. ;)wink.gif
I don't think anyone would really know, off the hand.
Title: sprite map maker
Post by: billthecat on November 04, 2007, 08:22:00 am
ok here is the collision mapper
user posted image

and here is your collision detector string!
user posted image

all you have to do is in your keypress loop put
 x->e:y->f:if not(expr(str1:then:x+d->x
(d is number of px to move) and if there is a collision, your character will not move, otherwise, he'll move!
very easy to use.