So I have been searching the entire internet for something I'm sure is simple, so here is my question. How would you get text sprites to display on the graph screen like in the game "Donut Quest"? I looked at the code but it is huge and I'm sure I looked over what i needed to notice many times. Thanks ahead of time. Oh yeah, and I guess I should mention I have a TI-84 Plus SE.
Welcome to Cemetech, Sonlen! It's pretty easy; there's basically two types of text sprites. In one, you display repeated text characters, decrementing the y-position of the character each time. In the second, you display repeated text characters, but you increment the x-position each time. That way, you either use the last row of pixels in each character (first method) or the left column of pixels in each character (second method) to build your sprite. Makes sense? Need a concrete example?
http://tibasicdev.wikidot.com/textsprites
http://tifreakware.net/tutorials/83p/b/misc/2dsprite.htm
These pages helped me with text sprites (and now I've got an rpg that is centered around them ). Welcome to Cemetech btw
http://tifreakware.net/tutorials/83p/b/misc/2dsprite.htm
These pages helped me with text sprites (and now I've got an rpg that is centered around them ). Welcome to Cemetech btw
_player1537 wrote:
http://tibasicdev.wikidot.com/textsprites
http://tifreakware.net/tutorials/83p/b/misc/2dsprite.htm
These pages helped me with text sprites (and now I've got an rpg that is centered around them ). Welcome to Cemetech btw
Do you generally use spaces to erase the non-last columns/rows of the last character, or do you pick a last character that can be left verbatim? http://tifreakware.net/tutorials/83p/b/misc/2dsprite.htm
These pages helped me with text sprites (and now I've got an rpg that is centered around them ). Welcome to Cemetech btw
I've learned how to make them, I just figured there was a lot easier way then typing in 95 characters for a row, like setting up a matrix or a string, and each string represents a function for a certain sprite so that for every number/letter calls for a text sprite.
comicIDIOT wrote:
KermMartian wrote:
Stop double-posting. If you can't edit your posts, delete your old post before you post a new post.
I am too lazy to actually make my own post so instead I quote people and then don't say anything newdragon1414@att.net / Google and Yahoo E-Mail
I personally do spaces, seeing as I haven't found any characters (in other words, I haven't looked) that have a couple spaces at the end. If you want sonlen, I can upload my text sprite helper (store the pixels to a list, and scan through all the letters) though it may only be helpful to me >.>
Edit: That's exactly what I do in my rpg
Edit: That's exactly what I do in my rpg
Actually unless I read that wrong, I have been looking for a program that does that, I have found some out there, but the links to the pages to download are dead.
comicIDIOT wrote:
KermMartian wrote:
Stop double-posting. If you can't edit your posts, delete your old post before you post a new post.
I am too lazy to actually make my own post so instead I quote people and then don't say anything newdragon1414@att.net / Google and Yahoo E-Mail
Sonlen wrote:
I've learned how to make them, I just figured there was a lot easier way then typing in 95 characters for a row, like setting up a matrix or a string, and each string represents a function for a certain sprite so that for every number/letter calls for a text sprite.
There definitely is. For example, you could make each of ten sprites be eight characters long, then put them in an 80-character string. Then, define a matrix of values, each value 1-10. To get the substring you'd need for the text sprite, it would just be sub(StrN,1+8([J](A,B)-1), for row A, column B, assuming you're using matrix [J].
@KermMartian I have one question about that code, what exactly is the 1+8 for?
@_player1537 Only one, using both would be a waste of space and make it slow down.
@_player1537 Only one, using both would be a waste of space and make it slow down.
comicIDIOT wrote:
KermMartian wrote:
Stop double-posting. If you can't edit your posts, delete your old post before you post a new post.
I am too lazy to actually make my own post so instead I quote people and then don't say anything newdragon1414@att.net / Google and Yahoo E-Mail
Sonlen wrote:
I've learned how to make them, I just figured there was a lot easier way then typing in 95 characters for a row, like setting up a matrix or a string, and each string represents a function for a certain sprite so that for every number/letter calls for a text sprite.
it's easy enough to do that. let's say you want 6*6 size tiles:
start by storing the ascii characters that are required for each tile, one after the other, in a string so that you have all the character combinations you need in a single place(in exemplarum, if you need 12 tiles for your map you would put 12 sets of 6 character tiles one after the other in a single string). next create a matrix or string that defines your tile map using numbers(0-11 since you have 12 tiles). then make a drawing engine that uses the sub command to skip to the character you wish to draw
por ejemplo, if i wish to draw tile number 11 i would do this:
:for(L,0,5
:text([y location of tile in tile map]x6,[x location of tile in tile map]x6+L,sub([str containing your tile data],[number of the tile being drawn]x6+L+1,1
:end
that +1 is there because, unlike any sane programming command, sub starts counting with the first character in the str being number 1 instead of 0
ninja'd =[
@shmibs I almost lost you between all the comments and codes, and I have just 1 question, the x6 would be there since it is 6 characters in the sprite am I correct?
comicIDIOT wrote:
KermMartian wrote:
Stop double-posting. If you can't edit your posts, delete your old post before you post a new post.
I am too lazy to actually make my own post so instead I quote people and then don't say anything newdragon1414@att.net / Google and Yahoo E-Mail
- _player1537
- Guru-in-Training (Posts: 2983)
- 25 Aug 2010 10:27:12 pm
- Last edited by _player1537 on 25 Aug 2010 10:28:04 pm; edited 1 time in total
Sonlen, I meant a string as in what KermM is saying, the one with all the characters to use for the sprites, not saying that the string will contain the map data.
The 1+8(matrix data) part is to insure that it always points to at least the first spot in a string, thus avoiding a Dim/Dom error.
Edit: that is correct , though you may want to change that to something else (I prefer 7 imo )
The 1+8(matrix data) part is to insure that it always points to at least the first spot in a string, thus avoiding a Dim/Dom error.
Edit: that is correct , though you may want to change that to something else (I prefer 7 imo )
Sonlen wrote:
@shmibs I almost lost you between all the comments and codes, and I have just 1 question, the x6 would be there since it is 6 characters in the sprite am I correct?
that is the case
@_player1537 Ahhh, I misread what you said then.
comicIDIOT wrote:
KermMartian wrote:
Stop double-posting. If you can't edit your posts, delete your old post before you post a new post.
I am too lazy to actually make my own post so instead I quote people and then don't say anything newdragon1414@att.net / Google and Yahoo E-Mail
Sonlen, I'm going to assume you know how to use matrixes, and strings (like sub() etc). Assuming that, I think it would be a fun challenge for you to write a tilemapper using only basic, and text sprites
I have thought about that, the only issue I seem to be stuck at is storing the text sprites to be recalled. I have been looking for a way for days, and I finally decided to find a forum that I could get help from.
comicIDIOT wrote:
KermMartian wrote:
Stop double-posting. If you can't edit your posts, delete your old post before you post a new post.
I am too lazy to actually make my own post so instead I quote people and then don't say anything newdragon1414@att.net / Google and Yahoo E-Mail
Try this:
"K]]]]]K[[[[[[["->Str1
and to access an element
[A](A,B)
Then to get the part of the string:
Sub(str1,1+7[A](A,B),7
Then just use that string you got from the Sub() statement to write to the screen like any normal text sprite
"K]]]]]K[[[[[[["->Str1
and to access an element
[A](A,B)
Then to get the part of the string:
Sub(str1,1+7[A](A,B),7
Then just use that string you got from the Sub() statement to write to the screen like any normal text sprite
I have thought about that, the only issue I seem to be stuck at is storing the text sprites to be recalled. I have been looking for a way for days, and I finally decided to find a forum that I could get help from.
comicIDIOT wrote:
KermMartian wrote:
Stop double-posting. If you can't edit your posts, delete your old post before you post a new post.
I am too lazy to actually make my own post so instead I quote people and then don't say anything newdragon1414@att.net / Google and Yahoo E-Mail
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
» Go to Registration page
» Goto page 1, 2, 3, 4 Next
» View previous topic :: View next topic
» View previous topic :: View next topic
Page 1 of 4
» 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
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