How to switch window manager in Ubuntu linux

First you have to install another window manager.

To install LXDE:

sudo apt-get install lxde

Install XFCE:

sudo apt-get install xubuntu-desktop

Read more ›

Posted in linux, ubuntu Tagged with: ,

2Dworld update!

I have fixed some bugs in 2Dworld and now you can use collected blocks to build something

Posted in gamedev, Uncategorized Tagged with:

2dworld update!


Now you can dig! 2dworld is inspired by Minecraft and Terraria. Terrain is generated by php script and is random and allways different just like in roguelike games.

Posted in gamedev, javascript Tagged with:

How to make javascript animation

There are many ways to make animation in javascript. Here is one of them.


Prepare some pictures – frames for yor animation:


Put this in the index.html:

<div id="var"></div>
<div id="frame"></div>
<script src="script.js"></script>

and this in the script.js:

var mloop;
var x=0;

var MyLoop = function(){
document.getElementById("frame").innerHTML = "<img src='1.jpg'/>";
document.getElementById("frame").innerHTML = "<img src='2.jpg'/>";
mloop = setTimeout(MyLoop, 300);
document.getElementById("var").innerHTML = x;


And here is the working example

Posted in javascript Tagged with:

Javascript key code

Here is how to read code of pressed keyboard button.

Put this in the index.html:




press any key


<div id="vars"></div>

<script src="myscript.js"></script>



Put this in to myscript.js file:


var kc;

document.addEventListener('keydown', function(event) {
kc = event.keyCode;
document.getElementById("vars").innerHTML = kc;


Now start index.html and you should see key codes in your browser.

Here is the working example

Posted in javascript