Author Topic: Candy Wars  (Read 4335 times)

0 Members and 1 Guest are viewing this topic.

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Candy Wars
« on: November 23, 2013, 01:42:16 pm »
I made a quick Drug-Wars clone called Candy Wars.

I'm lazy, so I'll just copy-paste the readme:
Code: [Select]
   _____                _    __          __
  / ____|              | |   \ \        / /
 | |     __ _ _ __   __| |_   \ \  /\  / /_ _ _ __ ___
 | |    / _` | '_ \ / _` | | | \ \/  \/ / _` | '__/ __|
 | |___| (_| | | | | (_| | |_| |\  /\  / (_| | |  \__ \
  \_____\__,_|_| |_|\__,_|\__, | \/  \/ \__,_|_|  |___/
                           __/ |
                          |___/

                       by Josiah W.

##############
#Requirements#
##############

* 2,274 bytes of RAM for the game AND variable usage.
* (recommended, but not required)
No content in L1, L2, A, D, F, M, or X. These variables
are overwritten by CANDYWAR.8xp.

##############
#Installation#
##############

* Transfer CANDYWAR.8xp to your calculator. Then, run
it as a BASIC program on the homescreen.

#############
#How to Play#
#############

* Candy Wars is a Drug-Wars type game, with obvious
changes.
* Press ENTER to get past the title screen.
* Press UP and DOWN to go through menu options, and
ENTER to confirm your selection.
* You start with $10,000. Your goal is to buy and sell
candy to get over $50,000 to buy a new bike in as
little time as possible.
* These are the high and low values for candy prices.
+---------+-----------+
|Candy    |Price Range|
+---------+-----------+
|Gum      |$15-50     |
+---------+-----------+
|Lollipops|$50-100    |
+---------+-----------+
|Reeses   |$100-500   |
+---------+-----------+
|Kit Kat  |$500-1000  |
+---------+-----------+
|Twix     |$1000-5000 |
+---------+-----------+
|Hersheys |$5000-10000|
+---------------------+
* Be warned...health crazed parents might take some of
your candies at any time.
* Sometimes, you can get great deals on candies. Be on
the lookout for those kinds of deals!

#################
#Tips and Tricks#
#################

* Try to take advantage of as many deals as possible.
* Sell as many candies as you can, if you don't want to
get caught by health crazed parents.
* When in doubt, perhaps buy a Hersheys.

###################
#Legal Information#
###################

* This program is freeware, it shall be distributed
freely. Do not sell this game, or claim it as your own.
If you do distribute this program, credit me for it.

#########
#Credits#
#########

* Jonathan Maier for making the original TI-82 Drug Wars.
* gist.github.com/mattmanning/1002653 for having the
original TI-82 Drug Wars code.
* Ryan Bowen ([email protected]) for making an
excellent Candy Wars game, inspiring me to make mine.

#################
#Version History#
#################

v1.0: Initial release

The file is attached.

What do you think of the game? Might need optimization, but how good is the game?
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: Candy Wars
« Reply #1 on: November 23, 2013, 03:59:32 pm »
I like it, it works for the +C! Maybe display the day in the main menu. And how do I lose over $3,000 outside!? Does it just fall out of my pocket! Maybe add a bully to take place of officer hardass! And you could buy brass knuckles or something to beat him up! :D (Or a shotgun to give it a nice american touch ;)) Good job on the game!
« Last Edit: November 23, 2013, 04:04:14 pm by AssemblyBandit »

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Candy Wars
« Reply #2 on: November 23, 2013, 04:24:00 pm »
I'm glad to get that kind of positive feedback from a programmer of your fame. Thank you.

I wouldn't know how to display the day in the main menu and make it look pretty. I mean, why don't you try to do that with the Menu( command? I don't think you can.

About losing money, that was my translation of "YOU WERE MUGGED IN THE SUBWAY" from the original. The loss formula was 2int(M/3), and I used that in the game.

Great idea about the bully, but I won't do the brass knuckles thing.

Once again, thanks for the feedback!
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: Candy Wars
« Reply #3 on: November 23, 2013, 06:37:08 pm »
I couldn't find a way to convert real variables to strings without assembly :(

Here's what I got, it doesn't look pretty, I suck at BASIC, it uses 7 extra variables, but it does display up to 9,999,999 days in the menu:

Code: [Select]
Lbl C
"0123456789"->Str3
"DAYS"->Str1
D->E
0->B
":"->Str2
1000000->A
While A != .1
If iPart(E/A)=0 and B=0
Goto S
Str2+sub(Str3,iPart(E/A)+1,1)->Str2
1->B
E-iPart(E/A)*A->E
Lbl S
A/10->A
End
Str1+Str2->Str1
0
Menu("   CANDY WARS","SEE PRICES",0,"SEE YOUR CANDY",1,"BUY",2,"SELL"
,3,"EXIT",theta,Str1,C)

It looks like:

   CANDY WARS
1:SEE PRICES
2:SEE YOUR CANDY
3:BUY
4:SELL
5:EXIT
6:DAYS:123

You could do a better job than me optimizing it if you think it looks good enough.

Offline ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
Re: Candy Wars
« Reply #4 on: November 23, 2013, 07:12:45 pm »
I played the game and I like the idea, it's creative ;D also you should introduce yourself!
Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Candy Wars
« Reply #5 on: November 23, 2013, 08:54:34 pm »
As for AssemblyBandit, there is a shorter way. It only uses Str1 and X.

Code: [Select]
"DAYS:
For(X,1+int(log(D)),1,-1
Ans+sub("0123456789",1+int(10fPart(D/10^(X))),1
End
Ans -> Str1

The Menu( command works the same, though. And I didn't know it worked like that!

As for ClrDraw, I just made a new thread introducing myself. Also, I am Josiah W on TI-Basic Developer, so check me there, too.
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: Candy Wars
« Reply #6 on: November 23, 2013, 09:46:23 pm »
Wow, I really suck at BASIC!

Online DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Candy Wars
« Reply #7 on: December 05, 2013, 11:00:40 pm »
I like the idea. Drug Wars was a great classic, but sadly that kind of content is not allowed in most online calc archives anymore, so it's very hard to find. An alternate version with no drug reference is definitively good as well, I guess :)

Offline Phero

  • LV3 Member (Next: 100)
  • ***
  • Posts: 61
  • Rating: +26/-1
    • View Profile
    • http://ryanb.cc
Re: Candy Wars
« Reply #8 on: December 06, 2013, 12:12:46 am »
Drug Wars was a great classic

And how. It was the first calc game that I played once I got my own calc, and I still play it from time to time. It still has a home as my dual-screen wallpaper (see spoiler).

Spoiler For Spoiler:
« Last Edit: December 06, 2013, 12:14:56 am by Phero »

Online DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Candy Wars
« Reply #9 on: December 06, 2013, 01:38:04 am »
The picture is too small, I can't see anything D:

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Candy Wars
« Reply #10 on: December 06, 2013, 07:23:47 pm »
Nice to see the creator of the website praise me for my work!  XD Thanks!
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?