PAS #7 – Almost Finished

 

Above is the most recent screenshot from my game.  As you can see, its coming right along which is good since it’s due on thursday.  Since the last update I’ve changed quite a bit.  I’ve added a fireball counter which indicates graphically how many fireballs you have left to shoot.  The red ball you see in the screenshot is a fireball.  The yellow circle is a token you can collect that adds another fireball to your reservoir.  The black rectangle is a wall you have to avoid crashing into.  The black bands on the top and bottom are the ceiling and floor, which you also cannot hit.  I am quite happy with the progress of my game, but still have a little more work to do.

First, the black ceiling, floor, and walls are extremely ugly.  I think I am going to add a wood like texture to them, but only if I can figure out an easy way to do so.  Also, I want to change the dragon to look like an actual dragon.  It may be difficult, but its going to improve the look of my game dramatically. The next thing I am going to add is a start/menu screen to make my game seem more complete and professional and also easier to navigate.  After I do that I’m going to implement a high score tracker so people are able to compare their high scores.

I’m happy with the progress so far and hope to finish the game this weekend.  Perhaps Ill be able to upload the game online so anyone who wants to can try it out.  Thanks everyone!

***************** EDIT ********************

I have finished the aesthetics of my game, take a look!

CIV #6 – Super High MPG Cars

In recent times it has become not uncommon to see commercials for cars toting forty miles per gallon or hybrids that are saving the plant.  These are well and good, but what is on the table for the future? A couple of years ago people made a big fuss about hydrogen powered cars and how clean and fuel efficient they’ll be.  However, that technology has fallen to the wayside as many people doubt its safety, practicality, and ability to power a car.

Well, PAC-Car II, a swiss engineering team, aims to destroy these views with their hydrogen powered car that gets 12,666 miles per gallon.  That’s correct 12,666 miles per gallon of hydrogen fuel.  The best part is, hydrogen powered cars only release water as their waste.  Obviously, changing our oil hungry form of transportation to run of hydrogen will be enormously beneficial to the environment and may even be beneficial to the wallets of the average commuter.

PAC-Car II got is fame from Shell’s Eco Marathon, a competition they hold for to see who can create the most fuel efficient car in a number of various categories.  PAC-Car II not only won the competition, but is certified by Guinness World Records as having the world’s most fuel efficient vehicle.

Here is an interesting schematic published by the PAC-Car II team describing how they vehicle gets its power:

And a photo of the car:

Obviously this car isn’t fit for the road, but what is important is the concept behind the car. PAC-Car II proves that hydrogen can be an efficient fuel source.  Commuter car companies must now develop road-safe and luxurious vehicles that run on hydrogen power in order to make this dream a reality.  The PAC-Car II team plans to work with interested parties in creating the necessary technology.  In fact, they have retired from the competition in order to do so.

One of the main problems not having to do with a hydrogen cell’s feasibility that is holding back the technology is infrastructure.  Unfortunately, creating hydrogen fuel stations across the world and country is no small task, and no company has yet been up to take the investment.  If we as consumers show enough demand for this amazing and green technology, fuel companies will have no choice but to build the necessary infrastructure.  It is very exciting to see how this technology will pan out.

http://www.paccar.ethz.ch/

PAS #6 – Cool and Difficult class Project

If you were to save every file on your computer as raw data you would run out of space to put anything rather quickly.  Instead, files are compressed.  Your .jpg or .png files are ways  of compressing an image file.  For example, .jpg utilizes the fact that the human eye is more sensitive to intensity than exact color.  What it does is it takes a lot of slightly different shades of a color, green for example, and makes them all into the same shade in order to save memory.

My task was to make a program to compress a file of words down to just a couple of numbers.  For example the sentences, “Hello there blog readers! I hope this topic isn’t too boring for you and you’re learning a lot.” is translated to the numbers, “61 128 92 145 98 245 130 203 22 135 49 92 220 206 52 183 206 149 160 188 26 12 21 132 180 194 145 64”.  How this works is slightly complicated, but very clever.  It uses a structure called a huffman tree, which assigns a binary code to each character that depends on how often it occurs in the entered words.  The more often a character occurs, the shorter binary code it is assigned, that way the least common characters take up the most space while common characters are simple to store.  The binary for the sentence I entered above is, “0011110110000000010111001001000101100010111101011000001011001011000101101000011100110001010111001101110011001110001101001011011111001110100101011010000010111100000110100000110000010101100001001011010011000010100100010100”.

The next step is to break the binary code into 8 number bits then calculate the numerical value in base 10 they are equivalent to.  For example, the first 8 numbers are 00111101, which is equal to 61 in base 10. As you can see, 61 is the first number in the final number string.

By converting the numbers back to binary, then running through the tree we can then obtain the original message again.  This program was pretty difficult to write, but I feel accomplished having written by own compression program.  Hopefully I get a good grade!