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.org/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 commented 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 welcome. Thanks in advance.
GameJS is a JavaScript library inspired by PyGame.
(source: gamejs.org)
Note that the GameJS code on the comparision 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.org/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.com/watch?v=hbKN-9o5_Z0
Franks Laboratory is all about creative coding and game development with just JS and the browser.
https://www.youtube.com/c/Frankslaboratory
If text tutorials are more your speed, CodeIncomplete 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://codeincomplete.com/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.com
Happy to help if you have specific questions!
Related
I am developing a web based multi-player board game and wondering what the best language for the UI would be? Its a board game similar to Go but a lot simpler.
I have two options flash or the much touted HTML5 with JS. I have to learn both though I have basic knowledge of JS.
The problem with flash is I have to pay for the server component but the UI development could be easier and have a richer look and feel to it. With HTML5 + JS there is no cost involved but the UI development I feel will be clunky and not smooth. This I am not sure. Any experienced devs out there care to give some advice? Are there any particular issues to worry about, look into?
EDIT: Thanks for the comments. I will go with HTML5/JS.
As far as the server side goes, I have not yet decided what to use but want to look into node.js. May be I need to post it to programmers.stackoverflow.com about how it handles load and concurrent users.
Thanks,
Pav
Go with HTML and JS, you said your game was similar to GO, well check out http://govsgo.com/.
The site is written in JavaScript, well there's not much on the front end, the backend is based on Ruby on rails, check out Railscasts #237 (http://railscasts.com/episodes/243-beanstalkd-and-stalker) for some background info on the Ruby part.
You can even do really heavy stuff these days in JavaScript, like multiplayer asteroids (http://bonsaiden.github.com/NodeGame-Shooter/), so a "simple" game like you want to build, shouldn't be problem at all.
HTML5/JS will be less compatible with your audience. A lot of people still have non-compliant browsers.
That being said, HTML5/JS would be more fun I think. :)
http://html5readiness.com/ Provided by Robert Pitt
Is your game meant to be used on the iPhone? If yes, Flash is a no-go, as it is not available on the iPhone.
My vote: HTML5/JS.
Why? Consider:
Flash is fading away. On the other hand, you will enjoy a growing audience for your game (including iPhone, iPad and Android).
Flash is more expensive.
I am confident that you can create any UI in HTML5 that you can in Flash. In fact, and presumed limitations of HTML5 may actually force you to refine your UI in a positive way.
Have you seen Grooveshark since they recreated their entire application in HTML5 instead of Flash? Check it out as a proof of concept.
HTML5/JS is easy.
Flash requires a third party plugin, HTML5 only requires an up to date browser- which requirement is better for the user? Personally, I'd rather update my browser than install a third party plugin.
Since your making a multi-user game flash is the way to go. Multi-user stuff is possible with html5/js but as Chuck says its not available in all the browsers. For the multi-user side of things you can use Red5 (which is free) or SmartFox which is not free if you have more than 100 concurrent users. I built a big project with SmartFox awhile back and I found it really easy to work with. Depending on the simplicity of your game you could roll your own socket server code with a language of your choice.
Flash is pretty hard to learn unless you know Java or classic OO (I could add a lot to that comment). I would go with JS/HTML/CSS. As Chuck said, it would be more fun.
The server is only an issue if you plan to use Flash Interactive Server which is pricey. There are open source alternatives. But you say that as if JS has this built in - it doesn't. If you want real time updates, you'll need a CometD server and those are not easy to implement. I'd go with a short poll regardless of whether it's Flash or JS.
I'm a desktop application developer, and I plan learning html5, but as it's not released, there are (almost) no published books and not too much infomation for beginners on the web... I feel I should start with html4 and the current web development skills.
I think I should start with html4, css, and javascript... but there are so many technologies related that I get lost :D So, what current technologies will be still used when html5 is released? I mean, what about "jquery" and "ajax"? I know they are javascript under the hood, but will they still make sense in the future?
What would you recommend me considering that I have just a little bit of html knowlegde, almost null CSS and completely null in javascript?
Dive Into HTML5 is solid, but it isn't really targeted at total beginners. You might want to check out Designing with Web Standards for getting a grasp on the basics of HTML/CSS. For the JavaScript side of things, I'd recommend JavaScript: The Good Parts. Also keep an eye out for Secrets of the JavaScript Ninja, which is due this summer.
If you're already familiar with HTML4, v5 is not terribly different, mostly it adds new elements and attributes, and removes some.
For essential coverage of web standards, I suggest Jeffrey Zeldman's Designing with Web Standards (v3). It's largely theory and background, with little code. I recommend it. There is a sister book by John Allsop, Developing with Web Standards, which I have not (yet) read, but it is supposedly the implementation half of the topic the two books cover.
There is a book in the making by Jeremy Keith, HTML5 for Web Designers, on the new A Book Apart site (backed by the people of An Event Apart, including Jeffrey Zeldman). Jeffrey writes about the new book on his site, and provides links to other related coverage, including Jeremy Keith's take on it.
Get a good base with html/css then move onto javascript and pick a js framework that you like. Jquery seems to be most popular.
Here's a good read on html 5
If you want to be accomplished you need to approach JavaScript like a programming language and learn it in its own right, not as a simple way to script a few things. HTML4 is really pretty simple, CSS is where the meat lies really when using JS to manipulate pages.
I'd refresh on basic HTML, then start working with JS while trying to get to grips with CSS and jQuery.
Another vote for Designing with Web Standards. While not the best "beginner" book out there in terms of holding your hand through your first site build, reading this book is hands down the best way for you to establish a solid foundation of good habits so that when you do get to learning how to code you'll understand why it is important to do things the RIGHT way.
That being said. HTML is cake. Tying it into CSS is a creative challenge, and really being able to understand javascript will set you apart.
As far as technologies becoming irrelevant: Stay away from Flash. Other than that everything is as strong as ever.
You should try this website Technobits.net, which will give you a kick start morning with latest updates in your favorite technology. Check out following urls.
http://www.technobits.net/technologies/html5-css/
http://www.technobits.net/search/?q=html5
HTML5 is basically the same as HTML4 but with some nice additional little features. Pretty much everything you will learn from HTML4 will work seamlessly in a HTML5 environment.
I would start with learning things in this order: HTML4, then CSS2, then jQuery.
After that, start learning about HTML5 and CSS3 when more information comes out about them. But main issue about learning these languages falls down to your basic understanding. Once you have that in place, the newer technologies just make these basic things a bit easier.
Effectively, they will always be written and constructed in more or less the same way - but in time with newer versions, things will become increasingly easier to achieve.
http://www.codecademy.com/ now has HTML, CSS, as well as lots of Javascript lessons - its free, online, and doesnt involve lots of annoying videos. It works for me anyways...
I am starting to delve into the world of webOS and the Mojo SDK and having a great time so far, but I find myself having to constantly take a detour and read up on different subjects such as JSON, JavaScript, etc. I realize now that instead of diving in head first I probably should have done some reading on the core technologies behind webOS, and so I turn to the stackoverflow community for some advice.
I am looking for some recommendations on reading material (or any resources, really) related to JavaScript, and webOS development in general. The Palm developer site hasn't been too wonderful thus far. I've messed with JavaScript a tiny bit, but am definitely still a beginner when it comes to that realm.
I picked up the following from O'Reilly:
Palm WebOS
Javascript - The Good Parts
Also, online you can check out:
http://developer.palm.com/
http://www.webos-internals.org/wiki/Main_Page
http://www.precentral.net/
http://www.webosboston.org/
http://www.webos-internals.org/wiki/Resources
I have read some JavaScript books, and the book Object-Oriented JavaScript is quite good. Despite the name, it goes into detail about basics too, so it is suitable to JavaScript beginners. However, it is a little lacking in not talking about the DOM much: You won't learn many tricks regarding working with HTML documents, but it's a good book to teach you JavaScript as a language and various useful techniques.
I'd say learn JavaScript, CSS, and HTML in a browser. WebOS leverages your skills on the client side of the web, so aim to get those skills.
Check out the "best JavaScript book" threads, of which there are several.
I recently became quite interested in developing an adobe air application, and just had a few questions that maybe some more experienced air developers could answer.
Firstly, what is the average time-frame required for an air project. Mainly I'm planning a somewhat ambitious project of porting a specific forum framework over to an air app. How long would you estimate this would take me to do personally? I want something more than just the standard browser inside an app, more along the lines of built in controls/features for all the standard functionality.
Secondly, can apps be done completely with javascript/html/xml? I'm quite proficient with these 3 technologies, but have no real experience with flex/flash. This includes making the chrome as well. Do specific features require specific languages to be involved?
Finally, any good books/articles you would recommend? Preferably more advanced books/resources that lay the groundwork for making professional quality applications.
Any additional tips or insights on what you think may be useful are very much welcomed.
Start reading Adobe AIR for AJAX Developers, particularly the Getting Started section
Without knowing your skill level how would we know how long it will take you personally?
I have built and released apps in one week in my spare time, doesn't mean your project or your skillset for this project will be comparable.
Adobe Air development is fast and easy in general.
Don't reinvent the wheel making button and menu classes, leverage what's already out there.
Take a look at MadComponents: http://code.google.com/p/mad-components/ for UI
Other than that there are several robust tweening and graphics libraries out there.
There's also stage3d and frameworks to support 2d and 3d development for almost near native performance.
You can find a python script that will do it here:
http://code.google.com/p/flashcommand/
More info here:
http://www.mikechambers.com/blog/2008/05/02/flashcommand-for-os-x-updated-to-work-with-flash-cs3/
Basically, this just uses the JSFL API in Flash Pro to automate the compilation from the command line. However, it requires that Flash Pro be installed (and the script will launch it).
There is no a way to compile FLAs without using Flash Pro.
mike chambers
I'm looking to learn some fundamentals on cartesian geometry or coordinates based game programming. Platform is irrelevant, although I'm most proficient in JavaScript, C, Objective-C. Ultimately being able to create something such as dots or checkers would be ideal. The idea is for me to learn how sprites work and how pathing works programmatically. My question to you folks is where is the best place to learn the fundamentals? Something that isn't math heavy because to be quite frank, anything further advanced than calculus to me at this point is a grey line and requires refreshing my memory.
If there is a particular book, site, or open source project -- that would probably help me the most.
Thanks for any ideas.
I think there's a few more steps to accomplishing your objective, which is understanding the basics of game programming. You mentioned understanding sprites and pathing, which are imperative to game programming, but I think that initially you should spend a little time understanding the programming and methodology behind general graphical user interaction.
Regardless of what language you will eventually program your game in, I think that learning in a modern language like Java or C# will provide you with a vast amount of libraries and will allow you to accomplish tasks like animation and Event Listeners much more simply.
Here is a list of guides and tutorials that I think will be extremely helpful to you just as they were to me and others:
This is an extremely-detailed tutorial for a Java Game Framework that includes full source code and a full walk through (with source code) of writing the infamous "Snake" game in Java, complete with a control panel, score board, and sound effects!
The book "Beginning Java 5 Game Programming" by Jonathan S. Harbour will introduce you to concepts such as 2D vector graphics and bitmap including sprite animation. Plus you can get it used on Amazon Marketplace for $12!
Here is an unbelievable tutorial on Sprite Animation that has more than 5 parts to it! Plus it's written by Richard Baldwin, a Professor of CompSci and an extremely reliable and knowledgeable source. For more tutorials by him, this is his site.
Between these sources you're going to possess the methodology of the parts that go into a game, which are applicable in any language, as well as the knowledge of how those parts can be actually implemented as well.
G'luck!
O'Reilly has a great tutorial on simple game development using Objective-C and Cocoa on the Mac. Lines of Action.
othello and the book is of course the renowned PAIP by Peter Norvig
A site I frequently visit is GameDev.net. They have a lot of resources for game programming in general. The forums are a great place to get more specific answers on game development.
On the site, visit the Articles and References page, which contains articles written by developers on various game topics.
You don't learn about a car engine by reading the Chilton's manual; you have to pop the hood and get your hands dirty!
Hope this helps.
I'm currently working on a checkers program using pygame. It's simple beyond imagination to get the graphics working, and the math that you need to achieve fluid movement is just simple vectors and vector animation.
Each rectangle or square on the board has a centerx and centery coordinate. The next square diagonal on the left is centerx - 82 and centery + 82 or the next diagonal on the right is centerx + 82 and centery + 82. A jump is just 2 diagonals. Make the functions separate to modularize your code and without much math you've got a simple checkers program. Easy.
Well, for Java, there's an API called GridWorld, (Its used as a case study for the AP Computer Science exam, which is why I'm familiar with it) It uses a coordinate system, so you might learn something from looking at it.
You will probably want to understand minimax and Alpha Beta pruning.
Sprite animation is going differ significantly based on what platform you choose to do your program on, and any generic reference for animating on that platform will get you through that. If you want to shoot for Java, Yoely's references look pretty good.
For the game AI, though, I recommend you check out Artificial Intelligence: A Modern Approach by Russell and Norvig. It looks intimidating, and understanding much of the book will take a working knowledge of high-level math concepts. However, it is engaging and well-written, and you can probably make it through the first dozen chapters or so without hitting any math landmines. The algorithms and concepts in that book will be more than enough to help you program AI for a simple game, and might even help you decide on one.
My suggestion would be to use a language/development environment that makes working with sprites easy.
Take a look at Scratch.
The Scratch web site contains thousands of projects that you can download and edit right in the development environment.
Here are some projects to get you started: http://scratch.mit.edu/tags/view/checkers
Plus, there is a good online forum filled with helpful people if you get stuck!
Once you make a game using Scratch, you can upload/share it right from the development environment or you can post it on your own web site (although that takes some doing).
Hope this helps.
http://www.gamedev.net/
This is probably one of the most well known game/graphics programming site on the net. Its forums are subject to computational geometry, algorithms and all levels of GPU programming concepts.
You would be able to get a lot of help here. There are many articles on the subject of game programming already on this site from which you can see examples and understand the thought processes behind putting together these kinds of systems.
:]
http://www.pygame.org/
Python is great to get started, and nice examples and tutorials available.