Sign up ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I Know this is stupid but can you make JS games on the pi or does it have to be in python. I find HTML/JS/JQ easier and better to work with so I just wondered. Thanks Josh

share|improve this question
    
Yes you can make JS games. But as the name says JS is a scripting language, and the code can grow really big and out of control, and Python is programming language and with the correct methodologies you can create good code. I am not sure about how you would write a web game with python because I don't use python. You might have more luck with HTML5 Canvas and jQuery. Look for HTML Canvas games or something – ppumkin Mar 24 '14 at 19:10
    
@ppumkin 1) Scripting languages are programming languages, and python is also considered a scripting language. 2) You can grow code "big and out of control" w/ python just as easily as you can w/ js. 3) Modern browsers use a js engine with a 2-step compiler (code->bytecode), making the two languages contextually identical. 4) JQuery is a library written in javascript for use in javascript applications (it is actually referenced in the question as "JQ"). – goldilocks Mar 25 '14 at 13:11
    
Python is a powerful programming language because you can do Object Oriented programming with, Modularized programs or simple scripts. A script generally is something that the user can edit, like VBScript based on VB.NET but does evertyhgin through DLL calls instead of compiling into abinary. Unfortunately there is no solid distinction by this and the main difference is how they are used. All I meant that OO does not exist in JS, its prototyped and loosely coupled. But it is very popular because its lightweight and fast, and ie .NET cannot render graphics in Web browsers. – ppumkin Mar 25 '14 at 14:16

1 Answer 1

Yes. As @ppumkin points out though, javascript is a scripting laguage for the browser, and as such, garbage collection and memory usage will not be as efficient as programming in a language such as python. c++, et al. It can be more difficult to trace memory leaks in javascript.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.