YokosukaJS

所属分类:游戏引擎
开发工具:JavaScript
文件大小:214KB
下载次数:0
上传日期:2018-07-23 17:22:06
上 传 者sh-1993
说明:  用javascript编写的函数式编程风格击败了em-up游戏引擎
(A functional programming-style beat-em-up game engine written in javascript)

文件列表:
DESIGN.md (3106, 2018-07-24)
LICENSE (1069, 2018-07-24)
TODOs.md (11478, 2018-07-24)
animata.js (5772, 2018-07-24)
controller.js (4364, 2018-07-24)
directors.js (4766, 2018-07-24)
external (0, 2018-07-24)
external\audio-controller.js (1728, 2018-07-24)
external\js-yaml.min.js (41942, 2018-07-24)
external\synthie.js (7621, 2018-07-24)
game.js (9017, 2018-07-24)
images (0, 2018-07-24)
images\alex.png (17103, 2018-07-24)
images\black_rect.png (178, 2018-07-24)
images\game-over.png (4136, 2018-07-24)
images\red_rect.png (179, 2018-07-24)
images\rivercity-school.gif (9924, 2018-07-24)
images\ryan.png (16918, 2018-07-24)
images\screenshot.png (146607, 2018-07-24)
images\yellow_rect.png (184, 2018-07-24)
index.html (2660, 2018-07-24)
keyboard.js (1572, 2018-07-24)
physics.js (1284, 2018-07-24)
presentation.js (9299, 2018-07-24)
renderer.js (2597, 2018-07-24)
resourceloader.js (2359, 2018-07-24)
resources (0, 2018-07-24)
resources\model.yaml (2796, 2018-07-24)
resources\spritesheet.json (2073, 2018-07-24)
resources\world.yaml (3507, 2018-07-24)
script.js (1411, 2018-07-24)
signals.js (836, 2018-07-24)
statemachine.js (2569, 2018-07-24)
styles.css (531, 2018-07-24)

# YokosukaJS YokosukaJS is a simple functional programming-style beat-em-up game engine written in JavaScript. See it in action in your browser here: https://www.ussherpress.com/yokosukajs/ # How to try it Clone the project, then just open index.html in your browser. That's it. It runs completely in the browser. # How it works - A game world is made up of "actors" - Each actor takes direction from a "director" - A direction is a simple list of commands (ex: "punch", "walk forward", "kick") - Each actor has a "model" (see resources/model.yaml) that defines the animations for each state (ex: standing, punching, walking forward), and the allowed transitions between states, given a direction - An image (i.e. the "spritesheet", see images/ folder) defines the actual animation images used for a given actor - A spritesheet definition (resources/spritesheet.json) describes the rectangles to cut out the sprites from the spritesheet, as well as the anchor point origin to use when rendering the sprite in the game world The game executes Tick() to cycle a state update to the game world. Since the engine is written in a functional manner, this takes as input the previous state as well as user inputs to create the next world state. The renderer takes the latest world state and renders all the actors and billboards (i.e. static images that make up the background) on screen using an HTML Canvas. ![Screenshot](https://github.com/images/screenshot.png)

近期下载者

相关文件


收藏者