Last week

Last week till the final presentation. Just some thoughts and list of things I am still working on that are yet to complete. I will be hunting on the materials for flashlight and stand first. Then sound I might make my own sound effects with garageband and also download some sound effects and free source (freesound.org) then mix them in Adobe Audition.

  1. Sound (ambience, SFX)
  2. Special crafted Flashlight
  3. Stand for sensor and laptop

 

Another thing that I am a little worry is the exportation of the sketch it seems to be abit laggy in windows but work perfectly fine in Mac. As when I preview the sketch in Processing in windows, it starts to take quite some time to run it. One last thing is that i bought USB 3.0 extension cable for the sensor has arrived but I am not sure if I want to use it during presentation or not because of the laggy-ness of the sketch, I am afraid using an extension will worsen the situation.

 

Processing little bugs

Processing is making me frustrated. The functions that are called and run cannot be called again. The mousepressed sometimes works like click once sometime like mouse hold. driving me crazyyyyyyyy


UPDATES:

I revolved the function rerun again by separating them into new tabs, instead of in the same file, now everything looks neater.

Dealings with Sprite Animation in Processing – Part 2

After the change of interaction flow, I have to do extra 4 more sprite animations, so total of 8 sprite. There are issues of getting the exactly right size of the sprite in order to have smooth and right positions sprite, but in the end I finally pulled it off. Not perfect, but I think it is acceptable at this moment because I have have plenty of things to worry about. One not so satisfying part of the sprites are the framerate being too fast, because its looping so its quite funny looking at the snake sticking out its tongue in and out every milliseconds. But yeah, thats it for the Sprites next thing is to having mouse click function on them. I will update a screen recording of the sprites in the next post 🙂

 

Sensor > Wii mote situation

There’s a minor problem with the may flash sensor bar to wiimote. The sensor needs to be connected to the laptop, while the laptop needs to be connected to the projector. And of course for the set up, I want the sensor bar to be as minimal  as possible so that it won’t disturb the experience of user navigating the screen. I tested using an USB extension cable to connect sensor to laptop but the connection signal became really weak, sometimes it’s even not detecting it. The extension is used so that I can hide the laptop and project behind somewhere that is not visible. 

I talked to my lecturer about it he suggested that it might be the cable signal not strong enough, can try getting an extension that has a booster signal or it might even be the sensor itself cannot support. So I need to have a back up plan, to design a sensor stand that can hide a laptop with it. In the meantime I’ll try to get the USB extension cable with booster as well. 

Dealings with Sprite Animation in Processing – Part 1

There are a few ways to insert Sprite Animations in Processing. I found tutorials online, and learned to code spritesheet animation using Adobe Flash/Animate then export to use it in Processing.

I think and understand the idea of Sprite animation like the traditional animation – Rotoscoping technique. Using frame by frame method and combining it to looping animation. Multiple frames of the horse in motion, combined to give the illusion of the horse running.

A sprite is a single graphic image that is incorporated into spritesheet so that it appears to be part of the motion. This website provides alot of Spritesheets, but have to pay for it so i’ll just use for reference.

I used Adobe animate to create animation then generate it to sprite animation. Then there are 2 choices, one is to save it in a box and the other is one long strip. Alternatively, I can also export to PNG sequence then it is more similar to Rotoscoping. But to save memory space I’ve decided to test the other 2 ways instead.

Basically, the parts that I will use spritesheets are the hovering of animals, so there will be 4 sprite.

Test 1 

Box method seems to be able to have longer frame animation but I couldnt get it work. It works find using the provided turorial img but when I replace it to my own animation it doesnt work. I dont know if its the size of my animation to be the issue or what 😦

Test 2

With the long strip of animation, it looks much easier and it works fine. The only problem is with the frame rate being too fast and i cannot generate longer animation due to the constraint of horizontal strip/max width that adobe animate allow me to export. Its a choice between you want the pixels size to be big then frames limited; if you want more frames/movement then the size cant be too big.

owl.png

Sprite Animation in Processing

So I’ll continue by using the long strip method first, and see if it is okay with the animals movements that I want show. Hopefully everything goes well!

Mouse Libraries

  1. Autohide mouse cursor plug in

http://download.cnet.com/AutoHideMouseCursor/3000-2084_4-75676781.html

2. Processing basic mouse function examples

Example

// Move the mouse left and right across the image

// to see the cursor change from a cross to a hand

void draw()

{

  if (mouseX < 50) {

    cursor(CROSS);

  } else {

    cursor(HAND);

  }

}

3. Mouse rollover function