Click here for free DL of the app version that can save data.
No:42404 125
Prev Next
Fighting game where the characters have different,..ALL
Developer User18873|Date and time 24/2/11 17:10:56
Build time 10.096 sec|Game capacity 3.536KB|Script


Sure! Here's an example of a simple fighting game using JavaScript and HTML. This game allows two characters to battle against each other using unique moves based on specific combinations of buttons pressed. Since you mentioned smartphone operation, I'll include touch events for input. Pictograms will be added to represent the characters and their moves. Please note that this is a basic implementation, and you can expand on it by adding more characters, moves, and gameplay features. Here's the code:




In this code, we set up two characters using div elements (`character1` and `character2`) and assign their respective pictogram backgrounds. The `moves` object holds the different moves for each character, identified by button combinations (`A`, `B`, `C` for character 1 and `X`, `Y`, `Z` for character 2). The `handleInput` function handles touch events, adding the number of touches to the `buttonsPressed` string when a mousedown event occurs. On mouseup, it checks if the combination matches a move and performs the corresponding action. Please note that this code does not include actual move animations or game mechanics beyond recognizing button combinations. You would need to add additional code to implement the moves, character health, victory conditions, etc.

Prev Next   Back  0  0 Menu 

[PR]現在の売れ筋アプリランキング

Click here for free DL of the app version that can save data.

(C)2023 HisashiApp