CodeWalrus

Development => Calculators => Calc Projects, Programming & Tutorials => Topic started by: alexgt on November 10, 2015, 09:17:41 PM

Title: Programming Games in Ti-Basic
Post by: alexgt on November 10, 2015, 09:17:41 PM
When I first started programming it was on a Ti-84+ in Basic. I have come a long way since but I was always looking for a (sudo) complete/understandable tutorial, if this sounds like you this is for you!
[spoiler=Step 1 making your first program]
1. Go to the home screen and press PRGM
2. Go to NEW and enter a name
3. You are now in the Ti-84+ IDE
(http://i.imgur.com/U7UXAdB.png)
4. From now on the key strokes are in the screen shot ;)
(http://i.imgur.com/4CUz6Zx.png)
5. Time to run the program, can you guess what it will do?!
[spoiler=If you have figured it out open this!](http://i.imgur.com/p2ifhcK.png)[/spoiler]
[/spoiler]
Now you are past the first step! I will add on to these quite often until there you are ready to take to the skys with your new found skilz ;)

This is the next step, here we talk about the while loop!
[spoiler=Step 2]
First of all lets create a program:
[spoiler](http://imgur.com/LFkJA8K.png)
(http://imgur.com/fvtbdpH.png)[/spoiler]

We will be making a loop that counts X from 0 to 10 and then displays some text:
The first step is to set X to equal 0 and to make our loop
[spoiler](http://imgur.com/QIgAXUB.png)[/spoiler]

Now we have to tell the loop when to run:
[spoiler](http://imgur.com/MnLrYkl.png)[/spoiler]
This just says WHILE X is less than 0 run this code!

The next step is to tel the loop what to execute:
[spoiler](http://imgur.com/0ZjTaNL.png)[/spoiler]
This makes X's value go up by one every time the loop is run

Now we have to give visual feedback when the loop completes!
CHALLENGE: Do this by your self and see what you can come up with (it doesn't need to be exactly like mine)
[spoiler=Only open if you wish to spoil the CHALLENGE](http://imgur.com/jjwFL4p.png)
Outputs:
(http://imgur.com/jjwFL4p.png)
But wait the output is cut off O.O how can wee fix this?!
Look in the next step to find out really how simple it is[/spoiler]

All you need to do is separate it into two commands!
[spoiler](http://imgur.com/6NhS6ow.png)[/spoiler]

Now you may be asking how on earth do we get that ugly prgmLOOPS off of the homescreen, that is also very easy
[spoiler]Just add ClrHome to the first line in your program
(http://imgur.com/wKEvQPW.png)[/spoiler]

Now you will get this:
[spoiler](http://imgur.com/sTpbaZy.png)[/spoiler]

Now for that pesky Done at the end:
[spoiler]All we do here is add a Pause at the end and that makes all line execution stop until the user presses enter
(http://imgur.com/SvxrNzk.png)[/spoiler]

It should give you this:
[spoiler](http://imgur.com/dWHEPcq.png)[/spoiler]

Congrats you have finished part 2!!!!

Sneak peak for next lesson:
[spoiler](http://imgur.com/uJJHbS7.png)[/spoiler]
[/spoiler]
Title: Re: Programming Games in Ti-Basic
Post by: alexgt on November 10, 2015, 09:34:41 PM
Err... Thx for moving that Cumred I realized right after I posted it xD
Title: Re: Programming Games in Ti-Basic
Post by: Snektron on November 10, 2015, 09:35:24 PM
No problem :P also cool that you're making tutorials :)
Title: Re: Programming Games in Ti-Basic
Post by: alexgt on November 10, 2015, 10:29:36 PM
Thanks, I have a friend at school that wants to start with making games in Basic so I told him I would start a tutorial today :)
Also more in-depth tutorials will be a video (like larger game projects)
Title: Re: Programming Games in Ti-Basic
Post by: p4nix on November 10, 2015, 11:16:04 PM
Keep him interested :P I remember making that Whack A Mole C-project for fx9860 to get a friend into coding - we were only missing a highscore save feature and a kind of menu --> we stopped :P
Title: Re: Programming Games in Ti-Basic
Post by: alexgt on November 10, 2015, 11:17:47 PM
Yeah I am thinking most every day I will post something here :)
Title: Re: Programming Games in Ti-Basic
Post by: novenary on November 10, 2015, 11:21:24 PM
Nice, a tutorial for the absolute beginners. Good luck with it. :)
Title: Re: Programming Games in Ti-Basic
Post by: alexgt on November 10, 2015, 11:22:10 PM
Thank you :)
Title: Re: Programming Games in Ti-Basic
Post by: Dream of Omnimaga on November 18, 2015, 03:17:17 AM
I hope you update this in the future. It would probably be a bit less clickbait to the eyes of people who are seeking for a full getting started with BASIC game programming tutorial. :P

Since there are already many tutorials out there including one by TI, perhaps that to avoid reinventing the wheel, your tutorial should focus on getting people to learn game-specific tricks more, while encouraging them to check out TI-BD and other tutorials out there for info on commands.
Title: Re: Programming Games in Ti-Basic
Post by: alexgt on November 18, 2015, 01:05:27 PM
Yeah, I am planning on making one today about loops (SynText has taken a lot of my time) and after that I will start making little game projects.
Title: Re: Programming Games in Ti-Basic
Post by: Dream of Omnimaga on December 06, 2015, 04:29:39 PM
So how is this going, @alexgt?
Title: Re: Programming Games in Ti-Basic
Post by: alexgt on December 07, 2015, 04:38:15 PM
I posted another tutorial but the pics are messed up and I haven't had time to fix them <_<.
Title: Re: Programming Games in Ti-Basic
Post by: Dream of Omnimaga on December 12, 2015, 09:25:38 AM
Oh I see. You really should bump this topic everytime you post a new tutorial and change stuff, though, because I did not notice your edit until recently. >.<
Title: Re: Programming Games in Ti-Basic
Post by: alexgt on December 13, 2015, 11:26:29 PM
I didn't bump it since the pics are broken, I guess I need to fix that xD

EDIT: pics are fixed
Title: Re: Programming Games in Ti-Basic
Post by: Dream of Omnimaga on January 06, 2016, 03:59:30 AM
Ah I see now. Glad that they are fixed. I think pics should be uploaded on ourl.ca or img.codewalr.us for posterity.
Title: Re: Programming Games in Ti-Basic
Post by: alexgt on January 07, 2016, 02:07:48 PM
ok, I will do that from now on but I think I will mostly be doing videos now, but the next tutorial might be a while since I don't really have much time <_<
Title: Re: Programming Games in Ti-Basic
Post by: Dream of Omnimaga on January 14, 2016, 06:30:57 PM
Videos could work. You would need to put them in the first post, but I assume it cause lag when loading this topic >.<

That said, video-based tutorials already exist in large amounts on Youtube for TI-BASIC, so there might not be that much demand for such format.