teaching machines

Colliding with and mutating text in Unity

Problem: I want, in the Unity game engine, to shoot projectiles at text and decrement the number the text is displaying. Solution: Add a 3-D text game object. Add colliders to projectiles and the text. The collider on the 3-D text will automatically size itself around the bounds of the text. Implement OnTriggerEnter and update […]

Links on integrating Unity and Android

I’m glad I’m not the only one trying to hook up Unity and Android. I’ve found the follow links helpful in our project: General Unity/Android documentation Comprehensive example of a custom Unity plugin How Unity handles custom resource IDs (another) How to overlay a custom view on the Unity player How to change the text size […]

Calling Unity Code from Android

Previously I integrated Android with Unity by having Unity poll methods I defined in Java. We used reflection to pull out the activity object and invoked my custom methods on it. Today I looked into going in reverse: can I call Unity methods from Android? It turns out to be pretty simple. I first made […]

Custom Resources in a Unity Android Project

The Unity documentation on building custom Android plugins is terse, but it does tell me how to package up my Java classes and manifest and bundled them in to my Unity project: The resulting .class file(s) should be compressed into a .jar file and placed in the Assets->Plugins->Android folder. Since the manifest dictates which activity to launch it is […]

Build Script for a Unity Android Project

Having learned how to integrate my Android code and resources with Unity, I went looking for a way to simplify the migration of my files to my Unity project. (I found repeatedly exporting a JAR and copying over the manifest and resource directories painful.) The result was this Ant script, which drops the class files, […]

HNRS 304.503 Lab 3 – 4YO

A simple 2-D game Your task in the next two weeks is to design and implement a simple two-dimensional game in Unity. Follow these guidelines: Simple means target 4-year-olds. My four-year-old son will give you feedback. Collaborate with your partner or partners. Plan on how to divide up tasks before diving in. Teams may comprise […]

Buster Minutes from 2012/10/04

The OS shell assignment is due, and our student workers are sagging. Three more Pis are ordered, with an undetermined ETA. We need monitors. (James) We need a switch. (link from Peter, order from Chris) To show meshes, we’ll need a mesh reader. Let’s do OBJ. It’s been done, but let’s use this as an […]

CS 491 Lecture 9 – Web services and backgrounding

Before class A Before next class: Watch http://youtu.be/7etGy5NMASQ. Read http://www.json.org/fatfree.html. B Before next class: Watch http://youtu.be/nR-I8TG9mdE. Read http://techtej.blogspot.com/2011/02/android-passing-data-between-main.html. (This post offers some background on how Handlers work. There’s little narrative in the official Android documentation. Note that the UI thread already has a Looper; we need only create a Handler.) In class Continue on your task from Tuesday, […]

OpenGL and Mouse Interaction on Raspberry Pi

Last time I was able to get a simple triangle up on my Raspberry Pi using Python bindings for OpenGL ES. My goal this week was to get mouse interaction going. My big question was, “Can I move the triangle?” Normally I’d use a windowing toolkit like wxWidgets or SDL to get mouse events. But […]

HNRS 304.503 Lecture 9 – Astefreuds II

Agenda Discussion I want a constant rate of rotation (framerate-independent animation) I want to fiddle with speed, not code (public variables) I want to control my ship (input layer) I want to test out collision (risks first!) I want to tweak as little as possible (prefabs) I want to destroy objects I want points (GUI […]

1 176 177 178 179 180 204