Customize console window size and title. Modifying console window properties can improve your application interface for players of your text-based game, or users of your application. The application's title bar and window size are a couple of the basic command line window properties to consider modifying. Code examples are included to help you test out ...continue reading "Console Application Window Properties"
Category: Language
Content that is specific to one or more languages.
Simple C# Madlib (Part Two)
Iterating our simple C# Madlib code This is part two in a series to create iterative versions of a Madlib in C#. If you haven't read through , start there! Next Iteration A good practice is to keep the amount of code in our Main() function to a minimum. The first step we'll do in ...continue reading "Simple C# Madlib (Part Two)"
C# Loops: Ten Bears Song
Loops in C#. Loop structures are helpful when repeating statements; for example, if we wanted to print out a message to the console, or if we want to call a function. There are several types of loops that can be used, and each has their own strength. We'll look at do-while, for, and while C# ...continue reading "C# Loops: Ten Bears Song"
Random Image Composition via Directory List
Create a random composition with Processing and Java. In a previous random image composition maker images were loaded in based on a random number and relied on the images being named as numbers (such as "01.png"). Using java.io.File we can make a composition maker that has more flexibility in loading images; it doesn't rely on ...continue reading "Random Image Composition via Directory List"
Rectilinear Randomized Composition
Composition of random rectangles with Processing. A randomized composition maker that will create shapes of a random size, filled with a random shade of grey, and place them in a random spot within the display window. The fill() function is passed a random number between 0 and 255 to determine the shade of grey. A ...continue reading "Rectilinear Randomized Composition"
Random Image Composition
Compositions from randomly loaded images using Processing. Create a composition with randomly chosen and placed images. A variable in the Sketch (numberImages) tracks the number of images that the two random ones will be drawn from. int numberImages = 5; The loadImage() function randomly selects a number within the range of images available (in this ...continue reading "Random Image Composition"
Random Lines with Processing
Create dynamic visuals with Processing. Creating compositions of random lines is easy with Processing. Lines of various shades of grey are drawn across the width of the frame inside a for loop. Random Lines, Black Background This first version creates an 800 x 600 display window with a black background. /*programmingisfun.com*/ size(800, 600); smooth(); background(0); ...continue reading "Random Lines with Processing"