Pipes Screensaver

Pipes screen saver. If no one is logged on, then the system is using the 'default' screen saver settings. You can disable this easily by changing a setting in the registry. Go to 'HKUSERS. The screensaver also comes with a set of options. They’re accessed from the settings panel, and make it possible to choose a single or multiple pipes, the type of joint to display, as well as the.

  1. Pipes Screensaver For Mac
  2. Pipes Screensaver Free
  3. Pipes Screensaver Download

Carl Moser, Emma Price, Cleophas Kalekem, Jeremy Garcia

Overview

We implemented a screensaver in C++ using OpenGL based on the pipes screensaver. View or download our code here.

Goals

This project was created for our Software Systems course. For this project, our team was interested in implementing graphics using OpenGL and C++. Creating a screensaver that was 3-dimensional and changed over time seemed like a perfect way to improve our skills and create something enjoyable for everyone.

Background

Going into this project, half of the team had not used C++ or OpenGL before and the other half had a reasonable amount of experience. Most of the background research that was done in preperation for this project consisted of online tutorials to get all of the members comfortable using OpenGL and a lot of experimentation with example code. The primary outcome of this research was knowledge of how OpenGL creates and displays objects and how it allows objects to change over time. We also learned a lot about how OpenGL programs tend to be structured and which functions act as the building blocks for their programs.

Here is an example of how we used some of the GLUT library opengl functions:

Implementation

Overview

Our pipe screensaver is created with a pipe that grows incrementally around the screen. Once it grows to contain a certain number of pipe units or it cannot grow any more (because it would hit itself otherwise), it stops growing and remains on the screen while more pipes continue to grow. After SOME pipes are created, the entire screen resets and it starts building again.

Screensaver

For example, this is how we implemented our reset function:

Map Creation

In order to grow the pipe, we first needed to create an environment for it to grow in. This took the form of a three-dimensional matrix of integers that was slightly larger than the screen. The map with all of the edges marked as 1 and everything within marked as 0. All places within the map that contain a pipe are marked with an integer according to the direction that the pipe should be facing.

This is the constructor map function:

Pipe Generation

Our pipe is made of a dequeue (double ended queue) that contains vectors representing coordinates where the pipe has been. The pipe begins at a random point and from there it grows according to the timer function. Each time it grows, the pipe randomly chooses a direction to go in and creates a new coordinate which is pushed onto the pipe dequeue. It also changes that point in the map from 0 to 1-3 (based on the direction the pipe should be facing). After this, a for loop goes through the pipe coordinates to draw and rotate a cylinder at each point.

Our pipe coordinates are contained in a dequeue because pipe growth is determine only based on the previous value in the pipe dequeue. Our pipe coordinates are housed in a vector because they do not need to change after they are created.

Pipes Screensaver

This is an example of the code that we used to generate our pipe:

Once the pipe has reached it’s limit all of it’s coordinates are added into a deque containing all of the coordinates that have been generated this round and the “current pipe” coordinates are cleared. This allows us to continue generating new pipes while still displaying old ones.

Pipes Screensaver For Mac

This change over happens here:

Pipes Screensaver Free

Error Checking

When the pipe randomly chooses a direction to grow in, it must first check to see which surrounding coordinates are available. It does so by taking the last coordinate in the pipe queue, and checking the value of the surrounding x, y, and z directions. If that direction is available (is 0), it will add that direction to a vector of possible directions that the growing pipe will choose from. The direction vector contains 10 times as many options to continue growing in the direction that pipe is currently pointed, which mimics the choices made within the Actuall Pipe Screensaver. If this feature were removed, error checking and pipe generation could be combined to simplify the code.

Pipe Coloring

Mac

In order to get each pipe to be a different color even while another pipe was growing, we used a deque that contained a vector of red, green, and blue values from 0 to 255 for each segment of the pipe that was created. Red, green, and blue are global variables that are first initizialized with randomly selected values. These values are the RGB values for that each segment of that pipe and are pushed onto the deque containing the colors. When a new pipe begins to grow, the RGB values are randomly assigned agained and will hold for the rest of that new pipe’s segments.

Results

Pipes Screensaver Download

The following video is an example of our pipes screen saver in action.