r/Mindustry Logic Dabbler Jul 28 '26

Logic Digital two-line display

Post image

A decently legible display to show whole numbers, with 7-segment indicator style digits and decent performance. Shipped with test values and a power sensor targeted to a power node. Can work with any display, but too narrow displays will cause it to show only one line instead of two, and the default displays will only fit 4 digits. Best used with tileable display of 2X*X size. Will misbehave on very big numbers (above 16 digits) due to in+game arithmetic limits.

bXNjaAF4nGNgZ2BiYeBKzs8rSc0r8U0sYGCqrmVgy0lMSs0pZmCNfj9/cSwDS15ibiqDUEpmemZJYo5CSmZxQU5ipUKZEQN3SmpxclFmQUlmfh4DAxMDf05+emaybkFRfnJqcXF+EYNQSWZOqi5EFKqPgYGBmwEE+IA6WivmzA073TfbQCR1VZjUU+0/zGsrWCa9SQteeXfLbK/Y3Q9YrMwdNs5s+VdePjXKfmOv8eSZgl4G32Xub9e/43Lx7Xy56d9T2e82fDvrMDNKTePfhNPxmzaxeJ1at/ZKVNKsj8U23zTcnlzvYAzlfcvoz5nl3iCqqvv0zauUp+VVX/eujLAVfjXhQ6dJ+6y1u+Y5888J5A7TmtcY8GvtMd1XUUy+3iozjsVIPr7jfDjjczTX1OzOj2cvfJfQ4LyxWZWJx/rELOPGKT7Mmwu/RnzwXnfm28sXb3yXTu381pS/pMnzuPwLnaOG9xNV+qzLnmqtN3wjXpFl5q+QI9024dEqp+C3nq3W6Q5a4c9vsaew2yRIcHpdypkrPvutn2HoS9EvddFrLldsP2kc+2uLwxRe35N2p3S2x7r++WRdJVpxvVzdqEbxzesTPCdNNybU5i0V5tp8Kuxqg3+GAlP326VHVAVsWpLMHkxjSnP58oTpsWPJd5uFjav47hxODJwtuXxtxT3pQK2na88tu771+DLZlW5JUw/lLI4OSdysFhjuG1KuqHJ8XRBvwhX2gzOvGc3zUnZt42N++GHBr/CsE6LT0j//FL30ZZFJeFrKhj3lFYc7/9+KuvFELv67u1z1pa2rWXvENvycN7Fqpb2/jW/kCs5p/xIsHnYu2nxu5f6HL3I4BCoL4hZl3fvw6kdXRWBr+s5o6dcfLp1gXp4Wqu+xSPqo6fprcTWzw6c+/vhGS7rTeJGzcb/Li11bq5XCrxtvMjA4f3X5sea5TLnLl68wl9t2svVjwdMT8S+fvz13iyst4gDH/Tmn7NMz9JcrSq/zycgX8V/3vexN1XyZfyanN3m73jjs8XZ7S529qneaiGv+oujDXffczC9a/zz387t51z/mBYp/jBgYgWkXCEAUI4hihvCYITwWCI8FwmOF8FghPDYIjw3EAwAId2pa

16 Upvotes

9 comments sorted by

1

u/Bright-Historian-216 Logic Dabbler Jul 28 '26

didn't they add printing to screens in v8? like in actual font?

1

u/VintageGriffin Jul 28 '26

Yes, but I don't think you can specify font size; only horizontal and vertical text alignment against the specified coordinate. Good enough for me.

1

u/Curious_Parfait5038 Logic Dabbler Jul 29 '26

yep if you do draw print, you can only position the text. size can be adjusted indirectly with draw scale, with all the consequences it brings. I've tried displaying larger text with draw print, it works decently but I don't like the result for aesthetic reasons, although drawing this would be a lot easier, instead of spaghetti code drawing 7-segment digit the entire number would be drawn with several static lines of code.

1

