Oh and sounds + music :D I did have time to put some sound and music in, albeit most likely just placeholder sound and music, but the effect is there nonetheless, Check it out!
I've also started looking at GLSL shaders and how that might get wrapped around the pygame application. I don't quite know the GPU capabilities of an RPi Zero but shaders would certainly open up a world of possibilities when it comes to post processing effects. Stuff like CRT glow, scanline simulation, screen curvature simulation, menu transitional glitches and effects would be greatly enhanced with the use of shaders. If not then I can always use sprites and some clever displacements to deliver the effect.
Lots of inputs:
It is becoming increasingly important that the handheld will have to deliver an experience you cannot get on a mobile device. And a part of that is the handhelds exuberant amount of Interfacing options. Dedicated buttons, knobs, dials and other input methods, designed to hopefully grant the player a more hands on engagement with the virtual world than.... tapping on a touchscreen qwerty keypad.
- Map Longitude and Latitude mini knobs.
- Large honking Menu Dial that switches between Main Text, Inventory, Main Menu and possible settings
- Smaller knob for item selection from the inventory
As the matter of fact, here are some of the designs for the biggest knobs of the console. The side panel rotary switches:As the matter of fact, this is a great place to tell you about the general feel of these knobs that I'm going for. Imagine an old timely radio or a retro television with only 12 channels. Imagine that big ol channel knob. The amount of strength you gotta put into it to make it click. And oh boy does it click. I remember these rotary switches, having taken apart a radio or two back when I was just a little kid with a screwdriver.
Concept Art / Visual Ideas
Aside from a little bit of make up work, the Entirety of the week has been spend working on the visual presentation / conceptual mockups of the handheld as a whole as well as a closer look at the ideas for a few key features. First things first, the general aesthetic. I honeslty don't even know why I even started putting the concepts together since I don't even know which or even how many types if user interfacing options this unit will inclide. But nevertheless I figured it won't hurt to try and work out a few mock-up ideas to get the creative juices flowing in the right direction.
For starters, I began arranging the visual elements in 3D space, just to see if I can approximate how I'll go about arranging the interfacing options that I have so far decided to include.
Keyboard, 2 LCDs (main large and mini ones), Radiation counter, menu selector and item selector knobs
Rads, Rads, Rads
Ok so one of the biggest things I really would like to put in, in some shape or form is a physical radiation counter. For that I could use a panel meter, and not just any panel meter, no, no, no. I would like to use what is called an Edgewise Panel meter.
various edgewise panel meter designs that caught my attention
Oh yeah. I WANT THIS.... I want one of these dials as a radiation counter. especially something like this one:
coolest panel meter
The coolest god damn panel meter all around, it's got everything - nice and thin profile, super cool, wide edgewise dial design, white on black label, I love it. The only down side of it would be it's total size. Since it's an analogue needle that depends on what is essentially an electric motor, the total amount of space this thing takes up is a bit.... troublesome. But nevertheless, I have put together some a conceptual pieces to see where I could fit it in and what it might look like:
radiation mater just below the major LCD display
test of a label design. I may or may not have gotten a bit carried away with the dirt shader
The main issue is that - you can't really get these anymore from any Chinese supplier. At least not after my lackluster search attempts. Usually you know that a part is easy to fund when you can google a generally related term and it pops up in Ebay / Aliexpress / Bangood and sites alike. What I did find was a number of American Manufacturers who specialize in producing panel meters, with these particular meters being among their assortment. Now I live in the great white north and as long as I am going to be looking at US manufacturers for these panel meters, I might as well snoop around Canada and see if anything of the sort is produced around here. Canada has Marine, Military and Industrial demands for these right?.... right?
money, money, money, MOOONEYYY!
Ok so this experiment was and will probably still continue being A BIG ONE. One of the user interface outputs that I'd like to implement is a money dial. A counter of the in-game currency. Money / Trade is a huge part of a post apocalyptic RPG, in my opinion and thus it deserves it's own dedicated dial. and I knew of just the right thing!
linear meter counter
Alrighty, so this here was, what I considered to be just a visual queue - a starting point from where the actual dial would be envisioned. I wanted to use this sort of a rolling number drum readout for the in-game currency. The big Honking money counter display - maybe about 10 digits long. The problem here is that this, and many other linear number counters (also known as Rotary Counter, Scoreboard Counter, Mile Counter) are essentially linear counters, meaning that they count the numbers in a linear fashion. When the first digit (the right-most) rolls over from 9 to 0 , the second digit goes from 0 to 1 . That's fine and all, that's what these counters are designed to do however this the furthest from the functionality that I'm looking for in regards to a currency counter. The process of rolling the entire dial, one digit at a time would take quite literally minutes if not hours to get to the right number when the player is spending or acquiring large amounts of cash. Say if the player has 7430 "tokens" (for example) and spends around 4000 tokens, can you imagine the rattle and pure displeasure of having to wait several minutes for the motor to dial the number display backwards until it reaches the correct number? It's not a fun experience - and experience is everything for this project. I need a much more granular control over the digits - I needed to control each digit individually, one at a time, be able to set each number by itself.... and well... after searching around for just the right dial. I have come up empty handed.
The Money Dial Prototypes
So it indeed looks like I just might have to design my very own number dial prototype. I've openned up Blender and started messing around with the various ideas. Now I know, I now... Blender's not a cad software... I know. I'm going to make a transition for Fusion 360 For these sorts of tasks as soon as I get more comfortable in it. For now I am simply more fluent and quick in Blender. When it came to the dial - the rules were as such:
- I needed to be able to set any digit individually, at will
- I need to minimize the number of moving parts.
- The Number Dial needs to stay within a maximum of 2cm in diameter
The first prototype broke all three rules...
Prototype 1 - The Common Spinner Drum and Electromagnets
This was my first idea. Essentially, the idea was to have a single spinning drum, stationed behind all the digits, with the digits themselves being mounted on hinged axis bases. When the money output was to be updated, say when the player loots a body, crate or spends the cash on something, the main spinner motor would speed up and an array of electromagnets (one for each digit) would pull the digits towards the spinning motor. The rubber rings would engage with the motor and make the spinner barrel - spin the dials drums.
One of the challenges that I'm going to have to overcome is the ability know which digit the dial is currently on. Since I want to be able to control the number of each dial, it is imperative to know where the dial is at any point in time. And to tackle that problem, my first thought went to - the resistor ladder. It's a fairly simple concept. Use resistors of various to divide the voltage into known ratios. Then, I depending on the angle of the drum and the digit it's displaying, a contact is made with one of these circular pads, which close a connection using one of these resistors:
resistor ladder, one pad + resistor for each individual digit on the dial (0 - 9)
Printing mostly took about 9 hours and I think I was not even setting the extruder temperature right as the filament lines were just getting too far apart.
And here is the test of the prototype in action:
So a few things I've learned with this prototypeFilaments from different companies have varying rigidity. This roll of filament I' used on this piece is quite flexible so not a whole lot of rigidity / sturdiness in the final parts can be observed. So It's hard to reliably extrapolate whether the design is sturdy
Don't design thin printable parts Thin filament parts will flex, making it a nightmare to test the mechanism. I have to outright reinforce the thing with toothpicks and super glue. On the other hand, I've also discovered that thinly printed, flexible filament can be used for springs and latches, which was a huge discovery for me.
The motor..... way too fast Sirectly driven, even with the RPM reduction of that small wheel, still to o fast which makes me thing that the geared motor might not be such a bad idea
Gears instead of friction contact I have not tested this with an electromagnet but I doubt that it will be sufficiently powerful enough to pull the digit drum close and snugly enough to the motor to make a reliable. slip proof contact. Or if it was, it would require too much power to do so, draining the battery. Now that's not confirmed. Since the electromagnet would only need to engage WHEN a digit needs to change and the player will not be tossing cash often enough to do so, but then who knows. Instead of an electromagnet I can use a servo motors. The micro servos have angle feedback which could potentially make them perfect for this. They will stop at just the right angle, however with this, we come a full circle of having too many moving parts. It's either 1 Spinner motor + 10 servo motors (for 10 digits) or alternatively just do 10 spinner motors on a static mount which is what I prefer more to be honest since then it's just a hinge action lever that pulls the digit to the digit drum.
Prototype 2 - Solenoid, pulling lever with a latching mechanism
So after the first prototype, someone had suggested solenoid drives. To which I replies "YOU'RE A GENIUS". But I had no solenoid drives lying around so I went a head and ordered some, and proceed prototyping with what I had - regular DC motors. I gotta say, this was a good guess. Instead of spinning a number dial drum, you use an inner saw-tooth gear with the amount of teeth, equal to the amount of digits you are displaying, Then whenever you shift a single tooth, the entire dial drum shifts by just the right amount. This mechanism not only moves the dial in equal distances, just perfect for advancing the numbers by the right rotation amount every time, but also the latching spring (or a printed flexible latch that acts as a spring) makes for a satisfying clicking sound when the dial advances forward. This design was the closest attempt at satisfying both the precision, function and audio-visual aesthetic. However yet again... I did not have any motors slow enough to perform an meaningful tests.
pulling hand, grabbing the dial inner gear and pulling it to advance the digit
I've also learned that my printer's current nozzle size is really too bug to reliably print mechanical prototypes like gears. The parts are just too small and the prints are simply too imprecise and flimsy to be able to faithfully fulfill the design requirements. I can't truly judge if the design is worth pursuing using these so for now I'm not disregarding the results, as nonfunctional as they turned out with the current print tests. I've placed an order for some real small printing nozzles (0.2mm) so we'll see how that goes.
Prototype 3 - Direct Drive Worm Gear
This.. out of all the prototype options so far, was the most functional one yet. It worked. It wasn't spinning out of control, it was doing the job of spinning / advancing the dial, and was doing it seemingly well.. but.... it was unsatisfying. A spinning dial is no flipping / latching / clicking dial. I would much rather prefer the clicks and instantaneous advancements of the numbers instead of the slow methodical rotating action. Don't get me wrong, should I fail to find any suitable solutions that satisfy the audio visual aesthetic I've outlined above, this here prototype will most likely be my go-to candidate. I have yet to try the #2 prototype with an actual solenoid drive instead of a motor, so I still have plenty of prototyping to do yet - but this was good too.
Another thing in question is the size of the motor. Please don't mind the big ass honking motors I'm using here. These things are big, loud and are all I have around to prototype with for the time being. I'm actually kinda glad I have found a use for them to be honest. Should I decide to go with a motor option, as opposed to a solenoid (or something else), there are some findings when it comes to motor choices.
Take a look:
Prototype 4 - Trying to combine Prototype #2 and #3
Alright... alright... I technically did not need to make this. The only reason I did is because I thought I could use the worm gear from prototype #3 to simulate the action of a solenoid (because I won't get a chance to try those for at least a month due to shipping). But alas even, an 8 hour print later, it turns out that more complex my mechanism is, this more prototyping I'll have to incur. This thing had far too many points of failure and would require quite a lot of refinement and redesigning to work. And all of what? Just so that I'd have something to toy with until the solenoids came in the mail? Naaa. this right here is as good of a point to stop as any as my further prototyping will only depend solely on me basing my tests using solenoids, geared motors and 0.2 mm printer nozzles, all of which I've now ordered and will be awaiting for in the next few weeks. In the meantime, I can get back to coding the core gameplay.
Bubble 7 Segment Display
A Cute little 7 segment display.... sadly discontinued. I'd absolutely go for this if it weren't for scarcity and the fact that the display will only be useful when it's powered and draining the batteries. And that's actually why I would really like to use a mechanical display instead. The mechanical display can be fully powered down and still display useful information about your in game resource. It really only needs to drain current when updating the display, and even then....
This little guy would actually come in pretty handy as a non physical means of detecting a revolution. Presently, I have only barely started testing around the ideas of rotating a rotary digit display. I have not even yet tackled the concepts of getting any sort of feedback to the controller as to which digit is being displayed at any point in time. The current go to graphic that uses a resistor ladder would come in handy should I chose to rotate the dial using a direct drive worm gear or equivalent DC motor control method. In those cases, knowing the more or less precise angle of the digit drum would come in quite handy at stopping motor at just the right time. However, interestingly enough, if I choose to go with the more click-y grabby solenoid with a spring latch solution, as seen in prototype 2, then I really don't need to know the precises position of the dual drum. All I need is to know where the zero digit is located - and that's where either a single connection solution or this here little fella can come into play. If I know that the digit drum is at the 0 digit, then all I have to do is trigger the solenoid to click... say 4 times, and the dial will display the number 3. That's another bonus to going with the pulley grabby option. This little component can detect magnetic proximity. So I can strap a mini magnet onto the digit dial, all lined up with the position of the 0 digit, and every time the 0 digit passes this component, I will get a signal readout telling me just that. from there, it's a matter of counting.
Magnetic Encoders for Gearbox Micro-motors
These seem pretty interesting. They essentially do the same thing as the standalone tri-pin component above, but this time, mounted on a special PCB, designed for the gear motors. This can report on the amount of revolutions, done by the motor. Again, a fantastic find. If you know how many revolutions it takes to advance one digit, and you're confident in the contact sturdiness of your gears, this could make for a reliable way to know the position of the dial drum. Lots of options to consider.