New Linkage Beta Test

December 2nd, 2016

Get the Beta Linkage here!

If you need this Beta program for Windows XP, send me an email and I’ll send it to you…

There’s a new beta test version of the Linkage program. This new version has some bug fixes for things like the crash that sometimes happens when a fastened link is deleted. There was also a crash sometimes happening when a connector is deleted that is a slider on a curved slider path.

image

Press Alt and Left Mouse Button
to Drag Selection Box On Top Of Elements

For new features, I added support for the Alt key so you can select objects by dragging a box around them even if you are pressing the left mouse button on top of another element. the Alt key stops the element selection that normally happens when the left button is pressed.

image

Selected Actuator Control Knob

I also changed the way the actuator throw/stroke distance is set using the mouse; in order to drag the end of the “cylinder”, you will need to first select the actuator element. Then the little black dot, the same size as the little black squares used to resize selected elements, will appear. And the same type of control knob is available for drawing circles. You will need to set an initial size for the circle by selecting a drawing point and opening the properties box, but once set, a selected drawing circle has a control knob too for setting its size. These changes are leading up to me adding cams. Cams will need control knobs for creating their shape and those knobs should not be visible unless the cam is selected.

image

Circle Size Control Knob

There are other smaller bugs that got fixed, like a weird problem with link outlines going through the wrong connectors when some of the internal connectors are in the exact same location. I also fixed the way connectors are automatically moved when their curved sliding path is moved.

And I mentioned in in another post but maybe never made the software available for it: when elements are selected, entering a number followed by the letter ‘D’ in the text box in the tool bar will result in the elements being rotated by that number of degrees. remember that 60D will rotate the elements counter-clockwise as is typical of polar coordinates in math and unlike the typical compass headings used in navigation. I have no idea why they are different in direction but they are!

image

Entry of Rotation Value

Get the Beta Linkage here!

Linkage Adjuster Knobs

November 9th, 2016

I’m not sure what to call them. On an actuator, there is a small circle that can be used to change the throw length. That little circle is an adjuster knob or adjustment controller or something like that. I’m working towards in-mechanism editing of cams and changing the code to support those on any element is part of that work.

The first big change that is visible to the user is the addition of an adjuster knob on the drawing circle. The drawing circle is a drawing point element that is set to include a drawing circle. When the point is selected, the little adjustment knob circle will appear and can be dragged around.

The second big change is that I am making the adjuster knob on the actuator only visible and selectable when the actuator is selected. from now on, adjuster knobs of any sort are only visible when the element is selected.

image

Circle and Actuator “Un” Selected

image

Circle and Actuator Selected

Notice in the first picture that the actuator doesn’t have the little circle at the end of the “cylinder” portion of the drawing. Also notice that when either or both elements, the circle and the actuator, are selected, the adjuster knobs are visible. Either of those adjuster knobs can be dragged with the mouse when they are visible and it will not unselect the elements.

This is important work because there will eventually be a few types of cams in the program and they will all be modifiable right in the mechanism window. Of course I will also have some types of cams provide special properties boxes that let users set some properties by entering numbers (especially needed for engine valve cams) so this won’t be the only way to modify a cam. But for a cam with a variable number of Bezier curves defining the shape, having these controls is the only way to design the cam shape.

I am still testing this work and it might change in the future. I might also add adjuster knobs to other elements if there is any reason to do so; maybe chain sprocket size should be settable this way.

Linkage Update

November 8th, 2016

A new version is available in the usual place. I was finally able to spend the hour needed to fix the crash that happened when deleting links that were fastened to gears (or vice-versa). Version 3.3.13 has this fix.

A few other changes and fixes:

You can now rotate the selected items by typing in a number into the text box in the tool bar (the only text box) and then adding the letter ‘D’ after the number. The number is the number of degrees to rotate. I use polar coordinates, not compass coordinates, so positive numbers rotate counter-clockwise.

image

Polar Coordinates
The center of rotation, which you can set by selecting elements to rotate and then dragging the center mark to where you want to center the rotation, is now remembered if you are using the rotation-by-text-entry feature mentioned above.
I fixed how the sliding connector on a curved path is adjusted when it and it’s limit connectors are moved and rotated. It was just broke before.
Fixed bug that let a simulation run if both ends of an actuator were anchored.
Sped up some code from Microsoft to load the tool bar more quickly on high resolution displays. Some of their code resizes the images in the tool bar and it was resizing the same images more than once. I can’t seem to fix it to use my own pre-sized images, but at least the current change makes it a little quicker to start up the program on pesky 4K displays.

That’s it. Get the latest version to get these cool new features!

Fastening Gears with Linkage

November 2nd, 2016

