In fact, the results of this exercise is not very important, mainly to experience the process, although most of the time is spent in pain, but also have a lot of harvest, but also exposed a lot of technical deficiencies, but also for later learning clear some goals.
Technical aspects because of the majority of IE users (and is not IE9), so there is no use of HTML5 canvas, using the way of Div, so the challenge is relatively large,
But indeed, performance is still not ideal, ie performance is still worse (especially IE6 ...). Well... - -!)。
Currently compatible IE6/7/8 (also theoretically compatible with IE9, just not tested), safari,ff3.5+ (because ff2.0/3.0 does not support horizontal flip styles ...). --!), Chrome,opera.
Wrote a small frame of his own, including the development process and JS class library, the class library in the way oop like to pack a syntax icing, it seems to be an OOP, but because in order to pursue "elegance", the direct extension of the function of the prototype, so it is not recommended to use elsewhere.
Framework development of the overall idea is to use PHP for the back-end code merge output, JS code with $import to establish the relationship between the various code files, and then the page reference to merge JS php file, the model needs to set up a local Web server to be tested, and need to set up hosts for 127.0.0.1 Aralork
Game description
The game is a demo version, to achieve the core of the overall process. The game is divided into "single game" mode, "Double vs" mode and "practice mode" three kinds of play, but in fact, the implementation is the same, but only to change the initialization parameters just, pretty pit dad ...
The game only requires keyboard operation, no mouse,
Menu operation is the direction of the key to move, enter key selection, ESC key cancellation;
Player 1 Action:
On: W, under: S, left: A, right: D, Boxing: j/k/L, leg: u/i/O
Player 2 Action:
On: ↑, Next: ↓, left: ←, right: →, boxing: keypad 1/2/3, leg: keypad 4/5/6
The ↑↓←→ here represents the arrow keys.
Game screenshot
Other Notes
There are a lot of bugs at the moment, so be prepared to play and not be shocked by weird situations ...
The game's material from the Capcom Company's "Street Fighter II", the copyright belongs to Capcom company.
Everyone has any questions can reply here, welcome everybody to pat the brick, thanks.
Game Demo Address
Complete source code Download
Original link: http://www.cnblogs.com/Random/archive/2011/04/11/2011962.html
"Edit Recommendation"
- Nine amazing HTML 5 and JavaScript experiments
- Uglifyjs has a fantastic JavaScript parser.
- Understanding of call and apply in JavaScript
- 8 Web sites for stunning JavaScript effects
- A further talk on pre-loading technology of JavaScript pictures
"Responsible editor: Chen Yu new TEL: (010) 68476606"