Tuesday, November 18, 2014

Visio frustration #1

Visio is a great tool for creating explanatory graphics in a hurry. Like the one below.

But one thing that has been botherin me alot is the constant snapping. Snap to grid and snap to object is fine, but snapping fucked up connectors to the middle of your object tends to fuck me over.
However i still got work done and never bother'd to look up how to turn it off. That is untill today, as i sat there spending more than 20 minutes(!) drawing a network diagram.

I will share that know-how:
1. Right click somewhere on the ribbon where there is free space
2. Customice Quick Access Toolbar...
3. All commands --> Snap and Glue --> Add --> OK


4. Voila! You now have a icon on what i assume is the quick access bar, click it!

5. All your snap and glue can now be disabled

Friday, October 17, 2014

OPC server not functioning? Turn on PUT/GET

I am currently working on a SCADA project consisting of a number of sensors, computers and Siemens PLC's interconnected with regular ethernet in a managed LAN.
Every PLC has some IO connected, some of witch are sensors that we also want to monitor outside of the PLC. The key element to this is the OPC server SIMATIC NET. This server talks to the PLC's, and makes the different tags available to other pc's.

This makes the OPC server really critical for the function of the other parts of the system.
I literally just spent days trying to get this up and running. Every option was set correctly, except this hidden "enable communication" setting on the PLC:


Monday, August 18, 2014

Removing severely rusty brake discs

Well, im not big on buying new and expensive cars, loaning money for buying a used car is a form of russian roulette that i don't play. This leads me to always be driving around in throwaway style whip's trying to squeze the most milage out before they can no longer pass the road safety test.

Anyways, my brake system looked like this:


Now im no mechanic, but ey, how hard can it be?

Most stuff about replacing brake parts was found on youtube, but i ran into some trouble when trying to replace the brake discs. 10 years of rust made it impossible to remove the old ones. Luckily the discs are made to be removed by design.

There are two extra holes in the discs. Simply screw any 8mm bolt in there, it will jack the disc straight off! Didn't even have to use a sledgehammer...


New discs, no problems

Sunday, July 13, 2014

Diskpart fixes broken USB thumb drives

Ever used a thumbdrive for some funky stuff, like shipping a PS2 bootloader or a linux distro and afterwards your drive reports to only being a fraction of it's original size?

A simple format will often fix that, but this time i wasn't so lucky. Even in computer management it was impossible to format the unallocated space.



But there is another tool in the shed, and it's called diskpart.


Simply type diskpart in CMD to start it.
Then follow the procedure below to clean the master boot record on your device and replace it with a fresh new one.

Be aware that choosing the wrong disk in this dialog will ruin your day.
But once that is done you can go format the thumb drive like usual, and it's now back to it's full potential again.

Such space... wow!

Saturday, July 12, 2014

Single file .exe installer for Get Money Game

Having finished a project is always nice, but when trying to share your work you might find that a few things could be done better. For example it's not very convenient for other people to download shared folders.
And expecting the end user to keep track of the dependencies for you project is something only a Linux developer would consider sane.

This is the reason that the absolute majority of widely adopted software is being distributed as single file installers. Whether it's an self extracting archive, .msi or .exe doesn't matter much, as long as it follows the routine of:  'double click' ---> next ---> next ---> next ---> finish

And so i made my own custom installer for the game i made:
The project is on GitHub (Get Money Game installer)

And the installer can be downloaded directly

Now, this is a bit more work than using Install Shield or the OneClick installer, but it feels damn good to avoid the bloat and junk that comes with Install Shield. Currently the installer just installs, no uninstall is available, but the files are dropped to desktop and you just delete them if you want.


This shows an example on how an embedded resource can be retrieved and used.

Sunday, June 29, 2014

I finally made a 3D game!

It's called Get Money Game

This is the very first 3D game project i have finished. And im rather pleased about the result. I do admit it might not be the most groundbreaking entry in its genre. This is not GTA V for pc, but it's a smooth running FPS with every thing one would expect from a low budget, single dev game.

It includes sound effects, a menu system, background music and a score counter. Also custom textures and instructions.

The description reads as following:
You run around in a randomly generated maze and chase a cube of money.
Every time you find the cube you get stacks added to your score, then
the cube respawns somewhere else in the maze and the game continues.
After two minutes the round is up and you are presented with your
total score so you can take screenshots and brag about it to your friends.

 This is one of the cash-cubes you are looking for

All the images are in-game screenshots.
The project is available for download at Github:
https://github.com/studiefredfredrik/GetMoneyGame

The game requires the XNA 4 framework to be installed:
http://www.microsoft.com/en-us/download/confirmation.aspx?id=27598

The installer in a .ZIP here (File -> Save As)
[very long link to a google drive with a .zip file]