Wednesday, July 27, 2011

From Dust Review

Released today, From Dust is a modern god game. I'll start off saying this game has amazing physics. I myself crave physics, they make the game much more enjoyable. To give some examples of the physics i'll start with the water. The water will erode the sand if there isn't any vegetation. The sand will then flow down the current to the end. I neat thing to add is the water will turn to a muddy-like colour when flowing with sand. This effect will create new rivers and currents. 

Since you are the tribes god it doesn't mean you can start spawning anything you want. What you do is move and reshape the landscape you are given with. Your goal is to claim all of the totems and then go to the exit to proceed to the next level. This arcade game is only 1200 gamer points, that really isn't that bad due to the amazing gameplay and physics.

Now some more information about the game! There are 4 materials you use. 

Sand - make basic land, can be washed away.
Water - and promote growth for vegetation and washes away sand. It also cools lava to form rock.
Lava - Creates fire and can cool to form rock from water and when it is still.
Rock - Cannot be moved but will not wash away

With these 4 materials you lead your tribe to the end. Now in some of the maps there are water/lava spawners. These simply spawn water/lava forever. However the water spawner can be block preventing it from producing water. There are tones of levels to complete and there are also challenge levels giving you more play time. I will not say where in the game but there is a sandbox! For what I've played with the game I love it. It amazes me how new rivers can form and the terrain changes around you rapidly. Any god-game lovers need this game.

More Pictures and Link to Trailer

Sunday, July 24, 2011

My Chrome Extensions

Just felt like sharing my Chrome extensions I use on my dev PC.

  • Browser Compatibility Detector 
  • Measurelt!
  • PHP Console
  • PHP documentation -
  • Resolution Test
  • Web Technology Notifier 
I find these extensions useful, if you know some that I could add to my collection leave a comment! I'll be glad to add some more.

Friday, July 22, 2011

G+ Buggy but Amazing to Try

Recently got an invite to G+. I was so amazed how amazing the site was, it had many things I wish Facebook had. One having the ability to edit a post without having to delete it. Something I love to have available! But since it still is in beta I have to expect bugs. And yes I have experienced some. One being so you can't edit a post, now that's ironic isn't it?

On to more thoughts. What I really enjoy is the groups, you don't have to have close friends etc. like you did on Facebook (well for me anyways). I get a sense that it could also replace Twitter, I think this because you can direct posts to certain groups, one group could be your followers. See where I'm going with this? It has a chance of doing this but I can't quite tell exactly. G+ is new and young, it needs time to see the world and see how the world adapts to it.

Wednesday, July 20, 2011

Share Your Code

    Every so often try sharing your code with other programmers. Let someone else see your code from another angle. Doing this will improve your code. If more people see your code they may spot a way to improve it. Improved code is always better.

Tuesday, July 19, 2011

How to be a Better Programmer

Tips to be a better programmer.


    We all forget to comment now and then, but you need to break that. Commenting is very useful. Say you make some code one day and forget about it for a couple months. You end up coming back to it and can't seem to figure out what it does. If you had added comments future you wouldn't have had that problem. So next time you are coding add a couple comments here and there. It will make it easier for you.

Plan Before Coding

    When you begin coding you should have a plan. This will make coding much more fluent and easier. If you know what your going to code you won't have problems when coding. You can just look back to the plan and get back to coding. But if you dive right into coding you won't have any clue on what you will be coding. You will end up making mistakes and it won't turn out the way it could have if you planned it out.


    When coding you want the code itself be relatively easy to understand. If you name variables a, b, etc.. it won't make sense when reading. If you named those so they were relevant to what they were being used for it would make more sense to the reader.

Try Something New

    Try something new every so often when you code, this will extend your knowledge. If you know more you can approach a problem in many different ways. You don;t have to stay in your comfort zone all the time, next time try something new even if it's a little thing.


    Follow these basic 4 tips and you will be a better programmer, always good to improve in your work!

