Objective
With the initial requirements analysis above, we can enter the preliminary design phase.
The purpose of this article
The preliminary domain model is obtained, and the layer and module are preliminarily divided.
Technology options
First, determine what technology you choose to develop the game.
I've developed web sites before, and I've also developed JavaScript games, so I decided to use web technology for development.
Then it is the decision to adopt the traditional HTML4, or the newest HTML5.
Eventually I decided to use HTML5 technology because of the benefits of using HTML5:
You can use a powerful canvas API to draw game images.
The future can use local storage, off-line storage technology to store the data needed for the game, to achieve the game save and read, improve the performance of the game.
In the future, you can use the WebSocket API to achieve multiple networking.
The Web Worker API can be used in the future to optimize game computing and improve game performance.
HTML5 is the future development trend, it is necessary to seriously study it.
Development environment
Win7 Operating system
Vs2012
Because in my previous project, I mainly use asp.net technology, so the development tool I will naturally choose Vs2012, although the IDE for the foreground development is a bit heavy ... You can also choose Eclispe, Dreamweaver, Sublime, webstorm, etc. as a development tool.
External dependencies
In game development, I use the following libraries:
Third-party libraries
Jquery
Use its selector for DOM operations.
ProgressBar
This is a jquery progress bar plugin that I use to show the progress of a preloaded picture.
Jasmine
This is a test framework that you can use to perform JavaScript unit tests.
My library.
Yoop namespace: Yyc.class, YYC. AClass, YYC. Interface)
This is the OOP framework for my JavaScript. See also publish my JavaScript OOP framework Yoop v1.0
Picture preload Control preloadimg (namespaces: Yyc.control)
Toolbox Ytool (namespaces: Yyc.tool)
My tool method.
JavaScript native Object extension
is located in the Object_extend.js file, including extensions to string and array objects.
Pattern Library (namespaces: Yyc.pattern)
Includes namespace methods for creating object patterns namespace and observer.js of observer patterns
Code structure
Content