Wednesday, October 31, 2018

feedback

What concepts are you most comfortable with, and what concepts need more review? Try to be really specific and include 3-4 concepts in each category.
I am comfortable with functions,  loops, basics of Allegro, math problems. I need to review parent classes more because I am still a bit lost about that. I want to learn in depth how the collision works, and lastly, I want to review classes in general.

Chaos Monkey

What is defensive programming? What are some steps you can take to make your program difficult to break? What are some steps you might try when testing other's code?


You have to be very clear in your coding and if the code is advanced code you will have to put understandable comments so whoever reads the code will not break the code and can go through the code with ease. I will add random numbers to see how it will effect the program. 

My Game

In a short paragraph, explain the mechanics of the game you're designing for your final project. What will be the winning and losing conditions? What are the goals of the game? How will it be challenging. Finally, and most importantly, explain how you will be using functions to implement these goals and challenges? 
The main mechanic would be the gravity function and the collision function.The player can make the square jump up and it will fall back down, the player will lose when the square hits any of the triangles.Hitting the triangles and starting over is the collision function. Once the player loses he will start at the beginning of the map and will have to start all over. The goal for my game will be see how long you will last. It will be challenging because of the short hop of the square and the reaction time of the player. I have 2 functions in my code, gravity and collision. You need gravity to get past the triangles or you will die and will have to start over.

Wednesday, October 17, 2018

Games and the world

Think about yesterday's article, "Defending nature: Real-life video game may help protect desert tortoises". What are other ideas you have for games that can have positive environmental or social impacts? What would they do, and how would they work? Do you think video games will become an important part of solving large problems for humanity in the future? Why or why not?
One idea that would be cool for a game where the player would clean up the ocean with a drone and can earn points on how much trash they collect. I think it would become important because it would be helpful to the earth but also it would add a fun factor to the objective. We only have one earth, there might be planets that are similar to earth but never the same. We need to take care of the planet so humanity can survive.

Random generator

Describe how random generation works in our games. What does the rand() function do, and how can you alter the range of the numbers it produces? Provide several examples explaining different ranges of numbers.
The rand is randomly generating numbers and you can add a restriction by adding the % and a number, that will set the range of the preferred numbers. For example rand()%100+1 is a random number between 0 and 100. 

Getting stuck on daily code

Explain where you got stuck and/or confused on today's code. If it was a bug, what was the problem, and what was the solution? If you got confused about a concept, what was it, and what was the clarification?
We got stuck on the how to actually have the for loop find out the biggest number in the sequence. Ferny helped us figure it out. He made an extra variable that exist as a holder for the numbers and if the number is bigger then the holder it will replace the holder. When it ends, the biggest number will print out to the screen.

Unix Commands

Spend 3-5 sentences describing the programs and commands you know how to use in your Unix shell (besides games). What is pico and what does it do? What is g++ and why do we need it? What about "./a.out"? Look up one other command or program and describe what it does.
pico opens a document to type your code. g++ to my understanding checks if you have any bugs in your code, and the ./a.out run the recent code. One extra command that is on unix is "pine" which is the email command where you can send emails and view them. 

UNIX VS. VISUAL STUDIOS

Compare and contrast coding in UNIX versus coding in Windows using Visual Studio. What steps do you take for each? How are they different? How are they the same?
Unix and Visual studios are used for coding but they are different in theirs own ways. Visual Studios is a more responsive compiler where you can see your errors in real time and UNIX you have to save the code then run it and then you see if you have any bugs. Another thing that makes them way different from each other is the helper libraries. Unix is limited on what libraries you can use and that means you might have to switch up your coding. With visual studios there is a more variety in the libraries you can use and is seen as an easier way to code because you can see the errors in real time.

Friday, October 12, 2018

compare and contrast return types and parameters

In 3-4 complete sentences, compare and contrast return types and parameters. What are each used for? How many can you have of each? Provide code examples to explain what each does.
 Return types depend on different types of code because you need some certain return types for some code to work. void returns nothing, bool is used for codes that require a yes or no answer, int is a number with no decimal, double is for numbers with a decimal, string is for for whole word answer and finally char is for one letter inputs. The parameter just like the return type depends on the type of code you are writing. It might contain on of those variable types and it could take multiple parameters.

Friday, October 5, 2018

Feedback

Tell me something that is going well in the class, something that I can improve on as a teacher, and then again something that is going well.
I am loving the warm ups and are good review topics. One thing that I wished you did is after the warm up you give us time for our projects we are working on. I want to work on our projects to get them done on time.

Thursday, October 4, 2018

Unix

Spend 3-5 sentences describing the programs and commands you know how to use in your Unix shell (besides games). What is pico and what does it do? What is g++ and why do we need it? What about "./a.out"? Look up one other command or program and describe what it does.

Unix shell is important because it is the industry standard and a lot of companies are using it. I know how write code, save it and then compile it. To write it you need to type pico into the console window then hit enter. You write all the code you need, then to save it you need hit ctrl+o, name it then hit enter. Then you exit it by hitting ctrl+x. That is how you write the code. to run and compile the code you need to press, g++ and the name of your code, then type ./a.out to run the last doc file. If you wrote your code with no bugs it will run successfully. 

function

 Tell me about writing functions. What are the three steps, and what do they mean? Where do they go? What do they look like? 

The 3 steps for a function is definition, call, and declaration. The declaration goes above main, the call goes inside main, and the definition goes after the end of main. The declaration would look like this: return type name(parameters); The definition is going to look similar, just instead of the semi colon it is going to have curly brackets. The call is going to have more things taken away, for example: name(parameters);.