Monday, July 18, 2011

Knowntowns free game code

I have posted this php/mysql simcity-like game for you guys to download! It is free and very simple. I never took a lot of time to work on it so I am giving it to others for your enjoyment. This is only the code of the game and there is nothing else but that.

Game concept:

Build buildings to make money. Need 1 residential and 1 entertainment to make 1 industry which makes 100 money. 1 commercial = 2 entertainment.

1 residential + 1 entertainment = 1 industry
1 commercial = 2 entertainment

Game can be found here: Click me

Thanks for viewing this! Share!

Sunday, July 17, 2011

Learn the Binary Numeral System


    Most of us have seen it, those zeros and ones. Those are called binary, a different way of counting compared to our traditional decimal numeral system. Instead of using 10 values (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) binary uses two (0, 1). Binary is used in computers with electrical pulses, one being on and zero being off.

Lets Start Learning

    First of all you read Binary right to left. Lets picture columns. We will start with 2 columns to get used to them.
                                         2    1
                                       | 0 | 1 |

    What do you think this number is? If you said 1 you are right! The second column is 0 (off) and the first column is 1 (on). When you add this up you get 1. Note that you are adding the top numbers, not the ones and zeros.

    Now lets get a bit more complicated. Lets extend the number of columns.

                                         64   32   16   8    4     2    1
                                        | 0 | 0 | 1 | 1 | 0 | 1 | 0 |         This equals 26!

    First of all to increase the number of columns if you ever needed more just double the last column. In this case it would be 64x2=128.

Decode the columns below.

                                                      64   32   16   8    4     2    1
1.                                     | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 

                                                      64   32   16   8    4     2    1
2.                                     | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 

                                                      64   32   16   8    4     2    1
3.                                     | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 

                                                      64   32   16   8    4     2    1
4.                                     | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 

Here are the following answers to the earlier exercises:
#1 - 2
#2 - 15
#3 - 46
#4 - 127

    So lets review what we have learned. When decoding binary into decimal you add up the columns that are "on" to the the answer. Thanks for reading, hope you enjoyed this tutorial. Feel free to share!

Saturday, July 16, 2011

C++ code disassemble 1

Feel like starting a little series when I post basic C++ code and I disassemble it to easily understand. Enjoy.

The Guessing Game
I will be explaining how this code works. It is a basic number guessing game.

#include <iostream>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std;

int main()
int x, y = (rand() % 10) + 1;


cout << "Guess a number between 1 and 10." << endl;
cin >> x;

if (x == y)
cout << "You are right!" << endl;
else if (x>y)
cout << "Too high! Guess again." << endl;
else if (x<y)
cout << "Too low! Guess again." << endl;


while (x!=y)

  return 0;

Now this is a poorly coded game but that isn't the point. Also to note this code will only work on Windows machines because of the system("PAUSE") code. Now time to disassemble the code!

#include <iostream>
#include <cmath>
#include <cstdlib>              Get the required libraries. 
#include <ctime>                

using namespace std;       Declare you are using namespace std.

int main()                           States main is an integer.
srand(time(0));                              \
int x, y = (rand() % 10) + 1;            -> Create a randomly generated number to guess.                                          


cout << "Guess a number between 1 and 10." << endl;     Output the following.
cin >> x;                                                                                    Let the user input a guessing number.

if (x == y)                                                                                  Compare x and y.
cout << "You are right!" << endl;                                           Output the following.
else if (x>y)                                                                               If x > y do the following.
cout << "Too high! Guess again." << endl;                          Output the following.
else if (x<y)                                                                               If x< y do the following.
cout << "Too low! Guess again." << endl;                            Output the following.

}  Closing bracket for do statement.

while (x!=y)      While x doesn't equal y pause.

;system("PAUSE");    Pause code.
  return 0;                      Return 0.
;} Closing bracket for do while statement.

Hope you can use this code as a review. Thanks for reading!

