Development => Calculators => Calc Projects, Programming & Tutorials => Topic started by: _iPhoenix_ on February 25, 2018, 03:50:37 pm

Title: _iPhoenix_'s CC21 entry.
Post by: _iPhoenix_ on February 25, 2018, 03:50:37 pm
This is a cross post of my CC21 (Cemetech Contest 21) thread. (I know a lot of you guys don't look over there that often, so I'm posting it over here  :) )

I'm going to create a "days-off-from-school" Simulator, because days off from school are usually on or around holidays.

I plan on having a Google Docs-esque screen, where you cask write out the essays you inevitably were assigned right before the break started. Your "work" meter goes up, but so does your "boredom" meter.

You can also switch over to a sublime text-esque screen, or a Cemetech SAX-esque screen, where your work meter doesn't move, but your boredom meter goes down and you get "coolness points".

I plan on doing this in pure BASIC, with no picture variables. I like pushing limits, as you probably know.

I also plan on including the adorable :walrii: somehow.

Anywho, here's some eye candy!

The stuff on the left are the two bars, work and boredom, respectively:

I thought I'd post this too:

As you can tell, I need to make some changes. It's not 100% faithful, partially because I did this entirely from memory.

The blank Sublime Text screen, also done from memory:
Typing of the essay:

You can view the sublime text editor by switching tabs with the right arrow. If you are in the sublime text editor, you can switch tabs left again with the left arrow.

I'm not releasing the code for the code-typing just yet. I'm not fully done optimizing it :)

You can download the file, screenshots, and source and suggest changes (this particular contest allows collaboration) on my GitHub repo (!

I also recommend checking out my Cemetech thread ( There are some minor details that I didn't include here in the interest of a short-ish post.

Title: Re: _iPhoenix_'s CC21 entry.
Post by: _iPhoenix_ on March 07, 2018, 09:47:57 pm
It turns out that my updates have been slacking. Not everything here will make sense, but just hop over to the repo and optimize the crud out of that thing, please :)

I added the new updates to my Github repo. (including the unfinished upgrades screen and the functioning bars)

I'm proposing the following system:
If you optimize my code somehow, I will include your Codewalrus username (or, if you don't have a CW account, make one!) and the number of bytes you managed to shave off.

Just create a pull request on the GitHub repo or post with your optimizations here! For those unable to post their optimizations on Cemetech, CodeWalrus, or GitHub, I have created a form where you can submit a username and your revised code ( Here's a link to my GitHub repo (
Title: Re: _iPhoenix_'s CC21 entry.
Post by: _iPhoenix_ on March 17, 2018, 04:58:59 pm
I got a ton done since I last posted! Here's a changelog.


It took me an extremely long time to figure out how I could pause my clock in TI-Basic for a certain duration of time. It's relatively simple to pause the clock while other code executes, as shown below.
//Note that the startTmr token is essentially a variable holding a number that represents the current
//time, and the checkTmr( command essentially takes the current value of startTmr at execution and
//subtracts the value stored in the provided variable from it.

//Initialize a timer to variable A by storing the current time to A

<put code to execute while clock is running here>
//Get the amount of time elapsed since the time was stored to A, and store it to B, for safe keeping. Optionally, you can even store it back into A.
//note that the clock still technically runs here, so none of the calculations here can use the timer stored in A.
<put code to execute while clock is paused here>
//Take the current time, and move backwards B seconds, storing it back into A

Having it pause for a certain duration is much harder, and I leave that as an exercise to the reader. I'm sure some form of microscopic code snippet for what I am trying to do is posted somewhere, but I'm quite proud of my solution nonetheless.

I also want to say that you can skip the intro by pressing [sto->]. You could do it in the last update, but I forgot to post it.

I updated the GitHub repo, and the previous challenge still applies. If you can shave off some bytes in the program, I will include your username in the README, as well as the number of bytes you shaved off!

Believe it or not, the code was at 4500-ish bytes, but I have since shaved off about 800 bytes off of the already-optimized program, which I am extremely proud of.
Title: Re: _iPhoenix_'s CC21 entry.
Post by: _iPhoenix_ on March 24, 2018, 12:10:43 am
Alright, the CC21 contest is over, and voting is now open! I highly recommend checking out all of the programs and voting! link (