Code Philosophy: Elegant Coder

You want to write clean code, basically things that are easy to read and are not too bad on the eyes. You can generally do things like clever code that looks fancy and artiful, but the issue of this is that doing so is very annoying to maintain and produce.

You generally want to produce code that is well documented, and very very simple. You want well named variables, good uses of objects, and explanatory comments that showcase what your code is doing.

Things on the other hand like redundancy, commented out blocks of old code (debatable on how unelegant that is but alright), but unused assignments and variables, names that are too complicated, all of that tends to be considered bad coding practice.


Game Project Part 2 a: Game Character

You basically draw your character in six different positions, one facing front, one facing to the right, one facing to the left, one jumping, one jumping to the right, and one jumping to the left. They have two variables: gamechar_x and gamechar_y which is the position for the character on the x and y axis and they manually change this for each of the given values. You take these values and then draw your character relative to this point and what not.

It is basically just you setting up your different character sprites for how you want to set all of these things up. Note that this gameChar_x and gameChar_y variable is located as the origin on the bottom middle of the given character frame, which is fucking retarded but whatever it’s their course let them do what they want. All he really goes over in the video is just drawing his character and shit, pretty calm cookies.


Game Project Part 2 b: Using Variables

So you basically now have this environment that your game character is able to exist in, and what you seemingly want to do is just use the code base that they have given you, and paste in your own character from part a.

Then whenever you click on the mouse, it will basically set that character drawing locations onto that mouse click with all of the relative stuff, so whenever you click on the mouse, it moves your character over there.

You will then also copy over the code for the tree from part one, and then add in a tree_pos variables to control the position of the tree, this variable is then initialized inside of the given setup function, and all of that is good and great, this is really just some dumb-shit man I cannot lie to you.