Thursday, April 12, 2012

Ballroom Bits!

Sat around last night and corrected the DMD export script.
It turns out that the image data was not properly created (wrong colors etc) - I believed this problem was in my "color = color/nr_of_shades" but as it turns out, it was a different problem completely.
This became apparent once I added a previsualization image directly on the computer by simply creating a new temporary image from the converted data, where the image I did the conversion on had already become garbled even before the conversion had begun.

Now every image is first converted to a grayscale 8-bit image, then posterized (gathering similar colors) into a 3-bit image (7 shades + black). Looks stunning and no need to create indexed images first etc.

I also got the bit packing in place so that each pixel only consume 3 bits in the DMD-file. For a single frame image I went from 4096 bytes to 1366 bytes. On top of this I added a header of 2 bytes containing the number of frame in the image, for a total byte count of 2+(1366*amount_of_frames).  Each frame is actually 1365 bytes and 3 bits, with 5 bits padding.

This should mean I get the same amount of data loaded in 1/3 of the time it's previously taken to load an image of the SD card. I say should - because it's untested as I didn't have time to write the matching software on the Chipkit board.

When that's done I need to tweak the preview image so that I get a more accurate preview of the final image as it would appear on the DMD. The current image contains a little too even color distribution where the DMD has most of it's shades in the upper half of the scale. It's either this, or more preferably, tweak the actual DMD rendering routine so that I get a more even color distribution - Hopefully I'll be able to go darker in color now that the SD card loading is faster (more processing time available for rendering).

Now, if only I could get rid of the initial 5 ms unnecessary SD-card buffering as well...

A couple of pics for comparison:
1) As seen on the computer screen. A little too perfect and too red, as the next picture shows...

2)  The same file loaded and displayed on the DMD, complete with smearing on the camera.
As you can see, a lot of the finer shades are not represented properly. I need to tweak this a lot, i.m.h.o.

Saturday, April 7, 2012

Those noisy rules...

Despite the lack of updates recently, quite a lot of work has been done on the machine.

I've evened out the surface of the cabinet including repainting and filling various dents and differences that would be visible through the decals when applied. That took quite a while to do. With a little luck the surface should be ideal for the decals now.

I've also begun recreating the speaker panel on the head, since the one I have now is not ideal - the display hole is a bit too small and the panel itself is slightly arched due to the nature of the wood I've used. I'm thinking it should be possible creating the panel in acrylic to get small or no edges between the artwork and the "glass". I might also do a combination with a wooden frame overlaid with a acrylic surface.

I've begun the selection of sound clips and combining them with the ruleset. I've used up around 180 samples out of 255 possible for sound effects and around 30 samples for music - while still filling all the major elements. The extra slots can be used to create variations of the elements already in place, avoiding hearing the same sample whenever you hit the same target repeated times, for example. I could also flesh out the current features allowing additional Splicers to take part etc.

The plan is to have two identical sets of sound samples for the sound effects and one unique set for music.
With a little planing I could vary the two sound effect sets slightly - for instance, all mode start samples for a specific mode could be limited to only one card since no other samples will be playing during that time.
But I do want to avoid this since that would require special code to handle each case instead of just "playSound(x)". But in case space is running out...

Some of the features I've planed I'm having troubles finding sound samples for. I might have to wing it a little and either create my own samples or use external sound samples outside the Bioshock universe...


Friday, March 16, 2012

Green With Envy!

Mr Bubbles got a quick upgrade today.

His arm got hot-glued and painted and will hopefully endure the coming adventures in Rapture.
The colors are not 100%, but close enough from where the player will be standing.

1) Front. The wrist has been replaced by a motor. Hot-glued in place and given a slight texture/paint job.

2) Back. The two cables from the motor could probably be better hidden, but hey - too late to change that now!
In any case I could make them a part of the character instead of trying to hide them. We'll see.
For reference, see here and here for before-pictures.