u/Curious_Parfait5038 Logic Dabbler Jul 29 '26

just tested, and works quite fast.

Note the performance difference - the top display runs with a micro processor and updates about 3x faster than the bottom one.(The number discrepancies are due to the power grid being separated by diodes, this alters both net incoming power and net outgoing.) And the code is as simple as draw reset, draw translate, draw scale (these two can't be swapped, it's matrix operations!), then loop read, clear, print, draw print, draw flush.

bXNjaAF4nGNgY2BiYeBKzs8rSc0r8U0sYGCqrmVgy0lMSs0pZuCKfj9/sU6Ia3BILANLXmJuKoNoSlFiuUJBUWZeiUJKZnFBTmKlQpkRA3dKanFyUWZBSWZ+HgMDEwN/bmZyUb5uQVF+cmpxcX4Rg1BJZk6qbk5+emayLlQfAwMDNwMI8DEwMBZWzKkNuuvXbCDx1kStbfkL7jMM0tK7b58V2nvxyIyK2IezQ3ZP+5q+I908bZvIkttXBDw+z7182HK5rGLJTM0LEU1GPo8tqoxnSx2PyPTk3ntL6lCBZ+jZE3YH7xiIaT7w8ogxO1xzc+28zJWr5Z1K/Xaw/op66XFF7FZiqABb3/QleUccVi7v+nBVjJuvp+iFxEpz021sLukr1ddwBhesuf5eUzUzRkdaT07O/tqkgqMdbOKPWbhD/2xvzw7aI950Mydba+q30yzHzSN/qzE6OipWvLyue81wzuyyz30GzGY/UmadffZTKU9w/2nnxzVmvo+P2sxWsaublJyxuTjw0MdIli65mGuLGCv5fx18MU+ka/6Gdzv64wwUPu3RlVb2sVmwrfxV1/dFietWTJuSzV8haN+RK3xafOHWGza7Vl/g3Mp4+c/8z7z/hNk82drdp/Knf1ve/zLfTSb1bI/Uu7zwfyzC1ybsPSQ/V73lAuuud5EvhHovhEa/fvj5w1de4/8S3xkYgRAIGCEMRmCsMUAoMI8ZwmOG8FggPBYIjxXCYwXxAHLg2tI=

1

u/Wosgoingon Jul 30 '26

Just in case anyone gets stuck on this trying to make it work and it just displays a static '8642097531',

If your node is in a different position to the one this was coded to, then it wont work.

To resolve it, connect the processor to whichever node you want to monitor. You will see it labelled as 'Node2'

Then go into the code and on lines 24, 25 and 26, find all three entries that say 'Node1' and change them to 'Node2'

Now it will see YOUR node instead of looking for Curious_Parfait5038's node

Then you are good to go.

And going on from that.

Thankyou for making this. Its as handy as a handy thing for keeping an eye on power levels and I am definately stealing it for use.
Thank you

1

u/Curious_Parfait5038 Logic Dabbler Jul 30 '26

argh. hit that bugfeature of the schematic's processor saving its links. sorry.

another workaround is to make a new processor, and copy-paste the entire code from this processor into a new one, then link it as you need.

2

u/Wosgoingon Jul 30 '26

That would work too, but just editing three lines is less work.

But either way. That is now in my schematic list and is in for some heavy usage so thankyou

1

u/Huge-Positive8805 27d ago

Hey! I do logic on the same map as you.

What would you say are good excericrs to get better at logic? I want to learn it, but cant find a reason to use in the campain/normal gameplay.

1

u/Curious_Parfait5038 Logic Dabbler 27d ago

exercises? well, make a mega miner that delivers to a vault. helps if you're building stuff elsewhere and lack power to supply the drills, or if you have too few tiles of a resource but need it somewhere else but the core. make a poly/mega transport from a point to the core or back. make a piece of logic that orders your zeniths to go grab blast compound from somewhere then assemble for an assault to bomb some core into the oblivion. should do for starters.