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]

Saturday, June 21, 2014

Dealing with complex numbers and equations on the TI84

The TI84 is a graphing calculator from Texas Instruments, and it's been doing a great job of offloading my brain while doing maths for the last few years. I know alot of people that have far fancier calculators, sporting color screens and built in Laplace conversion and Fourier transforms. But the TI84 have always gotten the job done and once you learn your way around the menus it's a really good piece of tech. And also the buttons on it are great.

However when i had my last electronics class i ran into abit of a problem when we started dealing with AC power and every question contained complex numbers. There are two issues:

-The TI84 does not support Matrixes with complex numbers
This almost got me buying a new calculator, but i decided to google for 3rd party apps before buying one. And lo and behold the amazing community around these TI devices came to the rescue:
Linear System Solver 4.0

Frankly this is even better than working with complex numbers in matrixes, as we can avoid setting up the matrixes entirely. Just plug in the equations and you're good to go.

-The TI84 does not fully support degrees when working with numbers on polar form
This issue had me fooled for hours. You see, the TI84 has a setting for working with radians or degrees. And when choosing degrees the calculator spits out answers in degrees. However when giving the input one is forced to always use radians.
Like in this image, what i wanted was to input a vector of length 5 at angle 90 degrees and the calculator gives back a vector of length 5 at 116.62 degrees.

This is actually stated in the manual, but was not particularly intuitive. The soulution is simply converting to radians in the expression ((degrees/360)*2pi).





Thursday, June 19, 2014

Make Excel plot on tick marks

One irritating default setting in MS Excel (at least 2010) is how plots are set to connect with it's axes. This is one of those issues that i find myself changing every time i have to write some report where some quick graphics are in order.

Well, normally the tick marks on the axes corresponds to a value on the plot line by a straight line. So for the X-axis value 10, if you go straight up from that point on the axis one would find the corresponding value on the plot line. However in Excel the default setting is for the value to be between the ticks.

Take a look at this picture, you see the X-axis is skewed. 0 for the X-axis is not in origo, its above the number 0 on the X-axis. For some reason the Y-axis is displayed correctly by default.

Now what you need to do is right click the axis and choose 'Format axis' then on the bottom of 'Axis options' select 'On tick marks'.


Wednesday, June 11, 2014

Dropped Plupload and went with AjaxControlToolkit

So it seems the choice of upload control was based on some hasty testing and it turned out my implementation of Plupload did not fix the large file issue (files were transferred but server-side messed up, and no files were saved).

I tried troubleshooting Plupload, but in the process stumbled upon the updated AjaxControlToolkit. Supplied as a NuGet package with excellent setup guide made it hard to resist.

This also forced a update from .NET 3.5 to .NET 4.5, as the updated toolkit requires 4.5. That was merely a symbolic update tho, and no code had to be changed.


As per this commit everything should be functional, i even did some deployment testing this time, and at least a 2.1GB movie transferred without issues.

Project is hosted at github:


The code still contains the legacy Plupload JS, it will probably be removed during the next commit-session.