Preparing for Graphics Projects
This semester we will be using our programming tools to create some games that involve graphics. These graphics are rendered using OpenGL. Unfortunately, OpenGL cannot render through a PuTTY session, so we have to use a different option. There are several options that you can choose among, each one has different pros and cons. They are each presented here, and you can decide which is best for your situation.
In addition, your instructor may suggest a certain path for their students to keep as many people on the same page as possible. Please watch for their guidance.
Sometimes getting things up and going is a little tricky. Please reach out and help one another in this process. In addition, you can also consult these:
Option #1 - Setup a Linux Virtual Machine on Your Laptop
We have prepared a Linux virtual machine that you can download and set up on your laptop. This means you will have your own "Linux computer" running as "a program" on your own computer. You have complete admin rights on this "computer" and can play with it as much as you'd like. This is really cool! In fact, this is how a lot of development is done in industry today, because a company can set up an image of a virtual machine that a new developer can easily set up and use.
For this option, you will need to download an install the virtual machine program itself, and then download a Linux image that we have set up for you. (Alternatively, you could download and install your own instance of Linux, which is great. The benefit to using ours is simply that it is pre-configured with all the tools you'll need.)
You will then write your programs on your own laptop and use some tools in the virtual machine to copy them up to the Linux lab when it is time to submit.
- Pros:
- You can work on your own laptop.
- You use tools (such as Emacs) that you are already familiar with (but of course you get the mouse!).
- You do not need to make any code changes when it is time to submit.
- Available for both Windows and Mac users.
- Cons:
- You need to download some extremely large files.
- Because you will be running a second "computer" on your laptop, it needs to have sufficient resources (e.g., RAM) to handle this adequately.
Click here for instructions on how to setup a virtual machine for CS165.
Option #2 - Use a Setup like PuTTY or MobaXTerm but Configure it to Enable Graphics
While the default configuration of PuTTY (or ssh on a Mac terminal) does not enable programs running in the Linux Lab to render graphics on your laptop, you can install and set up another program that works with PuTTY, called an X-Server. This requires a little more configuration in Windows than on a Mac (or Linux) to get to work properly, but can be done for both.
A related approach for Windows users is to use an alternative to PuTTY called MobaXterm. It is like PuTTY but enables you to render graphics and use the mouse. It is very easy to install and also has an interface for copying files to and from the Linux lab.
- Pros:
- Small downloads.
- Your code lives, compiles, and runs in the Linux lab, so it is very easy to submit.
- Cons:
- It requires configuration. The most work is required for PuTTY, with MacOS and MobaXterm being pretty straightforward.
- The rendering of the graphics can sometimes be very "laggy". It seems to work pretty well if you are on campus, but over connections from students' apartments and various Internet connections, sometimes the delay becomes very large.
- This is perhaps most pronounced with MobaXterm, where many students report it works great on campus, but is completely unusable at home because their ship has already crashed before the first image comes up.
Click here for instructions on how to set up MobaXTerm and also how to set up X forwarding on a Mac computer using SSH.
Once you have your software configured, click here for instructions on how to create and test a simple OpenGL project.
Option #3 - Xcode (Mac users only)
Mac users can use Xcode, which is available for free and is a powerful IDE (Integrated Development Environment) used to develop real-world projects. It requires a some amount of configuration, but once running works very well. There are some changes that have to be made in the code. This means, that each week when an assignment is submitted, you must make sure to change these elements back to the way Linux expects them, and make sure your program runs correctly in that environment. Your instructor will expect it to work in Linux.
- Pros:
- Powerful IDE - It has lots of nice features to help in coding, and you can gain experience with a real-world tool.
- You can write and run your programs on your own laptop with no lag issues.
- Cons:
- Powerful IDE - Many of the features it has are overkill for the size of projects are are doing, and sometimes make it more cumbersome to work with simple files.
- You will have to copy your code to the Linux lab and make some code changes each week and ensure that it works in Linux, before you submit.
- Some setup work is required.
Click here for instructions on how to setup Xcode for OpenGL development. How to verify that your project runs correctly on your cs165 Linux account.
Option #4 - Microsoft Visual Studio (Windows users only)
Similar to Mac's Xcode, Microsoft has a very powerful IDE called Visual Studio. This is something that real developers use in industry on large projects. For many years students could obtain a free copy, and now, Microsoft has made the full version of their "community edition" available to anyone for free.
Using Visual studio will require a large download, a significant amount of configuration, and then because you will have to change your code files somewhat to work in this environment, you will need to copy them to the Linux lab and make changes each week, ensuring that it works on the Linux lab before you submit. Your instructor will expect it to work in Linux.
- Pros:
- The most powerful tool of the options here. It has great tools to help in the writing and debugging of programs.
- Cons:
- The most powerful tool of the options here. It is clearly designed for bigger more involved projects than we will be doing. Sometimes this causes problems/unforeseen circumstances, such as files ending up in different locations.
- Large download.
- Requires the most configuration of the options here.
- More changes are required to your code at submit time than other options.
There are two versions of Visual Studio that you can install for OpenGL development. Instructions for version 2015 and Instructions for version 2017. How to verify that your project runs correctly on your cs165 Linux account.