C30N9's Doomworld Forums Blog

C30N9's Doomworld Forums Blog

Physics Problems July 29, 2014, 4:33 pm
1- A toy racing moves with constant speed around the circle shown below. When it is at point A its coordinates are x = 0, y = 3m and its velocity is 6 m/s i. When it is at point B its velocity and acceleration are (respectively)?



The answer is 6 m/s j and 12 m/s^2 i, respectively. I got the magnitudes right, and I understand why its velocity is in the direction of j. However, why is its acceleration is in the direction i?

2- Two blocks (A and B) are in contact on a horizontal frictionless surface. A 36-N constant force is applied to A as shown. The magnitude of the force of A on B is?



3- A 0.20-kg particle moves along the x axis under the influence of a stationary object. The potential energy is given by U(x) = (8.0J/m^2)x^2 + (2.0J/m^4)x^4, where x is in coordinate of the particle. If the particle has a speed of 5.0 m/s when it is at x = 1.0 m, its speed when it is at the origin is?

(Any relations between potential energy and speed?)
5 Comments

A Unity Game July 17, 2014, 8:10 pm
So I've been developing a very simple game on Unity. The basic idea is to avoid spawning obstacles controlling 4 ships. My current aim is to finish all the scripting before importing assets, that is why everything you see in the video is a cube.

[yt]71KrVG-E6tQ[/yt]

[yt]RFNHmZVvCyk[/yt]

Might not look attractive, but this is my first good attempt to make a video game. I still have to script spawning obstacles, score and other few necessary stuff. What do you think?
2 Comments

Uni is approaching... July 2, 2014, 4:57 am
... and I'm still stuck between CS and CEN as majors. I'm mainly aiming for CS as major and accounting as minor. But what do you think? Which major should I get? Which is better? Which one has bigger salary?
12 Comments

Do things get better after teenage? April 21, 2014, 2:13 pm
I'm not totally depressed, but I keep getting weird random thoughts in my mind, and sometimes, I feel a little anxious in a few situations which is kind of ridiculous. There are also other stuff I go through other people do not. Point is, is this just me, or am I going through typical teenage?
30 Comments

Attempt at animation rigging April 16, 2014, 4:21 pm
[yt]-CRRY-KxcH4[/yt]

animating is fun, right???
3 Comments

Anyone here got Autodesk Maya? January 3, 2014, 9:12 am
I have a .3ds file and would like someone to test it in Maya with textures.
2 Comments

Hey, I just programmed something... December 26, 2013, 3:26 pm
... And this is crazy
But here's the code
So give suggestions, ideas, feedback, thoughts, maybe?

//Simple RPG based fighting game in C++
//By C30N9

//A project to test functions and use of variables (including arrays a.k.a. too confusing stuff). Also trying to write a code with comments, proper labeling and organizing to make it clear for readers so they can follow the code easily

//I write ">>> OVER HERE!!! <<<" near "goto" commands and their targeted lines
//With variables, I connect using "_" and object's name such as strings like "player_name" or integers/doubles... like "player_health"
//As for labels used for "goto" commands, I use "0" such as "player0name0writing"
//I divide some parts by using "------------------..."
//BTW, it's not finished yet
//------------------------------------

#include <iostream>
#include <cstdlib>
#include <ctime>
#include <string>

using namespace std;
//------------------------------------

void weapon_selection();

string yesnoanswer;

int main()
{
#define PLAYER_NAME_LENGTH_LIMIT 4

srand(time(0));

string player_name; //obvious

int health; //"health" is simply the health set up for both fighters, the player and the enemy
int player_name_length;

cout << "Welcome to the simple RPG based fighting game!";

while (true) {

player0name0writing: //>>> OVER HERE!!! <<<

cout << endl << "Please write your name up to 4 letters: ";
cin >> player_name;

player_name_length = player_name.length();

if (player_name_length > PLAYER_NAME_LENGTH_LIMIT) {
cout << endl << "You wrote more than 4 letters, try again.";
goto player0name0writing; //>>> OVER HERE!!! <<<
}

cout << endl << "So your name is " << player_name <<". Is this Right? Write 'Yes' if it is, 'No' if it is not: ";

player0name0yesnoanswer0writing: //>>> OVER HERE!!! <<<

cin >> yesnoanswer;

do {

if (yesnoanswer == "Yes") {
break;
}

else {
if (yesnoanswer == "No") {
goto player0name0writing; //>>> OVER HERE!!! <<<
}

else {
cout << endl << "Please Write a valid answer: ";
goto player0name0yesnoanswer0writing; //>>> OVER HERE!!! <<<
}
}

} while (true);
//------------------------------------

health0settingup: //>>> OVER HERE!!! <<<

int sethp; //sethp will be renamed to health later, you can say this is a useless extra integer

cout << endl << "Write the HP for both you and the enemy. Choose a number between 500 and 1500: ";

health0writing: //>>> OVER HERE!!! <<<

cin >> sethp;

if (sethp < 500 || sethp > 1500) {
cout << endl << "You wrote an invalid number, please try again: ";
goto health0writing; //>>> OVER HERE!!! <<<
}

health = sethp;
cout << endl << "The health points are " << health << ". Is this okay? Write 'Yes' if it is, 'No' if it is not: ";

health0yesnoanswer0writing: //>>> OVER HERE!!! <<<

cin >> yesnoanswer;

do {

if (yesnoanswer == "Yes") {
break;
}

else {
if (yesnoanswer == "No") {
goto health0settingup; //>>> OVER HERE!!! <<<
}

else {
cout << endl << "Please Write a valid answer: ";
goto health0yesnoanswer0writing; //>>> OVER HERE!!! <<<
}
}

} while (true);
//------------------------------------

weapon_selection();

break;
return 0;
}
}

