CodeWalrus

Development => Calculators => Calc Projects, Programming & Tutorials => Topic started by: Dudeman313 on March 08, 2016, 02:46:43 AM

Title: Mr. Bob's Bad Day (Out?) A Text RPG [CE/CSE] [TI-BASIC]
Post by: Dudeman313 on March 08, 2016, 02:46:43 AM
So, I've started another project with my overnight self-taught knowledge of TI-BASIC. This time, I've started my first game, inspired by Jeremy Burke's Mr. Bill's Bad Day Out (http://www.ticalc.org/archives/files/fileinfo/375/37524.html). This story is about his equally unlucky brother, Bob, but with some differences. There will be at least 2 clear ways to win, not just one way to not die, and this is also made "Adventur style."

Screenshots from TI Connect CE:
(http://i.imgur.com/1U4LutL.png) (http://i.imgur.com/PhCXOYw.png)
(http://i.imgur.com/WCSdW2Q.png) (http://i.imgur.com/C3PmnFd.png)

So far, I've done little, but here's a small demo! I'm sure it's bug free, apart from the missing Lbl instructions, and could use optimization.
It is my second from-scratch TI-BASIC program ever, after all.
Here it is!
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG
Post by: Dream of Omnimaga on March 08, 2016, 04:30:35 AM
So will this be kinda like those Myst games where you search stuff but in text form, or will it be like JRPGs where you battle monsters and gain experience? It seems like a good start to get into calculator game development, and I'm glad you finally did it. :3=

Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG [CE/CSE] [TI-BASIC]
Post by: Dudeman313 on March 08, 2016, 04:56:15 AM
I don't know what you mean on that first reference, but it's no JRPG. It's more like the ez80 CE game on Cemetech called "Adventur." Or like the original.

I'm glad I did this too! It feels exhilarating to create something from nothing like that. Have you seen my other creation, GraphSet CE?
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG
Post by: Unicorn on March 08, 2016, 07:03:03 AM
Great job getting something going! It does feel great :)

Also, shouldn't this be in the showcase subforum?
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG
Post by: Dream of Omnimaga on March 08, 2016, 07:04:32 AM
Quote from: Unicorn on March 08, 2016, 07:03:03 AM
shouldn't this be in the showcase subforum?
It already is :P
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG [CE/CSE] [TI-BASIC]
Post by: Dudeman313 on March 08, 2016, 11:51:03 AM
So....anyone going to look for issues/optimizations?
I don't know these myself, but I guess I could do what I did yesterday:
Use Celsium to unlock all the basic programs on my calculator and stare at them in the editor....
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG
Post by: aetios on March 08, 2016, 01:06:20 PM
Hmm, I'll take a look at it later today.
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG [CE/CSE] [TI-BASIC]
Post by: Dudeman313 on March 08, 2016, 02:36:25 PM
I'd appreciate that.  Thank you. :)
I might also put this up on Cemetech and Omnimaga.
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG
Post by: Unicorn on March 08, 2016, 04:49:34 PM
If you post the code, it will help people to optimize more often, as they don't have to load the program into their calc or TokenIDE. And some people may he ontir phones.
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG [CE/CSE] [TI-BASIC]
Post by: Dudeman313 on March 08, 2016, 06:32:37 PM

ClrHome
Lbl A
Menu("M[r].Bo[|b]'[s] B[|a][|d] D[|a]y","Pl[|a]y",A1,"H[|e]l[p]",A2,"A[|b]o|u[t]",A3,"Q|ui[t]",A4
Lbl A4
Pause "CREATED BY: JOHN KOLADE",0.8
ClrHome
Stop
Lbl A3
ClrHome
Output(1,1,"Thi[s] [p][r]og[r][|a]m i[s] i[n][s][p]i[r][|e][|d]"
Output(2,1,"[|b]y M[r].Bill'[s] B[|a][|d] D[|a]y O|u[t]-
Output(3,1,"[|a] [t][|e]x[t] RPG [|c][r][|e][|a][t][|e][|d] fo[r]
Output(4,1,"[t]h[|e] TI-84+ [|c][|a]l[|c]|ul[|a][t]o[r].
Output(5,1,"I ho[p][|e] yo|u [|e][n]joy my
Output(6,1,"[r][|e]m[|a]k[|e]!"
Output(10,1,"-Joh[n] Kol[|a][|d][|e]
Pause
ClrHome
Goto A
Lbl A2
Output(1,1,"Yo|u [|c]o[n][t][r]ol [t]h[|e] [|d][|e][|c]i[s]io[n][s]
Output(2,1,"of [|a] 33-y[|e][|a][r]-ol[|d] i[|d]io[t].
Output(3,1,"Yo|u[r] go[|a]l: [t]o h[|e]l[p] Bo[|b]
Output(4,1,"[s]|u[r]|vi|v[|e] [t]h[|e] [|d][|a]y [|b]y hi[t][t]i[n]g
Output(5,1,"[t]h[|e] # k[|e]y[s] and [[|e][n][t][|e][r]]
Output(6,1,"|wh[|e][n] [n][|e][|c][|e][s][s][|a][r]y. BUT WATCH
Output(7,1,"OUT! Thi[s] g[|a]m[|e] i[s][n][t] [|e][|a][s]y-
Output(8,1,"[t]h[|e][r][|e] [|a][r][|e] m[|a][n]y |w[|a]y[s] [t]o [|d]i[|e]
Output(9,1,"[|a][n][|d] f[|e]|w |w[|a]y[s] [t]o |wi[n]...
Pause
ClrHome
Goto A
Lbl A1
Output(1,1,"Yo|u li[|e] i[n] [|b][|e][|d]."
Output(2,1,"Th[|e] [|a]l[|a][r]m [|b][|e][|e][p][s] lo|u[|d]ly."
Output(3,1,"I[t][s] 7:30."
Output(10,1,"E[n][t][|e][r] [t]o [|c]o[n][t]i[n]|u[|e]"
Pause
ClrHome
Goto B
Lbl B
Menu("Wh[|a][t] [t]o [|d]o?","S[t][|a]y i[n] [|b][|e][|d]",B1,"G[|e][t] |u[p]",B2,"E[|a][t]",B3
Lbl B1
Output(1,1,"Yo|u [|d][|e][|c]i[|d][|e] [t]o [s]l[|e][|e][p] i[n].
Output(10,1,"E[n][t][|e][r] [t]o [|c]o[n][t]i[n]|u[|e]
Pause
ClrHome
Goto Z
Lbl Z
Output(1,1,"Yo|u h[|e][|a][r] [t]h[|e] [|a]l[|a][r]m g[|e][t]
Output(2,1,"lo|u[|d][|e][r] and lo|u[|d][|e][r].
Output(4,1,"ITS A BOMB."
Pause
Output(6,9,"BOOM!!!
Output(8,1,"THE TERRORIST WITH THE
Output(9,1,"TRIGGER KEEPS YOUR FEMUR
Output(10,1,"AS A TROPHY.
Pause
ClrHome
Goto P
Lbl P
Pause "YOU.",1.2
Pause "HAVE.",1.2
Pause "DIED.",1
Pause
ClrHome
Goto A

This is what I got after uploading it to SourceCoder 3.
How do I display a "dead face" under label P?
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG
Post by: Unicorn on March 08, 2016, 06:41:59 PM
Do you mean a sprite? You can't currently do that, as xLIBC is not yet ported, but I wouldn't suggest trying to do that right away.
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG [CE/CSE] [TI-BASIC]
Post by: Dudeman313 on March 08, 2016, 08:48:17 PM
Quote from: Unicorn on March 08, 2016, 06:41:59 PM
Do you mean a sprite? You can't currently do that, as xLIBC is not yet ported, but I wouldn't suggest trying to do that right away.
No, just a basic  :P, but with XX eyes. Can you do that without xLIB?
                           

                         
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG
Post by: Dream of Omnimaga on March 10, 2016, 09:01:42 PM
I'll take a look later. Also for now you can use CE Textlib to draw rectangles and color text. ASCII art could be used for graphics. Technically you can also use actual sprites on the CE with CE Textlib but the game will have a resolution of 26*10 instead of 160*120 O.O
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG [CE/CSE] [TI-BASIC]
Post by: Dudeman313 on March 11, 2016, 12:18:45 AM
I think I'd want to finish the actual game first.
That reminds me:
UPDATE:
I added a bunch of stuff.
Please point out optimizations and other stuff I could add!
If you have outrageously stupid and dumb ways to die suggestions, please let me know!  ;D

ClrHome
Lbl A
Menu("M[r].Bo[|b]'[s] B[|a][|d] D[|a]y","Pl[|a]y",A1,"H[|e]l[p]",A2,"A[|b]o|u[t]",A3,"Q|ui[t]",A4
Lbl A4
Pause "Created by: John Kolade",0.8
ClrHome
Stop
Lbl A3
ClrHome
Output(1,1,"Thi[s] [p][r]og[r][|a]m i[s] i[n][s][p]i[r][|e][|d]"
Output(2,1,"[|b]y M[r].Bill'[s] B[|a][|d] D[|a]y O|u[t]-
Output(3,1,"[|a] [t][|e]x[t] RPG [|c][r][|e][|a][t][|e][|d] fo[r]
Output(4,1,"[t]h[|e] TI-84+ [|c][|a]l[|c]|ul[|a][t]o[r].
Output(5,1,"I ho[p][|e] yo|u [|e][n]joy my
Output(6,1,"[r][|e]m[|a]k[|e]!"
Output(10,1,"-Joh[n] Kol[|a][|d][|e]
Pause
ClrHome
Goto A
Lbl A2
Output(1,1,"Yo|u [|c]o[n][t][r]ol [t]h[|e] [|d][|e][|c]i[s]io[n][s]
Output(2,1,"of [|a] 33-y[|e][|a][r]-ol[|d] i[|d]io[t].
Output(3,1,"Yo|u[r] go[|a]l: [t]o h[|e]l[p] Bo[|b]
Output(4,1,"[s]|u[r]|vi|v[|e] [t]h[|e] [|d][|a]y [|b]y hi[t][t]i[n]g
Output(5,1,"[t]h[|e] # k[|e]y[s] and [[|e][n][t][|e][r]]
Output(6,1,"|wh[|e][n] [n][|e][|c][|e][s][s][|a][r]y. BUT WATCH
Output(7,1,"OUT! Thi[s] g[|a]m[|e] i[s][n][t] [|e][|a][s]y-
Output(8,1,"[t]h[|e][r][|e] [|a][r][|e] m[|a][n]y |w[|a]y[s] [t]o [|d]i[|e]
Output(9,1,"[|a][n][|d] f[|e]|w |w[|a]y[s] [t]o |wi[n]...
Pause
ClrHome
Goto A
Lbl A1
Output(1,1,"Yo|u li[|e] i[n] [|b][|e][|d]."
Output(2,1,"Th[|e] [|a]l[|a][r]m [|b][|e][|e][p][s] lo|u[|d]ly."
Output(3,1,"I[t]'[s] 7:30."
Output(10,1,"E[n][t][|e][r] [t]o [|c]o[n][t]i[n]|u[|e]"
Pause
ClrHome
Menu("Wh[|a][t] [t]o [|d]o?","S[t][|a]y i[n] [|b][|e][|d]",B1,"G[|e][t] |u[p]",B2,"E[|a][t]",B3
Lbl B3
Output(1,1,"You grab the box of
Output(2,1,"snacks by your bed.
Output(10,1,"Enter to continue
Pause
ClrHome
Output(1,1,"A strange man breaks
Output(2,1,"in through your window and
Output(3,1,"stares hungrily at your
Output(4,1,"Doritos. Before you can
Output(5,1,"react, he snatches them
Output(6,1,"and flees.
Output(10,1,"Enter to continue
Pause
ClrHome
Output(1,1,"You try to protest, but
Output(2,1,"realize you cannot-
Output(3,1,"because there is a glass
Output(4,1,"shard in your neck.
Output(5,1,"It's small and would be
Output(6,1,"totally harmless,
Output(7,1,"except that you are
Output(8,1,"severely hemophilic.
Output(10,1,"Enter to continue
Pause
ClrHome
Output(1,1,"You bleed out completely
Output(2,1,"within seconds.
Pause
ClrHome
Goto P
Lbl B1
Output(1,1,"Yo|u [|d][|e][|c]i[|d][|e] [t]o [s]l[|e][|e][p] i[n].
Output(10,1,"E[n][t][|e][r] [t]o [|c]o[n][t]i[n]|u[|e]
Pause
ClrHome
Output(1,1,"Yo|u h[|e][|a][r] [t]h[|e] [|a]l[|a][r]m g[|e][t]
Output(2,1,"lo|u[|d][|e][r] and lo|u[|d][|e][r].
Output(4,1,"IT'S A BOMB."
Pause
Output(6,10,"BOOM!!!
Output(8,1,"The terrorist with the
Output(9,1,"trigger keeps your femur
Output(10,1,"as a trophy."
Pause
ClrHome
Goto P
Lbl P
Output(4,8,"YOU
Pause "",0.5
Output(5,11,"HAVE
Pause "",0.5
Output(6,15,"DIED.
Pause "",0.8
ClrHome
Goto A
Lbl B2
Output(1,1,"You decide to get up and"
Output(2,1,"start your day like the"
Output(3,1,"morning person you never"
Output(4,1,"were."
Output(10,1,"Enter to continue"
Pause
ClrHome
Output(1,1,"You walk up to your alarm"
Output(2,1,"clock to seize its..."
Output(3,1,"TICKING?"
Output(4,1,"You are fiddling with"
Output(5,1,"the bomb when FBI agents
Output(6,1,"burst into the room. 
Output(7,1,"There's only one problem.
Output(10,1,"Enter to continue
Pause
ClrHome
Output(1,1,"They think YOU are the
Output(2,1,"terrorist responsible!
Output(10,1,"Enter to continue
Pause
ClrHome
Menu("What to do?","Give them the bomb",S1,"Bribe them!",S2,"Offer them food",S3
Lbl S3
Output(1,1,"You offer the men your
Output(2,1,"box of snacks.
Output(10,1,"Enter to continue
Pause
ClrHome
Output(1,1,"They mutter to one
Output(2,1,"another and seem to make
Output(3,1,"a decision. They tell you
Output(4,1,"that no terrorist would
Output(5,1,"ever care more about chips
Output(6,1,"than their life.
Output(7,1,"You are allowed 3 hours to
Output(8,1,"yourself before they come
Output(9,1,"back to question you.
Pause
ClrHome
Output(1,1,"BUT BEWARE, CHOOSER!
Pause "",3
Output(2,1,"Anything can happen in 3
Output(3,1,"hours, anything at all...
Output(10,1,"As always, Enter 2 cont...
Pause
ClrHome
Stop








Lbl S2
Output(1,1,"You attempt to bribe the
Output(2,1,"FBI, but you are a loser
Output(3,1,"and your life savings
Output(4,1,"are only a fraction of
Output(5,1,"a single agent's salary.
Output(6,1,"One man steps foward, gun
Output(7,1,"raised. You slowly back
Output(8,1,"up, hands raised.
Output(10,1,"Enter to continue
Pause
ClrHome
Output(1,1,"''Bribery is a federal
Output(2,1,"offense sir,'' He sneers.
Output(4,1,"The world darkens as the
Output(5,1,"bullet rips through your
Output(6,1,"skull.
Pause
ClrHome
Goto P
Lbl S1
Output(1,1,"You hold out the bomb and
Output(2,1,"kindly ask them to take
Output(3,1,"it away. Unfortunately,
Output(4,1,"the trigger happy man 5 ft
Output(5,1,"away sees it as a threat.
Output(10,1,"Enter to continue
Pause
ClrHome
Output(1,1,"Fortunately for you, the
Output(2,1,"guy is an inexperienced
Output(3,1,"n00b, so you are unhurt,
Output(4,1,"but instead collapse in 
Output(5,1,"shock next to a deadly
Output(6,1,"spider. You recover from
Output(7,1,"Your faint just in time
Output(8,1,"to be bitten. You die.(JK)
Pause
ClrHome
Output(1,1,"You did not die due to
Output(2,1,"a natural immunity, but
Output(3,1,"the FBI don't know that...
Pause
ClrHome
Lbl SA
Menu("What to do?","Pretend to die",SB,"Tell them you're fine",SC
Lbl SC
Output(1,1,"You get up and tell the"
Output(2,1,"agents that you are okay."
Output(4,1,"They accuse you of sorcery"
Output(5,1,"and burn you at the stake"
Output(6,1,"your sister's"
Output(7,1,"mother-in-law gave you."
Pause
ClrHome
Goto P
Lbl SB
Output(1,1,"You fake a painful death.
Output(2,1,"In fact, you do so well
Output(3,1,"that you dont even breathe
Output(4,1,"Your instincts kick in,
Output(5,1,"and you gasp for air.
Output(6,1,"The FBI, seeing this as an
Output(7,1,"attempted escape, decide
Output(8,1,"to take you away.
Output(10,1,"Enter to continue
Pause
ClrHome
Output(1,1,"In jail, you realize you
Output(2,1,"have a tiny button stuck
Output(3,1,"to your shirt. It's the
Output(4,1,"bomb's emergencey self
Output(5,1,"destruct button!
Output(10,1,"Enter to continue
Pause
ClrHome
Menu("What do you do?","Use button on door",SD,"Use it on the window",SE
Lbl SE
Output(1,1,"You escape, but then fall
Output(2,1,"five stories and slam
Output(3,1,"into a randomly placed
Output(4,1,"stone slab.
Pause
ClrHome
Goto P
Lbl SD
Output(1,1,"You place the button on 
Output(2,1,"the door. It blasts open.
Pause
Output(3,1,"You walk right out of the
Output(4,1,"containment facility
Output(5,1,"and into a 'shoot the can'
Output(6,1,"contest. The officers
Output(7,1,"don't see you there and
Output(8,1,"shoot.
Output(10,1,"Enter to continue
Pause
ClrHome
Output(1,1,"For some strange reason,
Output(2,1,"neither gun hits you.
Output(3,1,"Instead, the bullets
Output(4,1,"ricoshet off the can,
Output(5,1,"both men's bulletproof
Output(6,1,"vests, the wall, and
Output(7,1,"then fly straight at
Output(8,1,"you.
Output(10,1,"Enter to continue
Pause
ClrHome
Menu("What to do?","DODGE",D,"CATCH WITH TEETH",D1,"CATCH WITH HANDS",D2
Lbl D
Output(1,1,"You attempt to leap out
Output(2,1,"of the bullet's path.
Output(10,1,"Enter to continue
Pause
Output(3,1,"YOU FAIL."
Pause
Goto P
Lbl D1
Output(1,1,"You correctly determine
Output(2,1,"that the bullet has
Output(3,1,"slowed enough to be
Output(4,1,"stopped harmlessly between
Output(5,1,"your teeth.
Output(10,1,"Enter to continue
Pause
ClrHome
Menu("What to do?","Try it",D3,"It's my fate...",P
Lbl D3
Output(1,1,"You succeed! The men are
Output(2,1,"stunned!
Output(10,1,"Enter to continue
Pause
Output(3,1,"But then your bad luck
Output(4,1,"kicks in, and the bullet
Output(5,1,"slides from your teeth.
Output(6,1,"You are choking and the
Output(7,1,"guards don't help.
Pause "",0.8
Output(8,1,"You were so close...
Pause
ClrHome
Goto P
Lbl D2
Output(1,1,"You attempt to intercept
Output(2,1,"the bullet with your hands
Pause "",0.8
Output(3,1,"YOU FAIL."
Pause
ClrHome
Goto P
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG
Post by: Dream of Omnimaga on March 11, 2016, 06:04:54 AM
Yeah it might be better to wait a bit before optimizing, unless there are things you don't plan to change at all later.

There is something, however, that you could do, to save a few extra bytes: If, for example, the game text has the word Pause, or the word Then and they start with a capital letter, then you could use the Pause or Then command instead of writing them letter by letter. However, if the user has a language localization app installed, your game text might look funny since the commands would be translated (for example, if you use Ans followed by w, e and r, then if someone has his calc in French, then it would say Repwer instead of Answer in the game. But you are making a menu-based game with only text so it shouldn't cause any other problems.


Also I find it weird that almost every single menu-based calculator game use Bob as the main character game. :P
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG [CE/CSE] [TI-BASIC]
Post by: Dudeman313 on March 11, 2016, 02:13:15 PM
Well, it was going to be Bobo, but then someone was looking at my source code while I was editing the title, and they pronounced it "Boo-boo," so I made him Bob.
Also, the one this one is based off is about Bill, but other than that one, Bob is the first name you can think of that spells out "bozo." :P

I might add pictures when the entire game is complete after optimizations. And what does the Then command do?
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG
Post by: Dream of Omnimaga on March 11, 2016, 05:26:05 PM
Then is when you need more than 1 command for an If condition. For example:

If Condition
Do stuff

So you would do:

If Condition
Then
Do stuff
Do stuff 2
Do stuff 3
End

Also Boo-Boo sounds like a ghost character name :P
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG [CE/CSE] [TI-BASIC]
Post by: Dudeman313 on March 11, 2016, 05:30:20 PM
I use none of those in my program....
What conditions does the If command cover?

Well, it was a girl who I hate who snatched my precious CE, so
I decided to just change it.
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG
Post by: Dream of Omnimaga on March 19, 2016, 07:51:03 AM
If supports then and else.

If Condition
Execute the next line of code (only one).


If Condition
Then
    Execute
    this
    block of
    code
End

If Condition
Then
    Execute
    this
    code
Else
    Execute this
    code instead
End

You can also use And and Or. You should check TI-Basic Developer for info about the If command.
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG [CE/CSE] [TI-BASIC]
Post by: Dudeman313 on March 19, 2016, 06:24:30 PM
Due to losing my CE and all the programs on it, I no longer have anything farther than the beta above.
Hopefully, I'll have time to pick this up sometime with SourceCoder3 and maybe if someone else can test it or is willing to pick it up, I'd appreciate that.
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG
Post by: Dream of Omnimaga on March 21, 2016, 05:03:43 AM
I hope eventually you can code from the computer D:
Title: Re: Mr. Bob's Bad Day (Out?) A Text RPG [CE/CSE] [TI-BASIC]
Post by: Dudeman313 on March 21, 2016, 05:29:53 AM
If I ever get around to it, I'll post my progress.