kaboomJS 自己介绍说是 极速开发网页游戏的一个库。周末看了一个 yutuber 博主发的一个用这个库实现马力欧游戏的视频,感觉确实眼前一亮。用对工具,果然干活就是一个库的事情。。。。。
Coding Up a Mario Game in JavaScript with Kaboom.js
— Ania is back showing us how to create a basic platformer in the course of an hour in her typically breezy, easy to follow manner. Watch this if you want to reignite that coding spark.
最终结果就是 一个 html + 一个 game.js !!! 效果如下:
基本思路就是 加载各种图片 ,下面的路,马力欧,小怪兽,然后用这个框架驱动图片动,然后库提供了碰撞方法之类的。。。。。
Final code here: https://github.com/kubowania/mario
Imgur: https://imgur.com/a/F8Jkryq