Javascript Game Development equivalent of Pygame.org? - Stack Overflow

I am starting to learn and develop games in Javascript.I was just wondering if there are websites for

I am starting to learn and develop games in Javascript. I was just wondering if there are websites for Javascript game development analogous to .html. Pygame/Python was the first language I learned how to develop games on, and I think part of the reason why I ever finished a game was because most of the developers on that site allowed you to view the source code to their games. That helped me learn more than anything (if they were mented well).

I am probably going to use the Crafty game engine, so anything related to that will help as well. With that being said, I did look over most of the websites listed in this question. Any other general help regarding Javascript is also wele. Thanks in advance.

I am starting to learn and develop games in Javascript. I was just wondering if there are websites for Javascript game development analogous to http://pygame/news.html. Pygame/Python was the first language I learned how to develop games on, and I think part of the reason why I ever finished a game was because most of the developers on that site allowed you to view the source code to their games. That helped me learn more than anything (if they were mented well).

I am probably going to use the Crafty game engine, so anything related to that will help as well. With that being said, I did look over most of the websites listed in this question. Any other general help regarding Javascript is also wele. Thanks in advance.

Share Improve this question edited May 23, 2017 at 12:29 CommunityBot 11 silver badge asked Jun 16, 2013 at 20:20 JoshJosh 1,0522 gold badges12 silver badges24 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 3

GameJS is a JavaScript library inspired by PyGame.
(source: gamejs)

Note that the GameJS code on the parision is a bit outdated and it doesn't work on current release

You can also see a lot of games made using GameJS. You can see that games here: http://gamejs/showcase.html

You can go a long ways with no game library, just 2d canvas and vanilla JS in the browser. Here's some great links to get started:

Mary Live Codes a JavaScript Game From Scratch in 30 minutes, and does a great job of explaining what she's doing as she does it. https://www.youtube./watch?v=hbKN-9o5_Z0

Franks Laboratory is all about creative coding and game development with just JS and the browser. https://www.youtube./c/Frankslaboratory

If text tutorials are more your speed, CodeInplete has a great series on JavaScript game development, it's older but all the info still applicable/works today in all browsers. This site is largely how I got started in HTML5 game development.
https://codeinplete./games/

JS13K, a yearly game jam where you have a month to create a JS game in 13 kilobytes of zipped JS, has a great resources page, although some of this stuff is specific to making your game tiny, there's lots of micro-frameworks for JavaScript games. I've participated in JS13K in some form since 2016. https://js13kgames.github.io/resources/ https://js13kgames.

Happy to help if you have specific questions!

This is a quick start guide but for the docs go to (The readme is the docs): https://www.npmjs./package/nodegamesjs

Run in the terminal: npm install nodegamesjs Then write in your code:

var nodegames = require("nodegamesjs");
nodegames.init();
    
var width = 800;
var height = 600;
nodegames.newGame(async function (game) {
    console.log("[Game] Game opened.");
    game.setWindowName("Mygame");
    game.on("close", function () {
        var process = require("process");
        process.exit(0); //Exit because game window has been closed.
    });
    while (true) {
        //Draw stuff do your stuff. (game loop)
        //
        //
        game.renderFrame(); //Render the frame that has just been drawn.
        await new Promise(function (resolve, reject) {setTimeout(resolve, 10)}); //Wait 10ms for stability and to let events run.
    }
});

I made the package, hope ya like it.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745280367a4620249.html

相关推荐

  • Javascript Game Development equivalent of Pygame.org? - Stack Overflow

    I am starting to learn and develop games in Javascript.I was just wondering if there are websites for

    4小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信