The whole “fastening” thing is a bit troublesome for me. I originally wanted to be able to move drawing elements with links and decided to allow “fastening.” This worked pretty well, though there is a bug where deleting a fastened element somehow causes a crash. But fastening isn’t quite right, bug or no bug. It is especially difficult to use now that I make links and gears move together by fastening them together.

To make the problem even more difficult, I had to make a way for gears to be fastened to the ground so they don’t rotate freely. And this is where I found myself mucking around in the Linkage code tonight.

A simple change to the code that allows and disallows actions let me fasten a gear to the connector at its center. Here’s the mechanism that made me want to make this change:

image

Gear 7 is fastened to anchor H making it not rotate freely.

But now what about gears that have an input anchor at their middle? I originally opted to make the gear rotate with the input even if they are not fastened together. It made sense because there is seldom a need to let a gear spin freely on a shaft that is rotating. I will keep it this way for now because no one really uses gears in the Linkage program anyhow.

Now on to finding the fastening bug!

AutoResponder Config File Parsing

October 19th, 2016

I found a bug in my PHP code that caused strings to match when parsing the AutoResponder config file for responses to submitted text messages. I was using old DOS style wildcards * and ? to make it easy to write the config file. But my comparison functions were just long and complicated and screwed up.

The solution to the problem was to switch to using regular expressions. But those asterisks are so handy for their simplicity. Here are some XML elements from the config file that are used for matching an incoming message with an appropriate response:

<response keyword="* hint *" answer="1">Hint 1</response>
<response keyword="help *">Your message […]</response>
<response keyword="register * team *" answer="#" action="register"></response>

The new code let’s me use multiple asterisks in the keyword attributes but only allows one of them to have data. So if someone sends a text message “hint1”, it will match that first XML element because only one asterisk represents data and whitespace is ignored (I hope ignoring it is a good choice for my application).

I will explain the CompareNumberString() function is in a moment. The WildCardStringMatch() function runs first and converts a keyword string from the config file with asterisks to a regular expression. Then it just compares/processes the regular expression with the input string. If there is data that matches one of those asterisks, a second comparison is done to see if that data matches the answer attribute. In the case of our “hint1” input, it matches because the “1” matches the “1” in the answer attribute. If the input had been “hint2”, it would not have matched and the code would look for some other match from a different response element. “1 hint” would also match but “1 hint 1” would not match because only one asterisk is allowed to have matching data.

The “help” XML element up there doesn’t care what message is sent, it accepts anything and some other PHP code handles getting help for the sender.

The last XML element up there in the sample config data has a hash tag (“pound sign” or “number sign” if you are more than 20 years old) in the answer attribute. Whenever an asterisk matches some data, the resulting data is then compared to the answer attribute. If there is no answer attribute, it is just considered a match. But when the answer has the hash tag, this is where the CompareNumberString() function is called. The CompareNumberString() function compares the input string to the answer attribute seeing if it is a number and if it matches an optional range of values in the answer attribute that are acceptable. Matching a range of values lets the config file specify how to handle numbers that are too large or too small.

This code is working much better than my previous version and is much more flexible.

Word Search Instead

September 22nd, 2016

I was going to write some posts about the latest version of the AutoResponder but I got side tracked on making a word search puzzle generator.

image

Word Search Generator

I was trying to make a puzzle by hand and it was clear that it’s hard to do. I then tried to use some free web-based software and it was clear that there was no way to create an overlay to more easily check answers. And finally, I needed to create a UWP app as practice for work – we might need to have this type of app sometime in the future.

I found one person online who described the algorithm that they used for their generator. After working on implementing it, I decided that it was overkill. Their algorithm, upon finding a word that can’t be placed anywhere, would remove and try to re-place the previous word in a different location. If that previous work cannot be placed somewhere new, the algorithm repeatedly backs out previous words until it can progress forwards and finish the puzzle. This isn’t so good if there isn’t enough space to place all of the words – the algorithm runs for a very long time. I found that it’s better to just start over with new random placements if any word cannot be placed. It essentially does the same thing but just backs out all words instead of just the previous word. The algorithm is simpler and also lets my app return partially completed puzzles.

Other than the cool feature of exporting PNG image files, I also let the user decide if they want just the ovals around the answers with no letters filled in. This might be good for creating a transparent overlay for checking other peoples work on the puzzle.

It’s not open-source but I would be happy to share with anyone who seem sincere about wanting to have this for their own personal projects.

So like I said it’s a UWP app written in C# so it runs on my laptop and on my phone, both running Windows 10.

AutoResponder V2.0

September 12th, 2016

I have been rewriting the AutoResponder code to be 100% PHP and not handle email submissions. This change lets me use a typical web page provider to handle the processing.