void weapon_selection() {
#define INVENTORY_SIZE 4
#define WEAPONNUM 6

string player_inventory[INVENTORY_SIZE];
string weapon[WEAPONNUM] = {"Dagger", "Sword", "Long Sword", "Battle Axe", "Fire Sword", "BFG9000"};

weapon0selecting: //>>> OVER HERE!!! <<<

bool weapon_istaken[WEAPONNUM] = {false, false, false, false, false, false}; //used if the weapon is taken or not

int player_inventory_size = 0;
int player_weapon_choice;
int player_weapon_choice_actual; // which means player_weapon_choice - 1, used for arrays



cout << endl << "You have these weapons, please choose only " << INVENTORY_SIZE << " of them:" << endl;

for (player_inventory_size; player_inventory_size < 4; player_inventory_size++) {
for (int i = 0; i <= WEAPONNUM - 1; i++) {
if (!weapon_istaken) { //weapon is NOT NOT taken, so weapon IS taken
int i_plus = i + 1;
cout << endl << i_plus << "- " << weapon;
}
}

player0weapon0choice: //>>> OVER HERE!!! <<<

cout << endl << "I choose: ";
cin >> player_weapon_choice;

player_weapon_choice_actual = player_weapon_choice - 1;

if (player_weapon_choice_actual < 0 || player_weapon_choice_actual > 5) {
cout << endl << "You wrote an invalid entry, try again.";
goto player0weapon0choice; //>>> OVER HERE!!! <<<
}

if (weapon_istaken[player_weapon_choice_actual]) {
cout << endl << "You wrote an invalid entry, try again.";
goto player0weapon0choice; //>>> OVER HERE!!! <<<
}

player_inventory[player_inventory_size] = weapon[player_weapon_choice_actual];
weapon_istaken[player_weapon_choice_actual] = true; //inform that the weapon is taken

cout << endl << endl << player_inventory_size + 1 << "/4 slots are taken..." << endl;
}

cout << endl << "So you chose: ";
for (int i2 = 0; i2 <= INVENTORY_SIZE - 1; i2++) {

cout << player_inventory[i2];

if (i2 != INVENTORY_SIZE - 1) { //do not print " - " for the last element
cout << " - ";
}
}

cout << endl << endl << "Is this okay? ";

weapon0selecting0yesnoanswer0writing: //>>> OVER HERE!!! <<<

cin >> yesnoanswer;

do {

if (yesnoanswer == "Yes") {
break;
}

else {
if (yesnoanswer == "No") {
goto weapon0selecting; //>>> OVER HERE!!! <<<
}

else {
cout << endl << "Please Write a valid answer: ";
goto weapon0selecting0yesnoanswer0writing; //>>> OVER HERE!!! <<<
}
}

} while (true);
}


Anyways, I need help in several things:
- How do I put limits for inputs to one kind of variables?
- How do I convert variables? (Integers to Strings and vice-versa)
6 Comments

C30N9, a wannabe modeller December 19, 2013, 4:29 pm
What do you think? It's not the best but I'm happy with the result. Planing to sell this for cheap bucks.



20 Comments

What is university life like? November 17, 2013, 1:46 pm
So after less than a year I'll get the hell out of school. I'll take a whole day to explain why I hated school most of the time so I'll just explain in short. First, I've been learning and studying stuff just to earn grades but not to actually use them for real. Second, I don't have any close friends to talk with, I'm not that lonely but the majority of them is not my type. Also, there are those immature people who care only about their muscles, getting attention and fights.

I've been told that there is a huge gap between the school and university, but I doubt that everything changes dramatically after putting your first step in the uni.

What do you think? Please share your experience about this.
25 Comments

Next