Pong
For the final project, I had decided to implement the game of pong. Whoever gets a score of 10 first wins! I implemented this game with the idea that one would want to play against the computer, not another person. For this reason, I made a fairly simple method that made the Phone’s paddle follow […]
Final Exam – AlchemyLab – feltonj
If you read my pre-programming write-up, you would know that I’m attempting to solve the problem of wasting ingredients that don’t match each other in Skyrim. Problem solved. AlchemyLab doesn’t have all the features I set out to implement but it is definitely useful for those who want to spend any amount of time in front of […]
Pong
For the final project, I decided to create Pong. I plan to have a Game Activity, a View that will extend SurfaceView and implements the SurfaceHolder.callback. My overall goal is to make Pong in a very simplistic way (nothing too fancy..), and if all goes well, perhaps researching into animation for the game (I feel animation is […]
Plotting samples with GNU Octave
Suppose we have a plain text file of samples named samples.txt, with each intensity on its own line: We can visualize these results in GNU Octave with: If we write this code in a script named plot_samples.m, we can simply run plot_samples at the Octave command-line.
CS 491 Lecture 24 – Trivia competition
Agenda ask 100 questions give out prizes Haiku
Levenshtein distance
We’re looking at methods for comparing the distance between two sequences of text. A fairly simple one is Levenshtein distance, which calculates how many edits it takes to go from one string to another. I wrote a little calculator to demonstrate its results. Enter two words and calculate their distance. Cell (i, j) reports the minimum […]
CS 145 Lecture 25 – Sound
Agenda how’d it go? generating sound (frequencies, WAV standard) binary I/O little endian vs. big endian Code LEDataOutputStream Haiku
CS 145 Lecture 24 – Growable arrays
Agenda identity per instance instance vs. static a growable String array Code … Haiku
CS 491 Lecture 23 – BThwack
Agenda BThwack We were going to talk about incorporating a two-player Bluetooth mode into Bluecheckers, but it was getting out of hand. Instead, I looked back at the last of apps you folks expressed interest in back at the beginning of the semester. And there is was. Whack-a-mole. But not just any Whack-a-mole, Bluetooth-enabled Whack-a-mole. […]
CS 491 Lecture 22 – Bluecheckers
Agenda case study of making a NDK/OpenGL powered game Bluecheckers A couple of weeks ago I got the latest issue of Make magazine in the mail. On page 56, Charles Platt describes a 2-player Chinese Checkers game. I thought, “That’d be fun on a mobile device.” We don’t have time to code it all from scratch, but […]