I started this change a few years ago but didn’t get very far at that time. I decided that it was time to finish the work, or at least get a majority of the changes done to make the package usable.

The AutoResponder, for those that didn’t go to the link above, is a set of programs/scripts/whatever, that let people send my server text messages and get back an automated reply. I use Twilio for the SMS message handling and 1&1 is my current web page service provider. I also use Twilio for some very simple voice messaging capabilities that I will also describe, but that feature is separate from all of the AutoResponder features.

image

AutoResponder Main Page

The new AutoResponder main page is shown above. I decided to get rid of the original main page because navigating to the messages list took two clicks or taps; I wanted it to take only one click or tap. Since I wanted to make this look more like iOS 8 (or 9 or 10), I made this look like an iOS settings page.

In the much older version of the AutoResponder, the broadcast feature, as well as most other message sending functions, were handled by a Windows service written in C++. Now all of the features and handled by PHP on the server.

In my next post on this subject, I’ll show the code and explain my decision making process for some of the original features. then later posts will get into the new work to replace the C++ code with PHP. At least I hope to write more about this. Winking smile

Why I (Probably) Won’t Play No Man’s Sky Anymore

September 2nd, 2016

I don’t like writing a bad review. In fact, I don’t like writing reviews. But I just can’t let this go. No Man’s Sky is just broke. It’s a fine idea for a game and it looks pretty good on my PC. It’s even quite fun. But it’s also just wrong. I get the impression that the developers are not people with a high level of attention to detail. Or more accurately, they don’t seem to feel a need to be accurate. I will only list a few things that I find wrong with the game – things like the lack of multi-player interactions has been beat to death as a topic. These are in order of most serious to least:

Space Physics

In space where there is no drag on your ship, or insignificant drag, using the engine continuously will result in continuous acceleration. But not in this game. There is a speed limit in space for the standard thrusters and it makes absolutely no sense. It’s like physics for 3-year-olds. In fact, the whole flying style of the game lacks depth and precision and feels like a 90’s arcade flying game. This is the one problem with the game that pisses me off every single time I play it. If I hold down the thrust button, the damn ship should just keep accelerating.

I can ignore orbital physics, uniform gravity everywhere, and stuff like that. But dang, that speed limit sucks.

Weird Goods Pricing

Ok, this is one I just noticed because I tried to do some trading. If you look at the purchase price of something like a plasma coil, it might says that it is 22,000 units and is 5% above average. But if you then look at the sell price, it might show 1,000 units and is 2% below average. WTF is that average? There is no such thing as an average sell price that is different from an average buy price; there is just the price! I bought something at 4% above average and sold it at 100% above average and I took an enormous loss. WTF? I had to actually look at the prices and write them ON A PIEC E OF PAPER. A [modern] game should not make you write on a piece of paper – it should assume that you would do that and do it for you. Maybe if this were a Nancy Drew game with puzzles, paper would be important. But really, the average should be the average and not some nonsense number that is anything but helpful. This is now the main reason that I hate the game.

On a side note, I turned 200,000 into 1,000,000 in an hour by just waiting for ships selling some sort of night crystals for 35,000 each that I could sell back to the galactic store for 55,000. I wanted to buy and sell other stuff but I got tired of looking at my sheet of paper to find out if a price was good or not. Galactic average my ass!

Can’t Stop!

And another space physics complaint I have? It’s that in space, I cannot stop my ship. The game seems to think that I want to move forward at 40U, or whatever number it was, or move backwards (-40U). But there is no f-ing way to go zero. So we are back to this being a dumb kids game that does not attempt to have any realism at all. The speed limit might be necessary because time is needed to load new data for rendered objects as they get closer to you. But not letting me get to zero is just dumb. How do the developers decide on something like that…

“Hey Sean, should we let the players use the thrusters to stop their ship in space?”

”No, why would they do that? And it would make it far too easy to sit and mine those big ‘roids anyhow.”

”But Sean, if they can’t stop, isn’t that weird? There’s no reason for it. It seems arbitrary and certainly doesn’t work like a real spaceship would work.”

”Yep. But then none of this is supposed to be a space simulation. Why even try to get closer to that kind of game when we have that multiplayer thing to worry about.”

”Uh, were we supposed to be working on a multi-player version of this game. Uh oh.”

Space Distances

The developers decided that it would be best to make all of the planets clearly visible from any point in space near them. But it’s weird. It’s also kind of cool because it gives the game a Sci-Fi look, but it’s weird. I would have pushed the planets further apart to give a better sense of how much emptiness is out there is space.

Galaxy Map

The galaxy map is useless to do anything but pick a star system closer to the center of the galaxy. I would love to have been able to revisit a previous system with my bigger better ship, but the game seems to not want that. In fact, the galaxy map works in the most strange way possible for a PC with a mouse. I suspect that making a better map is hard to do on a console with a controller in hand.

