Skip to main content

One Third Finished in my Text-Based CYOA Python Game!

 

I am so shameful.

Introduction

Hello there, coders! First of all, I'd like to say sorry for my delay. I've been figuring out the google search console thing, and all my time's been taken because of that.

Anyway, today, I'll share you all my experience making a CYOA game in Python. 

In short, lots of conditionals, AI, and bugs.

Ignorance

I started working on it, and I felt amazing. 

Sure, there were a few bugs, but nothing too frustrating to get rid of.

I finished coding the entire first 'Lobby Part' in just a day!

Then, my laziness started to pop up again.

This was really starting to be a problem. 

Couple that together with the fact that I was just starting to figure out Google Search Console, was time-consuming.

This was when things started to go downhill.

Debugging

I came back to this, TWO WEEKS LATER!!!

That's really concerning.

Anyway, I got back to work on playtesting, and started noticing huge problems.

Firstly, I was limiting the player's choice to only 3, but the player could choose infinitely!

Secondly, the actual story. The thing that was the point of the game, WASN'T SHOWING UP! This problem was probably also because of the infinite choices thing.

Third, the player could choose a choice multiple times.

After an hour of working, I gave up. 

I couldn't think of a solution, so I turned towards ChatGPT.

It was a bit frustrating since it thought I was talking about different problems.

Slowly but surely, I got things debugged.

It's a shame I had to rely on AI.

Debugging Pt. 2

I really didn't want to rely on AI, but I guess I will have to later.

Anyways, did you think the bugs were gone? Nuh uh.

There were more problems.

There was one where PyCharm kept saying that this one line of code was unreachable.

The player could spam enter and not make any choices at all.

It was really annoying.

Thankfully, things turned out alright!

The Code

So here's the code!

Code's going to get a lot longer, so I don't know how to compress it in blogger.

That's a problem for future Stewie to handle though!

First Screenshot of Stewie's Code for a text-based CYOA Python Game
Second Screenshot of Stewie's Code for a text-based CYOA Python Game
Third Screenshot of Stewie's Code for a text-based CYOA Python Game
Fourth Screenshot of Stewie's Code for a text-based CYOA Python Game
Fifth Screenshot of Stewie's Code for a text-based CYOA Python Game
Sixth Screenshot of Stewie's Code for a text-based CYOA Python Game
Seventh Screenshot of Stewie's Code for a text-based CYOA Python Game


Can anyone of y'all help me out with the Google Search Console? Really messing me up.

and with that,
signing off,
Stewie











Comments

Popular posts from this blog

The Beginning

  Coding was always something I was interested in. Introduction I used to be super interested in coding as a kid, because who wouldn't want to make games, create web pages? I obviously signed up for coding tuition when I was around 10, and just could not keep up at all. The teacher was fine, but I guess I just got bored trying to understand and remember the "functions". Recently, I decided to change this, by trying to learn coding again. I still have some basic knowledge for coding, for example loops, conditionals, data types, but other than that, I just forgot everything. After this, I found this incredible website called freecodecamp.org . If you're learning to code, which I think you are doing since you're reading this, you'll probably find this website to be incredibly useful. Other than that, I realized that, "I could probably help some future coding beginners if they saw a blog from a person learning to code." and I set up this blog. I really h

Python Lists: Beginner Python Lists Introduction and A Beginner's Experiences Learning It

  Apparently, we're doing data structures here! Introduction Hello there, coders! Today, we're talking about lists! I'm also going to be recalling my experience learning about lists after so many minutes. I was actually supposed to post this much earlier but because of the light cutouts coupled with my english tuition, AND my headphones not working, I couldn't start this blog post. Thankfully my lights came on a bit earlier than usual! What are Lists? They're a, well, list! It's very well named. It's stored in a variable with square brackets [] and separated by commas, and you can put many data types in it!  This basically just makes it a better way of storing data, instead of using normal brackets to store only one data type.  What can we do with lists? You can modify lists even after they were made, or in other words, mutable.  You can use many functions to add data to the back of the list, remove data, add data in the middle of the list, and you can sort

What are Strings? A Beginner's Guide Into Programming Strings in Python

  What is the meaning of a string in coding? Introduction Hello there, coders! This was definitely one of the weirdest concepts I had to understand when I was learning to code.  It is so simple, but I spent an entire evening understand strings! It was ver y embarrassing , but at least I know now!  To hopefully regain my pride, I'm going to explain what strings are in programming as a beginner. What even are strings? Strings are data that you can print out. It's basically text. You might be confused if 9 is a string or an integer (number), but you can just change it! You can type in your code editor to turn a certain variable or a number into a string, in our case 9, by using the str() function. You can put anything in there and it will turn into something you can print out! You can't perform math on the string '9' though. My Experience Aside from the usual data types, I was a bit stumped when I reached the string functions. There were just so many string functions,