
Hello, Habrasoobschestvo.
I love JavaScript for its grace, beauty and many other advantages. And I also love to write on it. Moreover, I like to write not only standard things, but also the fact that very few people usually write in this language. In this article series, I want to talk in detail about creating a cross-browser (IE6 +, Chrome, O9 +, Fx2 +, Konq) pseudo-3D game in JavaScript + DOM (without using Canvas) in several stages. The game will be similar to the first Might and Magic. There are plans to move around the maze from the top, then from the first person view, then populate the maze with monsters, traps, doors, and at the end add a network game with the PHP server part and, of course, do not forget about the multifunctional map editor. I am sure that other ideas will appear with time and suggestions.
So, present the finished first stage of the game.

The principle of the game is insanely simple at the moment. You are an arrow that must come from a green square to red and so 5 times.
Moving arrows. Or through shift + arrows. The second mode is more convenient for now. But due to certain reasons, the main mode will be “going where I look,” and not “going where the arrow shows.” This is because of the plans.
Latin "e" - includes a map editor.
Move the active cell with arrows. With the help of shift + arrow, or with the help of [
asdw ] we put the walls in a certain direction.
Z - the beginning, X - the end. Enter - play our card. Note that now only editing existing maps is implemented. If you want to create a map of a certain size from scratch - use the link
http://freecr.ru/maze/?editor&w= 15 & h = 10')
Implementation and technology
During the creation of the engine, I tried to use the many possibilities of the protyped approach in JS and I think that I quite succeeded in this. Inheritance has not yet been used, but in the next steps you will definitely need it. The code turned out to be readable and easily extendable, although it requires easy refactoring (which we will do further). I would like to get advice and opinions from no less experienced comrades. I hope these sources will serve as an excellent example for newbies in the future.
To display the result, only DOM and no images are used. JQuery is used to manipulate the DOM. To catch keyboard events -
my $ .keyboard plugin . Everything else - or written by me from scratch, or taken somewhere in my archives.
Plans
As I said, the development will be carried out in several stages. The first step is the creation of a basic engine and map editor. The next stage is a first-person view. You can already see the past implementation:
freecr.ru/lab (ooo, just do not look at the source!) The goal is to achieve the same result. And again - only DOM:

If there are willing - I will describe in detail the implementation, algorithms, problems and their solutions in a separate topic.
miscellanea
The project is hosted
on Google code (for me this is already a tradition).
License - GPL v3
I accept suggestions and issues.