My Conky Setup

Check out my Conky setup I use on my Linux box:

     alignment top_left
    background yes
    use_xft yes
    xftfont HandelGotD:size=7
    xftalpha 0.5
    update_interval 4.0
    total_run_times 0
    own_window no
    own_window_type normal
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    double_buffer yes
    minimum_size 250 5
    maximum_width 250
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders yes
    default_color green
    default_shade_color red
    default_outline_color grey
    alignment top_right
    gap_x 12
    gap_y 48
    no_buffers yes
    uppercase no
    cpu_avg_samples 2
    override_utf8_locale yes

    Date & Time ${hr 2}
    ${font Arial Black:size:36}${alignc} ${time %H:%M}${font}
    ${alignc}${Time %a %b %d %Y}
    System ${hr 2}
    Distro ${alignr}#! CrunchBang 8.10.01
    Kernel ${alignr}$sysname $kernel on $machine
    Hostname $alignr $nodename
    Uptime $alignr $uptime
    Athlon64 +3800 @ ${freq}MHz Max:2.4Ghz
    CPU $alignr ${cpu cpu0}%
    ${cpugraph cpu0 ffcc00 ff0000}

    MEM $alignc $mem / $memmax $alignr $memperc%
    ${color 48a0d2}${membar}${color}
    File System ${hr 2}
    Swap $alignc $swap / $swapmax $alignr $swapperc%
    ${color f17f17}${swapbar}${color}

    Root $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_free_perc /}%
    ${color ff0000}${fs_bar /}${color}
    Processes ${hr 2}
    $processes processes ($running_processes running)
    Load Average${alignr}$loadavg
    NAME $alignr PID   CPU   MEM
    ${top name 1} $alignr ${top pid 1} ${top cpu 1} ${top mem 1}
    ${top name 2} $alignr ${top pid 2} ${top cpu 2} ${top mem 2}
    ${top name 3} $alignr ${top pid 3} ${top cpu 3} ${top mem 3}
    ${top name 4} $alignr ${top pid 4} ${top cpu 4} ${top mem 4}
    ${top name 5} $alignr ${top pid 5} ${top cpu 5} ${top mem 5}
    NETWORK ${hr 2}
    ${alignc}  eth0 ${addr eth0}
    Inbound $alignr ${downspeed eth0} kb/s
    ${downspeedgraph eth0 33ffcc 000099}
    Outbound $alignr ${upspeed eth0} kb/s
    ${upspeedgraph eth0 ffcc00 ff0000}
    Upload: ${alignr}${totalup eth0}
    Download: ${alignr}${totaldown eth0}

What you see:

Thursday, July 14, 2011

Simplicity of Blogging

Some tips and tricks from my experiences about blogging.

    Content is a very important factor when blogging. You want to blog like you care, try not to make your posts short and empty. You want to try to fill the with information. But the information must be useful, you don't want to fill your blog with useless words that aren't needed.

    Now there is also another side to this. You don't want to give too much information. This will bore some of your audience. You want to keep them reading but not long enough to bore them!

    To help promote your blog try creating a twitter account. I use twitter to let my followers know that I have blogged about something new. Doing this will keep them coming back without much effort. Somewhere on your blog try putting a link to your twitter account so your visitors have an easy option to follow you

    You can also let your family and friends know you have a blog. The more people know about your blog the more visitors you are likely to get.

    Make sure to pick a topic to blog about that you enjoy. This could be a hobby or just an interest. This will make it easier for you to blog without running out of things to blog about.

    Make sure to stick with your topic. Don't suddenly change your topic. This can make your viewers loose interest in your blog. If you have another topic you want to blog about make a new blog! This is an easy way to keep things organized and make sure your viewers are getting the information they want.

    Yes, money can be made from blogging. A very simple way to get a little profit is to get an AdSense account and add some ads to your blog. But you never want to add too many ads, this will make your blog look like its only out for making money, causing visitors to leave. You don't want to have more ads then content!

    I think I covered about all the basic things about blogging. If your still reading up to here I thank you. Glad to have a couple viewers.