I can live with this arm.
I believe Mr Bubbles can too!

Wednesday, March 14, 2012

Them Bolts

I've snooped around on the net a bit for reference photos regarding the playfield hinge bolts, and I found that more or less all pinball tables have a bolt-through solution.

Check out Medieval Madness here, for instance.
It's not immediately obvious that the bolts are there, but they are.

So I'll go for the standard solution - I mean, those tables have lasted for eternities without falling apart!

---

Said and done, and it doesn't look bad at all actually (besides from a little wood chipping, but nothing a little filling won't fix):
1) Attached brackets. The bolts are visible from the outside and will thankfully NOT cover any crucial graphics! 

Tuesday, March 13, 2012

The nasty cuts...

Remember the first playfield sample cutout I was getting?

It turned out most of the elements were missing and a couple of holes were actually in the wrong places (my bad). Luckily it was just a sample, so I'm of to the drawing board and correcting the mistakes and sending the new blueprints to the woodshop once more.

This time I'll separate each hole-type into a separate layer so that no information gets missed. My mistake was trying to include to much information in one file, which unfortunately lead to me getting less holes drilled.


Mock-up, you say?

Time's a real luxury these days!

But I got some work done on the playfield hinges, which hopefully turned out alright. I had to make a mock-up playfield using a small wooden board and the actual playfield hinges, brackets and supporters. If I had been using a proper playfield it would have been near impossible to position the playfield correctly since the actual playfield would be blocking most of the view...

1) Front of the mock-up. It turned out to be crucial in aligning and positioning the brackets for the hinges.
The supportbracket is not in it's final position and will come closer to the center of the cabinet. 

2) The mock-up "playfield" in an upright position.
The brackets are not attached in this picture and the "playfield" will extend 5 cm
beyond the end of the hinge on a real playfield. 


I need to decide on how to bolt the brackets for the hinges, since I'm pretty sure the bolts will cause big holes in the forehead of the Big Daddy that is featured on the sides of the cabinet. But on the other hand, if a proper bolt isn't used the whole playfield could drop down into the cabinet if we're unlucky!

I might do a compromise by having the bolt go through the cabinet sides, but lowered into the wood so that the head of the bolt does not protrude beyond the surface of the board. It should be stable enough, I hope. The downside with this approach is that I have to cut a (big) hole in the sideart if I ever need to unscrew those bolts. Not a big deal, but something to consider.

I also need to make a small wooden box that protects the circuitry in the bottom of the box since the cables of the playfield might possible cause damage when lifting or rotating the playfield. It would also protect the circuits if the playfield would drop into the cabinet, and also from any rogue balls that might drop onto the circuits in case of any catastrophic events containing coconuts and machine failure.

Monday, March 5, 2012

Mr Bubbles Re-assembled!

After weeks of dismemberment Mr Bubbles has now been put back together. Hopefully this is the final disassembling he will endure. There's still a bit to be done, mostly shrink-wrapping the cables, fixing the motor more permanently and hiding the surgery scars on the elbow. If the new LED's inside his head works as intended that would be nice too!

Here's some pics for you...
1) Front, almost impossible to tell he's been taken apart and operated on.

2) The new elbow and motor-joint. Pretty sweet, but still needs a little touchups.
The motor is functional and the drill is mostly centered. Centering the drill was the trickiest part since it vibrates like crazy when off-centered!

3) The wiring on the back will be less intrusive when completed.
There's also two big plastic gas-tanks that are missing in this picture that will hide most of the cabling.
I might try to paint the shrinkwrap around the arm and legs to further hide the evidence.
The plan here is to drive 3 LED's and a motor (and possible a relay).
The black bandaids on his back and elbow are obviously final thou...

I think it turned out quite nice, the real hurdle will be to make it last for years without too much repair needed!


As a bonus -
The woodshop has finished making a sample piece of the playfield using the programmed route. I can't wait to get it!