I felt like I was doing something wrong.
Introduction
Hello there, coders!
It's been quite a while, I know.
I took a small rest so that I could fully transition into a weekly schedule instead of a daily one, but now I'm here!
Today, I'm going to be talking about me starting out to make my first real project.
I watched a few YouTube videos in my hiatus and realized I wasn't doing anything useful other than doing exercises, so I decided to start a project!
I'm a bit guilty of AI usage, because I used it to give me ideas for projects. It's not much of a big deal, but I felt like I had to mention it.
The Start
So when I asked it, it gave me an idea for a person exploring a mansion.
So, I expanded on that by adding a bit of mystery and spooky into it, with the idea now being that a overtly curious child exploring a mansion.
Little did they know, it was haunted!
First of all, I started a character introduction thing, with my program first asking the person's name and confirming it's their name.
By the way, I decided to split my project into parts so that I can work on one thing at a time, something I learned from the Harvard CS-50 course, which is actually free on YouTube!
This took an embarrassing 2 HOURS, but here's the code!
The Code. Surprisingly simple yet confusing for me at the same time. |
Later, I made some story, where I just explained the plot of the adventure. Took like 300 lines of empty print("")'s.
A whole lot of print statements. Also, a welcoming... welcome! |
I don't know if this code can be optimized or not, so let me know in the comments if I could've made the code a few lines shorter!
After this, I took some rest, and decided to start the next part tomorrow!
The End of the Beginning
The day after, I got to work on an inventory system! The character's going to pack some things, so I made it!
What I thought of, is that I would save the choices of items in a list, as numbers, and there's no indication of the item's name.
This could definitely be improved but I decided to change it later.
I then limited the character's choices to only 3 instead of the items' amount, 5, so that the character had limited choices.
Excellent game design by me, thank you, thank you.
The Code. The user can just pick items more than once, and the user can type 33232323 instead of actually picking an item... |
There are so many things that could be improved but I decided to write this blog first, and then improve on it later, so that I can tell you guys about my improvement!
Comments
Post a Comment