Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: guy6020665 on January 04, 2011, 11:47:38 pm

Title: Ti-Basic Custom Graphics
Post by: guy6020665 on January 04, 2011, 11:47:38 pm
I've been wondering how many games have been made in Ti-Basic using the graphscreen and custom graphics. I know of;

FFTOM 1
FFTOM 2
and Contra

are there any others? If so, do any of them use some sort of utility that allow making custom graphics easily?

I am thinking of making a program that stores the location of pixels into lists, and then graphing them quickly using Stat plots, but if there's a program out there that does the same thing, I would like to use it as reference.
Title: Re: Ti-Basic Custom Graphics
Post by: Hot_Dog on January 05, 2011, 12:03:21 am
If I can offer an alternative, you might try Omnicalc, which lets you make a custom font.  It comes with a designer, and you can change some of the characters of the Ti-83+ font into graphics.
Title: Re: Ti-Basic Custom Graphics
Post by: Eeems on January 05, 2011, 12:05:09 am
Well you could go hybrid (xLib and such), or use stat plots as you said, pic vars also work, because they are or'd onto the screen. Text Sprites also work for quick graphics.
Title: Re: Ti-Basic Custom Graphics
Post by: meishe91 on January 05, 2011, 12:07:38 am
Well there is also Builder's Serenity, Portal, Shift (though that uses xLib I believe), Peggle, Six (I think that's what it's called), and Spider. Also Z has Exodus and has been making a game called Elmgon. There is Donut Quest II. I don't know if those are what you meant but it sounds like those fall into what you asked for.
Title: Re: Ti-Basic Custom Graphics
Post by: Builderboy on January 05, 2011, 12:11:56 am
Well there is also Builder's Serenity, Portal, Shift (though that uses xLib I believe), Peggle, Six (I think that's what it's called), and Spider. Also Z has Exodus and has been making a game called Elmgon. There is Donut Quest II. I don't know if those are what you meant but it sounds like those fall into what you asked for.

Six Differences is what you're thinking of, and it used a method very near to what Contra Did if i remember correctly.  There is also Metroid PI, which was a huge inspiration on Serenity :D But yeah, all of the programs mentioned here are great examples of Pure basic giving great custom graphics on the graph screen.
Title: Re: Ti-Basic Custom Graphics
Post by: guy6020665 on January 05, 2011, 12:13:40 am
Thanks for the replies guys, I will try these out soon, though probably not tonight. While we're at it, is there any utility made in pure Ti- Basic? My computer is down and no other computer that i have access to has the correct port for the calc-comp cable.
Title: Re: Ti-Basic Custom Graphics
Post by: meishe91 on January 05, 2011, 12:15:31 am
A utility for doing what?

And ah, just forgot the "Differences" part. Thanks.
Title: Re: Ti-Basic Custom Graphics
Post by: Hot_Dog on January 05, 2011, 12:16:44 am
A utility for doing what?

"I am thinking of making a program that stores the location of pixels into lists, and then graphing them quickly using Stat plots, but if there's a program out there that does the same thing, I would like to use it as reference"
Title: Re: Ti-Basic Custom Graphics
Post by: meishe91 on January 05, 2011, 12:23:01 am
Oh, sorry. I've never heard of a program that does that though I don't think it would be very hard to make, only thing is that the lists would get really big depending on what you're storing. I did make a Line Compression program for MRide a while ago (that I posted in it's own topic too) if you wanna look at that.

If I understand correctly you just want to take a image, run the program, and it converts the image into a list that contains the coordinates of each pixel?
Title: Re: Ti-Basic Custom Graphics
Post by: guy6020665 on January 05, 2011, 12:24:54 am
Something similar to that yeah, kind of want it to work like your spriter, where you can choose the size, and then it stores to 2 lists with coodinates rather than in a string in hex.
Title: Re: Ti-Basic Custom Graphics
Post by: Hot_Dog on January 05, 2011, 12:27:28 am
I'll admit, I never stop being amazed at what people can do with Ti-Basic
Title: Re: Ti-Basic Custom Graphics
Post by: guy6020665 on January 05, 2011, 12:32:04 am
I never realized the potential of Ti-Basic until after losing the ability to create Axe programs.
Title: Re: Ti-Basic Custom Graphics
Post by: meishe91 on January 05, 2011, 12:35:27 am
Ah ok. Well it honestly probably wouldn't be to hard to create a simple program to do that. I'll try to make one real fast.
Title: Re: Ti-Basic Custom Graphics
Post by: guy6020665 on January 05, 2011, 12:52:35 am
I'm working on one, I have a choice of size, switching pixels on/off, a box to show the area where you can draw, and storing to lists.
Title: Re: Ti-Basic Custom Graphics
Post by: meishe91 on January 05, 2011, 01:01:19 am
Ok, made one real fast to maybe help or something. It isn't a big program, just a program that converts something in the top left corner.

