Result – this is actually game-like!
Today’s lesson in that things are always more difficult than they seem. Tried adding a MotionEvent.ACTION_MOVED detector to the onSceneTouchEvent() method of my TouchSprites so they could detect when a finger dragged over them and subsequently would knock them about, but had a bit of trouble. Apparently, as I’ve learned on the excellent AndEngine forum, an object needs to first catch an ACTION_DOWN event before it will start to receive subsequent ACTION_CANCELED or ACTION_MOVED events. This makes sense in hindsight, but it also make things a bit more difficult when you’ve started thinking about it from the other way, as if these events were just globally propagated down the chain of objects that are subscribed to receive them, until one steps up and handles it.
The solution is to create another physics object that’s hidden, and move it about to knock the other objects around when necessary. Also, I had to update it in a different thread, and I still get some crashes occasionally due to memory errors. Need to look at those…
So it looks like “kicking” an object (a cat, in this case) is going to be all I can get done today, because tonight is the opening at The Brick Box in Brixton Market and I’ll be showing Drawn Together there amongst some other visual and artistic goodness.
I did add simple scoring to this version – this should be handled by a GameLogic class, which I’ll work on a bit tomorrow if I get a chance (have some other stuff to do).
Here’s today’s app. (I overwrote yesterday’s, because, well, it sucked)
No CommentsToday I’m going to create more of a “game,” eventually called CatFishTron. No, really. I’ll be learning how to add sound to a game, a moving background, and maybe, if I have time, add some self-removing sprites (for explosions, etc!)
First task – to make a sprite “blow-up” in AndEngine you use a SequenceModifier and attach it to the Sprite:
this.mBlowupModifier = new SequenceModifier(new ScaleModifier(1.0f, 1.0f, 0.2f));
final IShapeModifierListener listener = new IShapeModifierListener()
{
public void onModifierFinished(IShapeModifier arg0, IShape arg1)
{
// this is a function in my main Activity that removes a sprite entity and physics body in a separate thread
destroySprite(_spriteEvent.mSprite);
}
};
//set a listener to listen for the modification having finished
this.mBlowupModifier.setShapeModifierListener(listener);
// attach it to the sprite entity object
_spriteEvent.mSprite.addShapeModifier(mBlowupModifier.clone());
Here’s today’s code (again, it’s not complete, just building on the previous day, but you might find it interesting…)
Here’s the app itself, you can open the link on your android phone to install it.
It’s a work in progress, remember. It take a bit to make a video game… even a crappy one!
Also, I promise that at the end of this I will write a tutorial.
Now go play MeowTron.
No CommentsFor Creative Pact 2010 I’m going to be teaching myself how to make a game using the open source AndEngine for Android mobile devices. apparently, Android apps are the next goldrush, the biggest thing since skinny jeans, and I never got a pair of skinny jeans so I might as well jump in the deep end here.
Firstly, I already blogged about starting with AndEngine, so I won’t repeat myself here. I’ll instead start with my current app, which is going to be a physics-based game with draggable characters.
AndEngine uses Box2D under the hood as its physics engine, which you can find here in project form. Of course, you don’t need to download the project unless you want to see the source code (which can be useful as I couldn’t find any javadocs as of yet). You can instead use the Java jar that comes with the main AndEngine project from GoogleCode.
To get started, I imported the main AndEngine project into Eclipse (New Project->Android Project->create from existing source) and followed the 5 minute video on starting a project in Eclipse, then dragged one of the Physics example Activities from the main project into my new game project (called, funnily enough, GameTest).
The next bit caught me – I need to drag the andenginephysicsbox2dextension.jar (whew… what a name) into my lib folder from the AndEngine main project, and also create a libs folder in my new project and then drag the libandenginephysicsbox2dextension.so from the main project’s libs folder into my new libs folder. If you don’t do this, you will get immediate, fatal errors every time you launch your new app. Of course, in hindsight, this seems perfectly obvious, doesn’t it?
Ok, finished the app but ran out of time to explain – here is the code and all that fun.
Try installing the apk on your phone!
No Comments
Giant Google Android statue with puppy and cupcake by ToastyKen, on Flickr
I decided to take the plunge and develop an Android app. We’ve got a good idea for a game for all ages. A really good idea. I could have started on a iPhone/iPad app, but I am put off by Apple’s “curatorial” ways and can’t afford, as a small developer, to be denied or held back from developing my app. That, and I don’t have an iPhone (yes I am the only media arts person in London without one, it seems). I have a semi-ancient Google G1 running on T-Mobile, and I love it because it has a thumb keyboard and usually works well as a phone.
It also runs WikiNotes, where I keep all of my notes and diary. WikiNotes is a free-form notepad-like tool (a wiki, like Wikipedia) that I can organize (or dis-organize) my thoughts and notes into. It really needs an update and some more features, but even without things like undo and revisions it still beats the pants off anything else out there, as far as I’m concerned.
Moving on – developing Android on Eclipse is so easy to set up I thought something must have been missing. Especially on OS X. Instructions are well-written and organized on the Android developer’s website. You can also use Processing to develop to Android but my aging phone only runs Android OS 1.6, and Processing supports versions 2.X and up. I understand the need for forward-compatibility, so I won’t complain. Most new phones run 2.0+ these days. Rumor has it that the G2 is due out soon from T-Mobile…
After writing a simple “Hello, Android” app, I looked for a Java games engine and found the AndEngine project.
It’s open source and has some good, clear documentation, including this excellent 5-minute video that takes you from 0 to an app. Rock. Done. The physics examples are great, too. More to come…
One CommentOriginally uploaded by da mad pixelist
For an upcoming exhibition (my first solo exhibition) I’ve been working on a series of 5-7 new works, from interactive software to prints to sculpture. These tests are from a live capture of my hand opening and closing in front of a camera attached to the computer, using custom written software (a bit of OpenFrameworks and lots of standard C++) that exports each individual motion into a vector-graphics file (SVG) that I can edit and send to a laser-cutter (in our excellent arts workshops at UCA Farnham) to create a sculpture that solidifies the motion into a physical object.
This test is about 80% size, and about 25% of the total slices (the rest I will add this week). Its using 6mm plywood from the local building shop, and will be 78 unique slices in total when finished, connected together at the bottom via a metal cable.
Exhibition details:
24 May – 29 May – Waving / Drowning
An interactive exhibition by pixelpusher – pixelist.info/
This series of works re-imagines the artist’s hand in a number of different mediums as a series of modern mystical symbols. Their meaning is uncertain, removed from their traditional context: are they waving at us, or flailing in a sea of lost meaning?
No CommentsA visualization of each individual word used in twitter status updates overnight from 6PM GMT on Feb 22 2010 until 10AM GMT on Feb 23. Movement is caused by the list of words growing, as the program sees more individual words. Words used more often are larger and brighter (they grow logarithmically). There were a few points where the feed was lost, and it recounted the same status update over and over (you can tell where because the same words grow larger) but I decided to post this version anyway, because I still think it is interesting in this state. I have collected more data, such as word ordering, and will work on another version. done in Processing – source code is here (you need to add your twitter username and password)
The video above is a bit fuzzy – here’s a better image:
No CommentsI’m working on a music video for a song by PJE called The Employee and doing some tests. The idea is to create the surrealistic daydream of a 1950’s woman on her first day on the assembly line of a dreary, machine-like typist job. I’m doing all the visuals rendered in fluxus, cut with some excellent archival footage of office films from archive.org. This one, a 1950’s film called “Office Etiquette” is singular for having some really nice, sweeping, tracking chots mixed with good close-ups, which work well in a music video. The original has such a cheery attitude about mind-numbing, repetitive busywork that is practically crawling on its knees and begging to be subverted.
I will first cut the video as a straight music video, with close/wide/tracking shots and clean cuts to the beat, then add in the surrealistic, colorful 3D animations done using fluxus and bit by bit break down its sanity. Look here for more…
No CommentsRecorded from a live performance. My first audio-visual (not just visual) work in about 5 years. Created for NOISE==NOISE and The Curiosity Collective’s JohnnyMass on 28 Dec. 2009. Uses Fluxus & SuperCollider.
No Comments