teaching machines

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 […]

TextGetter

For Homework 3, I had decided to take the first few texts from TFLN and show them on my application.  To get the texts, I parsed the HTML that I had pulled from the homepage of the website. Because the website updates on its own, each time you open the application, you will get the […]

CS 145 Lecture 23 – Composing with objects

Agenda static vs. non-static designing a Flashlight design a room for a text adventure Code Stopwatch.java package lecture; public class Stopwatch { /** Time at which stopwatch is started */ private long startTime; /** Time at which stopwatch is stopped */ private long stopTime; /** * Starts stopwatch. */ public void start() { startTime = […]

CS 145 Homework 4 – due before 12/15

See the PDF. When you download speccheck_hw4.jar, make sure the filename ends in “.jar”.

CS 145 Lecture 22 – Designing objects

Agenda writing a Stopwatch objects hide information managing a “dungeon” with objects writing a flashlight Code Stopwatch.java package lecture; public class Stopwatch { /** Time at which stopwatch is started */ private long startTime; /** Time at which stopwatch is stopped */ private long stopTime; /** * Starts stopwatch. */ public void start() { startTime […]

CS 491 Lecture 21 – Bluecheckers

Agenda explore GLSurfaceView hook GLSurfaceView.Renderer callbacks up to our C++ renderer incorporate UI events 3-D on Android Android offers a special GLSurfaceView for fast rendering. It also provides Java bindings for the OpenGL library. This added layer can reduce performance, so ultimately we’re going to want to use our low-level C++ code to do all […]

CS 491 Lecture 20 – OpenGL ES

Agenda discuss the OpenGL framework develop 3-D on the desktop in C++ migrate C++ to our Android device using JNI get a lit sphere running on a mobile device OpenGL ES It comes time in everyone’s life for a little 3-D. The process of taking 3-D objects and showing them on a 2-D screen is […]

CS 145 Homework 3 – due before 12/7

See the PDF. When you download speccheck_hw3.jar, make sure the filename ends in “.jar”. Here are some example image sequences: mog.zip hand.zip Feel free to contribute your own and share your resulting images on Piazza.

CS 145 Exam 2

This exam was either: far too easy, taken by very capable students, or poorly graded. I lean toward a combination of the first two. Exam

CS 145 Lecture 21 – Our own objects

Agenda command-line arguments writing an NDeckerBurger class writing a class: Figure out what it needs to do. (Methods.) Figure out what its persistent state is. (Instance variables.) Figure out how to initialize the state. (Constructor.) midterm 2 Code CommandLineArguments.java package lecture; public class CommandLineArguments { public static void main(String[] args) { // for (int i […]

1 214 215 216 217 218 233