BuysDB.nl

Home of Buys de Barbanson

WIP logic sandbox game part 2

This is a followup on part 1

After endlessly placing many wires to test the elements I was implementing, I prioritized the addition of busses to the game. The bus connectors allow for many outputs per component, greatly reduce the wire spaghetti and result in less time spent on the construction of connections. Finally it is reducing work as I can put functions like the conversion between binary and integers in the connector 'class' code. The wire graphics I implemented before were very simplistic and not really good looking (just a line with a color depending on its state), I improved the look of the wires by adding some curvature to it and making them a little wider relative to the size of the connector it connects to.

The implementation of the bus connectors made it really easy to start adding basic computing elements; the ALU, registers, memory and multiplexers. An example of the ALU multiplying two numbers is shown in the first image. (The 7-segment display, binary to 7-segment converter and dip-switches are also a new addition). The logics elements look really boring at the moment, I am planning to improve this, but I have not yet decided what type of graphics they should get; either a symbolic look which clearly shows what the function of the respective component is, or a more technical look with an IC in the center of each component block.

In part 1 an old project terminal display was discussed. This display is very resource intensive as I model every pixel as an object, I did create a fast version but it doesn't look half as good so a faster version will not be implemented anytime soon. I updated this terminal a little to also include a barrel distortion to give an even better CRT feeling.

Screenshot of the newly added ALU.Screenshot of the terminal display and keyboard input which is activated when clicked upon.

Link to this article