Virtual Trading Floor – (Cont.)

More pictures and design elements that went into this project:

An electronic flipdot display shows current prices for Cattle Futures at the CME on November 18, 2004. (Photo by Frank J Polich/Bloomberg via Getty Images) – Note it is only five columns wide, which means the leading numbers for some prices – the “handle” – get dropped.
Each display unit is 7 pixels high by 5 wide, which is easier to see in this cropped photo.

One thing they don’t tell you about older displays like flipdots is the sound they make. When a whole series of them are moving, its like something between the murmur of a crowd and the shuffling of cards. A bit “zen”, I think. Sitting on the trading floor after close with nothing but the large clock whuff-whooshing each digit into place, it was a peaceful contrast to the usual activity on the floor.

First attempt at animating the flipdots virtually using my model. Needs finesse, especially some variation when the dots start and a bit of “shimmer” when they settle against their range of motion.

Some views of the trading floor and its displays were difficult to find. Most pictures focus on the open outcry pits, where all the action is, but not many are taken of the quoteboards which were my primary focus. I was beyond happy to find this one, I couldn’t recall the exact wording of some of the legend that was displayed at the edges of the boards, so this photo helped immensely.

The Open, Range, High, Low bit at the right of the quoteboard is what I needed.

To get data into the game, I decided to make a physical model that resembled a server cabinet, with ventilation slots and a mounting rail for the memory modules (vox models) that I would be spawning and reading from. This version doesn’t have any indicator lights — which I plan to add to show new modules updating and being read. Everyone loves blinkenlights, right? I do.

In game data server cabinet, with a few modules spawned to see how it all fit. Glass door, which is breakable in the game, but the modules and cabinet aren’t so easy to destroy.

One of the hard parts was figuring out the X, Y, Z coordinate offsets so I could spawn those properly in the cabinet. I solved this by making a system based on static location markers. I ended up using the same system to draw sprites on the quoteboards themselves, although not everything would go to plan — some early shots/debug:

Too far back, and squished together.
Aww look, the numbers are hiding! No no no…
Better, right? Nope – the numbers are in reverse order vertically.
First test to get rotations right, that nearly melted my brain. Especially when you consider I’m making a grid of sprites offset horizontally/vertically for the whole board. If you wonder about the rainy environment, I just like the sound when I’m working.
Quoteboards working in all four cardinal directions, which was no small feat. Remember, there’s a whole grid of coordinates being calculated for each slot on the board, including the offsets which change if the board itself is oriented differently. Don’t you dare ask about doing 45-degree angles, lol.

Its a learning process. Working through this got me deep into Three-Dimensional arrays, which honestly aren’t tough to visualize, but a bit harder to debug since you’re dealing with three indexes at the same time.

More to come, documenting continues…

Teardown – Virtual Trading Floor

I’ve been messing with this game “Teardown” that uses little 3D cubes called “voxels” to build objects and terrain.

When I started, there were only two editors that would build things for it, and I wanted to understand it better – so I dove into some tools to see what makes the .vox file format tick.

I finally found some code that I could adapt – in python – so I’ve been working on making that work. If I had the ability to create .vox files programmatically, then I could do nearly anything and automate it – instead of doing things by hand. (Although I still do from time to time.)

I’m at the point where I can create my own .vox models and import them into the game, purely with code. This is awesome. But so what? you may ask.

I’ve been wanting to recreate a small part of the open-outcry trading floor environment that I used to work in long ago. I started with the idea of having the quoteboards first.

That’s nice, but they were circa 2008, so they didn’t use LEDs. They were flipdots. These are small discs that are switched or ‘flipped’ on a side with an electromagnet.

So they have particular characteristics and I’ve been working on making that happen. I made a model in a 3D editing program that I can drive with code to flip the correct dots for a given number or letter.

Some script and the flipdot model – lots commented since I’m experimenting

The only other problem is that the game doesn’t allow you to read local files or write them. This is mostly a security thing, because they allow mods to be made for their game and if they allowed a mod to have file access — some bad actors could do nasty things like wipe your drive or overwrite something important.

This means that the data needed to drive my quoteboards – which would be contract, price, etc couldn’t just be read in using a text file.

So the next step is to make a web-scraper in python, (I’ve done it before, so it isn’t too hard.), then have my voxel writer encode the numeric/character data into color values.

In the ASCII table – there’s a decimal number for each character and number. This works for me, because colors can range from 0 – 255 and the table itself only goes from 0 – 127.

That’s including a bunch of special characters I may not need, but why not.

So, if I were to encode something like a contract symbol ‘SPH2’S&P500 Futures March 2022 futures contract — It would look like this in ASCII — 83, 80, 72, 50

In a color it would be Vec(83, 80, 72) one color and then Vec(50, 0, 0) for the next

Obviously I’d pack these together with delimiters so I could strip out the data again, so ideally it would be like — :SPH2: — using colons to separate things.

Point being, I’ll be able to scrape a website/datafeed, get the quotes, and encode it into R,G,B colors and write a voxel model that I can import into the game and ‘read’ the data from it.

Flipdot numbers, modeled after the character set in use on the trading floor, circa 2008. The zero is intentionally offset to prevent visual confusion with the character “O”

More to come, just getting started…