Tuesday, July 12, 2011

Mysql/PHP Idea

Just felt like posting a little idea I thought of to make databases smaller.

As in my notes:

To optimize databases use a single column per item.

Username | Password | sword_durability...etc

Use php code to decide the column state.

if (sword_durability == 1)
    // set sword durability as 1 (full)

elseif (sword durability == 0.9)
    // set sword durability as 0.9 (damaged a bit)


Now this was just a simple idea i randomly came up with so it isn't very in depth. Thanks for reading this little idea. Feel free to share it.

Monday, July 11, 2011

Review: UPS APC 550VA 330W BE550G

Recently bought a UPS. As stated in the title it is the APC 550VA 330W BE550G. I bought this UPS simply to keep my computers up and running without losing data if the power went out.

When I started you set it up it was easy. I just had to plug in the battery in the unit, then I just plugged everything I wanted in. I plugged in my 2 PCs and my monitors, and other devices. Then I turned it on and it was ready to go.

I only found one problem with the unit, it wasn't easy to plug into the UPS, you had to give force. I didn't expect this at first because a usual outlet is easy to plug things into. Otherwise it was an easy set up. minus the rearranging of some things to make it fit.

If I were to recommend this to somebody I definitively would. Thanks for reading.

Wednesday, July 6, 2011

CrunchBang Linux Configuring Openbox menu.xml

To configure this file is quite easy. If you ever want to add something to the Openbox menu your at the right place.

First you want to locate the menu.xml file which can be located when you:

Right-click - settings - Openbox Config - Edit menu.xml

When you click that you will open the file and see the basic syntax for adding something.

<item label="NAME OF ITEM">// The name that will appear to the user to click
<action name="Execute">   // Stating to execute the following
                 // what program to launch example: gedit
</execute>           // closing tag
</action>                 // closing tag
</item>                        // closing tag

In between the <execute> tags you will have to put a command to run the program. I found the exact command you need to run the program by right-clicking on the icon of the program you want to run. Then go to launcher and look for the command.

Icon - right-click - launcher - command

After you do all of this you want to restart Openbox, to do this follow these steps:

Right-click - Settings - Openbox Config - Restart

After this try it out, should work perfectly. Enjoy!

Tuesday, July 5, 2011

Google+ and Facebook Showdown

Google's new social network Google+ is new and right out of the package aimed at competing with Facebook. It currently is only allowing a handful of people to try it out. Google+ will only succeed against Facebook if it gives the audience new content and something more interesting to give to the public. Some of the features that Google+ offers that Facebook doesn't are the following 3 main items I thought were neat.

Circles. You are able to share different things with different people. But the twist is you share to the people that will be interested in what you share. For example you could share technology topics to your techy friends and new sport events to your friends that enjoy sports.

The ease to share photos. Sharing photos to anyone is much faster and user friendly. No hassle, just the ease of sharing.

Huddle. This is a neat thing that Google added, you are able to have group chat instead of all individually talking making it easier to make plans. Another focus on making your life a bit simpler, who couldn't want that.

Well these are three things I think are neat additions that are in Google+, share what you like about Google+ in the comments. Thanks for reading!

Monday, July 4, 2011

Quick review on CrunchBang Linux distro

The first distro I ever used for Linux was CrunchBang. Me being a noob with Linux enjoyed learning and using it. It was easy to use and I was able to learn with it very easily. It uses very little RAM and HDD space. Good use with older equipment, I believe it uses portions of Ubuntu in its code so anything that works with Ubuntu will probably work with CB. This was just a little review so thanks for reading.

Bill S.978

I've read that there is a possible new bill coming out in the US. Seems it might end being able to upload game videos on youtube! You wouldn't be aloud to post game videos online if you live in the US. Support to stop this by watching this video.
Click here