Note:
I just made this with zero stored to Xmin and Ymax, ninety-four stored to Xmax, and negative sixty-two stored to Ymin since that is what my calculator always has.

Code: (Picture to List) [Select]
Prompt X,Z
1→C
If XZ>999
Stop
For(A,0,Z-1
For(B,0,X-1
If pxl-Test(B,A
Then
-B→L2(C
A→L1(C
C+1→C
End
End
End

All it does is take a picture that starts at coordinates (0,0) and goes stores pixels to list one and list two. The input at the beginning for X and Z is the dimensions of the image, I use Z instead of Y to avoid bugs in the program.

If you want to use said image in a program but it isn't starting at (0,0) then just find out where you want it to start and do this on the homescreen:

Code: [Select]
X+L1→L1
Y+L2→L2
Title: Re: Ti-Basic Custom Graphics
Post by: guy6020665 on January 05, 2011, 01:07:50 am
This works too, I think I was trying too hard now.
Title: Re: Ti-Basic Custom Graphics
Post by: Hot_Dog on January 05, 2011, 01:08:41 am
This works too, I think I was trying too hard now.

It's always good to try yourself as it helps you learn.  But we are also very eager to help people out :D
Title: Re: Ti-Basic Custom Graphics
Post by: AngelFish on January 05, 2011, 01:13:42 am
Something similar to that yeah, kind of want it to work like your spriter, where you can choose the size, and then it stores to 2 lists with coodinates rather than in a string in hex.

The only thing to watch out for is the fact that lists can only hold 999 numbers. If you store 1 coordinate per list variable, then with two lists you'll be limited to 999 pixels. That might sound like a lot, but for comparison the graph screen has 5985 pixels available.
Title: Re: Ti-Basic Custom Graphics
Post by: guy6020665 on January 05, 2011, 01:15:21 am
999 numbers max? Never knew about that. Nice to know, although i don't think many lists will even reach near that many.
Title: Re: Ti-Basic Custom Graphics
Post by: AngelFish on January 05, 2011, 01:17:29 am
I've actually run into that limitation in programs before  :P
Title: Re: Ti-Basic Custom Graphics
Post by: guy6020665 on January 05, 2011, 01:19:46 am
The mark of a zealous programmer.
Title: Re: Ti-Basic Custom Graphics
Post by: meishe91 on January 05, 2011, 01:20:48 am
Ya, that's why I have the If XY>999 line in mine. But I should change it to something else really haha.

Edit:
Code: [Select]
DelVar CPrompt X,Z
For(A,0,Z-1
For(B,0,X-1
If pxl-Test(B,A
Then
C+1→C
If C>999
Stop
-B→L2(C
A→L1(C
End
End
End

There, that should be better :P

Edit:
Shaved off a byte :P
Title: Re: Ti-Basic Custom Graphics
Post by: guy6020665 on January 05, 2011, 01:25:28 am
Allows use of bigger pictures, nice job meishe91.
Title: Re: Ti-Basic Custom Graphics
Post by: meishe91 on January 05, 2011, 01:26:12 am
Thanks :)
Title: Re: Ti-Basic Custom Graphics
Post by: DJ Omnimaga on January 05, 2011, 04:00:21 am
Thanks for the replies guys, I will try these out soon, though probably not tonight. While we're at it, is there any utility made in pure Ti- Basic? My computer is down and no other computer that i have access to has the correct port for the calc-comp cable.
For small ASM libraries you can actually use this (http://asmtools.omnimaga.org/) to retrieve the HEX code from an ASM program, then type it on your calc and use AsmComp(prgmNAME1,prgmNAME2). Most ASM utilities using the Asm() command aren't very reliable, speed-wise, though.
Title: Re: Ti-Basic Custom Graphics
Post by: guy6020665 on January 05, 2011, 03:25:04 pm
Cool, when did this site come up?
Title: Re: Ti-Basic Custom Graphics
Post by: DJ Omnimaga on January 05, 2011, 08:35:49 pm
A bit under one year ago, if I remember. There was another one in 2002-04 but the server shutted down.
Title: Re: Ti-Basic Custom Graphics
Post by: ztrumpet on January 05, 2011, 09:56:26 pm
Boost (see link in my sig if you're unfamiliar with it) uses a method very close to what you're doing. Instead of using pixels, it uses lines.  It just uses a different type of Plot Sprites. :)
Title: Re: Ti-Basic Custom Graphics
Post by: meishe91 on January 06, 2011, 01:25:37 am
Well wouldn't it still be the same plot sprite just a different graph type?
Title: Re: Ti-Basic Custom Graphics
Post by: DJ Omnimaga on January 06, 2011, 02:12:26 am
I remember back in the days I attempted a racing game using stat plot graphics. It had decent speed but I never figured out how to do pixel collision detection since the car could move at more than 1 pixel interval.
Title: Re: Ti-Basic Custom Graphics
Post by: meishe91 on January 06, 2011, 03:39:26 am
You could have connected the collision detection routine to the moving routine, so when you move at more than one pixel at a time it adjusts the collision to detect the correct ones. At least in theory I think that would work.
Title: Re: Ti-Basic Custom Graphics
Post by: guy6020665 on January 11, 2011, 01:44:23 pm
Hey guys I'm back for a bit. using my schools computer but i don't know how long that will last. I'm uploading what I had earlier, with a few additions.
Title: Re: Ti-Basic Custom Graphics
Post by: DJ Omnimaga on January 12, 2011, 10:19:16 pm
Could you explain how to use the program? ??? First I got ERR:UNDEFINED on Recallpic 1 (I created it afterward) and now I just can edit the first two columns and rows of pixels at the top of the screen. ???
Title: Re: Ti-Basic Custom Graphics
Post by: guy6020665 on January 14, 2011, 03:19:47 pm
Oops, forgot about that. input something other than 0 at start to create a new picture, save/load doesn't really work unless you haven't done anything since the last time you used it.
So steps

1: Input a number other than 0

2: Input dimensions (width is left/right distance, length is up/down distance)

3: arrows to move cursor, 2nd to change pixel, [CLEAR] to clear the sprite, [ENTER] to load sprite, [MODE] to see options. (to select an option press that number key)

4: it will store the pixel values to L1 and L2 and it assumes that you have the same window settings as the program sets.
Title: Re: Ti-Basic Custom Graphics
Post by: DJ Omnimaga on January 16, 2011, 04:15:17 pm
Ok cool I got it to work, now. So it's mostly a sprite editor?
Title: Re: Ti-Basic Custom Graphics
Post by: guy6020665 on January 17, 2011, 05:52:48 pm
Yeah, thats pretty much it.
Title: Re: Ti-Basic Custom Graphics
Post by: wvstudios on January 17, 2011, 06:02:37 pm
Haven't seen too many pure basic sprite editors.  Tried it myself once, but I never got to using it in anything.
Title: Re: Ti-Basic Custom Graphics
Post by: meishe91 on January 17, 2011, 07:43:55 pm
@Wvstudios
I made a couple last year that let you get the hex from a sprite you make and one that makes Text Sprites.
Title: Re: Ti-Basic Custom Graphics
Post by: DJ Omnimaga on January 18, 2011, 02:06:03 am
Haven't seen too many pure basic sprite editors.  Tried it myself once, but I never got to using it in anything.
Actually there are quite a bunch on Omni. If we also add ASM and Axe ones, I'm sure there are close to 40. O.O
Title: Re: Ti-Basic Custom Graphics
Post by: meishe91 on January 18, 2011, 03:22:32 am
There are Assembly ones? I knew there were a couple of Axe ones but didn't think there were that many. Didn't mine kinda start everyone making others?
Title: Re: Ti-Basic Custom Graphics
Post by: DJ Omnimaga on January 19, 2011, 01:32:46 am
Not sure, I think it was Runer's or Nemo's. As for ASM ones I don't think so, but Axe ones can be used for ASM and BASIC if you paste the hex I guess.
Title: Re: Ti-Basic Custom Graphics
Post by: meishe91 on January 19, 2011, 01:38:17 am
Well I remember me making mine and then I think Runer made an Axe one and Nemo made one a bit later...I don't know though, I could be wrong.