Yeah I come on and off occasionally on osrs, on "ryanpwndu", mostly to train ranged! I'll add you the next time I come on.
Today we're going to continue the story, during my last year of the dreaded high school. Yeah, it's not a great place to be an introvert or socially awkward person. You'll get scrutinized for every little detail. But with that said, we'll be talking about things programming-related.
In the fall of 2016, I was using this website and learncpp.com to learn all about C++. It was something that I kept to myself. I didn't want to show anyone at school of what I was doing, for fear of being called out for being a novice at coding, or that my physics world idea was stupid as hell. It also didn't help that I was rather discouraged by my parents, saying that I should be focusing on my studies, and that I won't be getting anything out of programming. At the time, my own desire was my only motivation.
Around October or November, there was an intern teacher working with the main teacher in pre-calculus class. He noticed that I was studying C++ and he let me borrow a book about C, saying that although C was less flexible, it was more powerful than C++. It was really interesting to learn C and C++ at the same time, with their different programming styles. Later on he let me borrow an old book about Matlab (back when its interface was in the terminal) which unfortunately I didn't read much.
There was a computer programming course in the second semester of grade 12 (2017 spring). Instead of that, I was taking creative writing, while my Asian counterpart friend was taking a programming course. The only thing I didn't like was that the course taught Java instead of C++.
It was an empty study period near the end of the school year and I got to see a bit of what my Asian counterpart friend was doing in his computer science class. They had a final project to make a game. There was a character on a fixed screen with some monsters chasing it. It had some special attacks and lots of things that C++ couldn't do on it's own. And there I was, stuck to the terminal window, compiling applications using MinGW.
I noticed that the enemies chasing the character on the screen were impossible to dodge because they traveled at the same speed as the the player, and they would be always traveling towards the player. Using my practical experience in programming, I gave the suggestion that the enemies should be going towards a previous position of the player, so that they are a little easier to dodge. They were puzzled for why I chose to do creative writing instead of programming.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
void npc_chat_mitchell(Player* p, int response){
switch(p->get_npc_data(0)){
case 0:
switch(response){
case 0:
ui_npc::update("Welcome, adventurer! I'm the guy who owns this place. The world we live in is in need "
"of people who know their physics well. %r 01 NEXT");
break;
case 1:
ui_npc::update("I will send you to downstairs where you can get used to the controls. By the name of "
"physics, I shall teleport thee now! %r 02 OK %r 03 ->Wait! I have something else to do.");
break;
case 2:
ui_npc::update("");
p->set_npc_data(1 /*state*/, 0 /*index*/);
//teleport player to map 2
break;
case 3:
ui_npc::update("Oh, well sure then. Talk to me again when you want to go. %r 04 END CHAT");
break;
case 4:
ui_npc::update("");
break;
}
break;
case 1:
switch(response){
case 0:
ui_npc::update("Wazzup, I'm the guy who owns this place. %r 01 END CHAT");
break;
case 1:
ui_npc::update("");
break;
}
break;
}
}
void npc_chat_jack(Player* p, int response){
if(p->get_npc_data(1) == 0){
switch(response){
case 0:
ui_npc::update("Oh, this is SO unfair! Why am I to be the bottom bitch and stay stuck with the beginners? "
"%r 01 Tough luck, pumpkin pie. %r 04 Hey, I came here to learn some physics, bitch!");
break;
case 1:
case 4:
ui_npc::update("Before you have fun, it's great to know the basics at the start of any game. Just to make sure you know "
"how to use your inventory screen, I am going to give you this apple. Now I am going to hurt you a "
"little. %r 02 NEXT");
p->set_npc_data(1 /*state*/, 1 /*state*/);
//give player apple and lower HP
break;
case 2:
ui_npc::update("You can access your inventory by pressing the i button by default. %r 03 END CHAT");
break;
case 3:
ui_npc::update("");
break;
}
}
if(p->get_npc_data(1) == 1 /*&& player doesn't have the apple*/){
switch(response){
case 0:
ui_npc::update("Ok, good, you have a brain. Here's how to attack things, which is probably one of the most "
"important aspects of this world. Use %r 01 NEXT");
break;
case 1:
ui_npc::update("You have a wooden stick in your inventory so go select it. Then get me 3 KITTEN FUR from "
"those kittens. You should know how to obtain them. %r 02 END CHAT");
p->set_npc_data(2, 1);
break;
case 2:
ui_npc::update("");
break;
}
}
if(p->get_npc_data(1) == 2 /*&& player has 3 kitten fur*/){
switch(response){
case 0:
ui_npc::update("Good! Now my job is done. Fare well! I mean, get lost. %r 01 END CHAT");
break;
case 1:
ui_npc::update("");
break;
}
}
}
| |