Clouds and Rocks

I dislike that space is filled with rocks and clouds. I would have preferred emptiness and blackness. Again, it’s just not a good space simulation at all. I can see why they did the whole colored space and rocks thing, but it’s just a tiny bit weird. I would have liked a black dark lonely game where landing was a refreshing change to the blackness of space.

Boring Planets

I don’t mind that I may find a desert planet or that I might find a planet of caves and spires. But it is a little weird that an entire planet will have the exact same features across its entire surface. Having flat desert regions for large areas and then mountains and lakes, or anything that varies from one region to another, would have been great. It would have made it cool to explore a planet. The only reason to not stay in one spot is to seek out various alien installations. There doesn’t really need to be scenery because having it all the same is like having no scenery at all.

Summary

So I get that the game has some very difficult-to-build features. But the game systems outside of the large galaxy of systems, is pretty pedestrian feeling. It feels far too much like a kids game with all of the functions dumbed down. Here’s a list of things I would do if I were developing such a game (something that I probably can’t do):

Move the planets further apart. Heck, make them tiny dots and require a short burst of FTL to get from one to the other. The HUD can mark the system planets to keep them from being confused with distant starts. Did you know that at the speed of light, it would take about 35 minutes to get from Earth to Jupiter!
Fix the engines so if I keep the thrust on, I keep accelerating. I suspect that the speed limit of the thrusters is to give the terrain time to be generated. But still, there’s got to be a way to make this a bit more realistic.
Let the damn ship stop in space. Make the thrust control more like real thrust control (with computer aided stabilization of course).
Make space black and empty.
Show the actual average PRICE of goods so that I can see that someone will buy my item at 100% above average and actually make a profit, not a loss.
Let me the user pick what shows on the HUD. Turn asteroid marking on or off (including showing asteroid belts if the belt is too far off to see individual asteroids). Show details about stuff if I want it, not just details about things that are pointed to. Get rid of the lines to the space station. Let me mark places on a planet so I can go back to them after selling off some expensive minerals that I found in just that one spot.
Make ships with more storage actually look bigger than ships with less storage. I think that the current inventory system is fine since I have nothing to compare it to. but I’d like to see a ship with 2x the space for goods be 2x the size.

That’s just a bit of what I would change. I really just want to have the game fixed so I can stop in space and to have trading values that make any sense on any Earthly accounting system. Again, how can the average selling price not be the same as the average buying price?

New Linkage Beta

August 31st, 2016

I have a new Beta test version of the Linkage program. This version has an okay link triangle handling feature as well as a few connector alignment tweaks. it also has a way of selecting links and connectors by name or identifier. It’s still all being tested by me, but if anyone want to try it, you are welcome to do so.

Get It here!

A few other recent posts describe these new features so I won’t elaborate on them in this post.

“Roundabout” Game Design

August 11th, 2016

I don’t think that I posted anything about designing a board game. My daughter and I have been playing lots of board games recently, maybe to be able to play together and not with a screen in front of us, and then one day I started creating a board for a game.

image

Our game doesn’t really have a name. I just picked “Roundabout” for this post because the game is travel themed and, believe it or not, it’s round!

This game is loosely based on Tokaido. I took some ideas that I thought were really great and threw out some even better ideas (because Tokaido is a great game and stealing is bad) and came up with this.

Design Process

I started out wanting a round board. There is something cool in having a circle with little circles around it. At least for me, I find it aesthetically pleasing. So I figured out about how many spaces I needed around the board, 36 being a good starting number since each is 10 degrees from the next. Then  draw a bunch  of circles. I didn’t keep a good pictures of that first game board, just this piece of a screen shot:

image

The first version of the game just used some initials and geometric shapes for the spaces on the board. I used old business cards to write symbols on them. We played it for a few turns before thinking it would work and that it also sucked without proper cards.

We recently made the new graphics (the first picture in this post) and printed cards on card-stock with front and back images to match the spaces. Here’s some samples of our graphics taken from the instructions:

imageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimage

We are now trying to refine the rules. There are two things that are giving us trouble:

  1. How does the game end?
  2. How does the player move onto and off of a side path?

We have been using the Start space as the End space on the board. As soon as a player reaches that space, the game is over.

For the side paths, we tried moving out on a side path and then back in, stopping on each space going in both directions. We also tried to go from the end space on the side path right back to the next space along the other side path or along the main path. That was hard to follow while playing. Even going out and back was hard to follow. The latest idea is to jump from the end space back to the space on the main path, which will always be empty. Then no active space gets repeated while taking a side path.

We’ll have a few other players give us some feedback this weekend. I look forward to reporting what they think and also posting about how the game design progresses.