Monday, September 19, 2011

A gilmpse of HTML5

The web is continuously changing day by day and new standards keep on adding to it. Here is one such element i found really awesome. <canvas> which is quite an interesting feature of HTML5 specification

Quoted from Wikipedia:
Canvas element is part of HTML5 and allows for dynamic, scriptable rendering of 2D shapes and bitmap images. It is a low level, procedural model that updates a bitmap and does not have a built-in scene graph.
Here is an example of a "VI editor" replica created by canvas element which i found on INTERNET and you will be amazed when you find yourself typing and performing all functions that are actually performed on a vi editor in the text-area below.

Saturday, September 10, 2011

3D - Thinking in a new dimension

Everything around us is 3D; we see in 3D, we walk in 3D, we talk in 3D. Then what's so new about it. The new thing is to show/visualize in 3D. The "computer" word(or you can call it world) has become so friendly and with the ever increasing popularity of INTERNET, today we have cut ourself from the real 3D environment and now we love to see,walk,talk and do most of our things in the computer created virtual world which is 2D altogether. So to have a feel of the real environment a need was felt to add a new dimension to the 2D screen. And the 3D virtual world was born.


Lot to come. Keep looking in 3D :)

Saturday, September 3, 2011

CUI vs GUI




From the very beginning when one gets used to the programming aspects he is in a hurry to make something interesting like a game or puzzle. I remember my initial days when i used to program in C/C++, i was very keen to make a game. But then i was having knowledge of basic C, where i was bound to play with just some ASCII characters to make some animations. Just a black window with some white characters floating on it. That world was known as CUI(Character User Interface) where user can interact with the system only by typing something on screen. Then i used to think that probably windows OS and the games what i used to play those days (Tekken 3, IGI etc) were written in some other languages. The 3D button, the moving mouse and the swaying windows everything that windows offered was simply great and provided easy navigation too. This was probably a new world – a GUI(Graphical User Interface) world. When i got some hands on C graphics i thought now i have got that power. It was now easy for me to build some rectangles,circles etc. simple 2D graphics. But still the windows world was quite far ahead. To build a better interface every time it was needed to check which functions get called, like moving windows,maximizing windows, clicking an icon etc. This seemed nearly impossible with the traditional C graphics and the ways by which we used to program. The problem becomes even worse when we find that with so many loops polling to check system events were eating away a lot of memory. Then i realized that maybe the windows world(i.e. GUI) is quite different from traditional CUI world.

In previous DOS based programs it was the programmer’s responsibility to call necessary functions but with the advent of Windows the whole paradigm got changed. Now it was the OS which calls necessary functions as and when needed keeping the memory requirements intact. OS was responsible to call necessary functions whenever some event occurs like user presses some button or moves some window. Now user was free from polling for events and he just have to define what will happen when some events occur. And thus our whole programming paradigm shifted to event based programming. With the GDI library in windows now it was really easy to create windows, fonts, scrolls etc.. But the story doesn’t ends here.
With the need of visualizing things in real, 3D GUI was necessary and there comes the 3D Graphics which in windows is taken care by the DirectX library. With help of it programmer find himself on the top of world. It was easy to produce 3d effects and now the Gaming World was not too far. With Open Gl and DirectX the computer screen(a 2D screen) got a new Dimension i.e. 3D

Keep checking :)
Next post:: 3D – Thinking in a new dimension