In-depth Post #2 – Programming For Videogames

In-depth Post #2 – Programming For Videogames

Justin C.

Reflection questions for post #2:

How did your mentor gain their experience/ expertise?

My Mentor learned from 3 main places:
  • School (Simon Fraser University, School of Interactive Arts and Technology).
  • Self-led learning from online resources and personal projects.
  • Work gives me lots of opportunities to write and read code.

“I work for Electronic Arts as a Game Designer/Producer. In this role I am responsible for content and feature creation. In both of these roles I need to be knowledgeable of how code works to best advise the Software Engineers on their tasks as well as to debug issues. Our commonly used languages are C++ and Visual Basic. Understanding these languages as well as general computer science allows for easier creation of feature designs as I understand how things work which lets me know what is possible. Prior to this role, I was responsible for data analysis using softwares such as Excel, PowerBI, Splunk, and a proprietary visual scripting language. In these softwares I would build tools/algorithms to automate the data gathering and analysis process.” – Conor, my Mentor

What were those experiences like for your mentor?

“It can be hard to understand the syntax of new languages, especially when reading across hundreds of lines of code but a general understanding of the basics can get you a long way. The key for me is to know where I can find documentation on the language. Having access to the documentation allows me to understand how that language processes data fed into it. As with all things, practice helps overcome challenges but to be skilled in all areas of programming requires a significant time commitment, at least a lifetime. Challenges always come when trying to understand new concepts, like how does the microchip in the graphics card actually process data. Understanding that unlocks a whole new area of programming where you can leverage that technology. The hardest step is trying it out.” – Conor, my Mentor

What wisdom have you gained from your mentor so far? 

So far in my In-Depth Programming journey I have learned many practical and technical skills towards Programming. Some of the technical ideas that I have learned include;

  • It is a programming convention in C and Java programming that Variables and methods start with their first words being a lower case and all of the proceeding words start with capital letters. 
    • Ex: movingBall. 
  • Use [] square brackets to indicate notation (this is standard across most programming languages) 
  • I used a technique called casting. A cast is a way of informing the compiler that you intend to make the conversion. To perform a cast, specify the type that you are casting to in parentheses in front of the value or variable to be converted.

So far I have been using Object-oriented programming (OOP).

Object-oriented programming (OOP) is a computer programming model that organizes software design around data, or objects, rather than functions and logic. An object can be defined as a data field that has unique attributes and behaviour.

OOP focuses on the objects that developers want to manipulate rather than the logic required to manipulate them. This approach to programming is well-suited for programs that are large, complex and actively updated or maintained. This includes programs for manufacturing and design, as well as mobile applications. For example, OOP can be used for manufacturing system simulation software.

The organization of an object-oriented program also makes the method beneficial to collaborative development, where projects are divided into groups. Additional benefits of OOP include code reusability, scalability and efficiency.

 

Report on any progress and sub-skills learned so far.  Share photos, videos and sound recordings where applicable.

My first ever running code. This code “printed” the text “Hello World!” which is often the first code that beginners are asked to write.

Moving Balls:

I created my first program. This program when ran randomized the number of balls, radius of each ball, speed of each ball, and starting position of each ball.

I used the println command to check that my variables had been set. In this instance, I checked that my radius was equal to 30 as that is what I wanted it to be. 

I set “b” as a global variable so it could be accessed in the draw method 

 

Set the variables of the ball so the ball object knows where to start the ball. 

I set a new variable called speed which controls how fast the ball moves. 

 

Setting the speed of the ball to the variable in setup. 

In this case the speed was set to 2, meaning that it moved x+2 and y+2 every frame. 

I created an array that was used to create multiple balls.  

  • Used [] square brackets to indicate notation (this is standard across most programming languages) 

I used the technique called casting which I talked about earlier. In this case I converted a float variable into an integer.

We finished setting the parameters of the balls. In doing this we randomized: 

  • The number of ball objects 
  • The radius of each ball object 
  • The speed of each ball object 
  • The starting position of each ball object 

What have you learned so far, in terms of facilitation strategies, that might contribute to your own development as a mentor?

Provide useful information and context:

As a mentor, it is important to acknowledge that when mentoring your mentees will have different levels of knowledge about a given topic, different levels of experience with the process being used, and different ideas about how the process should go or what the outcomes should be. It is important to find out what your mentee’s expectations and knowledge of the given topic are so you can further orchestrate your mentoring towards them. This will give them more confidence and allow them to learn at the pace perfect for them.

Guide the discussion or process:

A mentor’s central role is to guide a discussion or process so that your mentees can achieve their goals or take actions that are in their best interests. With the proper execution of that role, mentors may use an expansive range of strategies that will be developed over time.

Be intentional:

Be intentional about the desired outcome and purpose of your meeting. Be clear about framing the topic and guiding questions, and then be neutral about the content. This is about leading from behind. As a mentor, you have control of the meeting while your mentee should have the most control of the conversation which you will then contribute to.

What to do before my next meeting: 

  • Look around the api reference document and try to get the colour of each ball to be randomized 
  • Create a new project in Unity and take a look around the ui and get used to how it looks
  • Watch The Coding Train, use the link Conor sent in his previous email 
    • Look for new methods to try out 

Api Reference Document: https://processing.org/reference/ 

The Coding Train: Click Here

Leave a Reply

Your email address will not be published. Required fields are marked *