Join us on Discord!
You can help CodeWalrus stay online by donating here.

_iPhoenix_'s CC21 entry.

Started by _iPhoenix_, February 25, 2018, 03:50:37 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

_iPhoenix_

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.

:walrii:
  • Calculators owned: Two TI-84+ CE's
Please spam here: https://legend-of-iphoenix.github.io/spam/

"walruses are better than tuxedo chickens, all hail the great :walrii:" ~ me
Evolution of my avatar:

_iPhoenix_

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.
  • Calculators owned: Two TI-84+ CE's
Please spam here: https://legend-of-iphoenix.github.io/spam/

"walruses are better than tuxedo chickens, all hail the great :walrii:" ~ me
Evolution of my avatar:

_iPhoenix_

I got a ton done since I last posted! Here's a changelog.

Changelog:

       
  • Code and Essay length are now stored and re-drawn correctly.
  • Google Docs screen updated to better reflect the improved Google Docs. I really like how it turned out, despite the fact that it still needs work.
  • Optimizations- Program is now 10% faster, according to my tests.
  • Added a clock! Game is now 10 minutes long, excluding screen redraw times and the "Pause Clock" upgrade effect.
  • Added names to the upgrades, as well as a shop info thingie.
  • Added upgrade functionality to certain upgrades:

    •       
    • Point Booster: Dramatically increases minimum number of points received while writing code.
    • Pause Clock: Pauses the countdown clock for 30 seconds immediately after purchase.
    • Grammar Check: Increases the speed at which you can write your essay.
    • (planned) First-Person War Narrative: Decreases the rate at which you get bored, increases essay writing speed, and significantly slows down (not freezing) the clock.
  • If you are too bored, you no longer are able to complete your essay and need to do some programming.

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
startTmr->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.
checkTmr(A->B
//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
startTmr-B->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.
  • Calculators owned: Two TI-84+ CE's
Please spam here: https://legend-of-iphoenix.github.io/spam/

"walruses are better than tuxedo chickens, all hail the great :walrii:" ~ me
Evolution of my avatar:

_iPhoenix_

Alright, the CC21 contest is over, and voting is now open! I highly recommend checking out all of the programs and voting! link
  • Calculators owned: Two TI-84+ CE's
Please spam here: https://legend-of-iphoenix.github.io/spam/

"walruses are better than tuxedo chickens, all hail the great :walrii:" ~ me
Evolution of my avatar:

Powered by EzPortal