Jump to content

  • Log In with Google      Sign In   
  • Create Account

js vs python


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 fir   Members   -  Reputation: -456

Like
0Likes
Like

Posted 13 August 2013 - 10:25 AM

I am not sure if this topic is apropriate here, but indeed it would be very interesting to me read something about it here.

 

Personally I am almost exclusively involved in c coding (about 5 years of experience (maybe more depends of the way of counting)) never used high level languages to coding something  like a small (or bigger) game,

 

 Recently I interested myself accidentaly in some javascript language listings that seemed to me nice in some way (I think it looks much nicer than languages like java or c# ), prewiously I also knew python a little (but really not to much) -- so now those two languages javascript and python seem to me the two main candidates for writing some games in high-level-friendly way

 

 (I do not argue that this is a better way of writng games than in low level c, it is worse because of performance and other things, but writing listings in such high level  has some nice properties too)

 

My question is: if treating such languages javascript and python as competitors (both are high level, but both are very different ) which of them would be the better for game coding and why?

 

(the look of the listing/game source means the most here for me, If someone wants someone may assume that both languages would be working on top of the same framework, Im just curious in comparing the language itself the most)

 

(but on the other way the real frameworks and possibilities of the two languages and environments also may be compared - Is something potent to say something to me about this ?)


Edited by fir, 13 August 2013 - 10:48 AM.


Sponsor:

#2 orangecat   Members   -  Reputation: 145

Like
0Likes
Like

Posted 13 August 2013 - 10:34 AM

Javascript has WebGL, which is pretty important if you want to make a browser-based game. I don't really think Python has an equivalent to that.

 

I'm not sure if I'd see Javascript and Python as equals to begin with however.



#3 frob   Moderators   -  Reputation: 22718

Like
2Likes
Like

Posted 13 August 2013 - 10:37 AM


My question is, if treating such languages javascript and python as competitors (both are high level but both are very different ) which of them would be the better for game coding and why?

JavaScript is the language of the web.  If you are developing an HTML5 game, that means Javascript.

 

You can develop games in python with libraries like PyGame.  They are a different demographic.

 

 

I recommend that game developers learn a collection of languages.  These include C++, C#, Java, JavaScript, Python, and Perl.  All of them have their uses, and being comfortable in multiple languages expands your options as you look for solutions to problems.


Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.

Also check out my personal website at bryanwagstaff.com, where I write about assorted stuff.


#4 markr   Crossbones+   -  Reputation: 1653

Like
0Likes
Like

Posted 13 August 2013 - 03:03 PM

At the moment the easiest way to develop web games is to use Javascript. Python can't be (easily) used to target the web.

 

Python is a fine language for general purpose - you can use it to write native games, but not web ones (easily) (NB: I think that it's possible to compile Python into JS, but not easy. )

 

On the other hand, their semantics are broadly similar - but Python has a much nicer syntax.



#5 ChaosEngine   Crossbones+   -  Reputation: 2499

Like
2Likes
Like

Posted 13 August 2013 - 04:40 PM


Python is a fine language for general purpose - you can use it to write native games, but not web ones (easily) (NB: I think that it's possible to compile Python into JS, but not easy. )

 

Maybe not the front end, but there's nothing to stop you writing the backend in python. 


if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

#6 Godmil   Members   -  Reputation: 744

Like
0Likes
Like

Posted 14 August 2013 - 05:13 PM

It may be worth pointing out that JS is a viable alternative to C# when using Unity.

#7 fir   Members   -  Reputation: -456

Like
0Likes
Like

Posted 14 August 2013 - 05:38 PM

 

On the other hand, their semantics are broadly similar - but Python has a much nicer syntax.

 

It could be interesting for me to hear opinion of somebody who has good knowledge in both.

 

For example why you think python has a much nicer semantics, could you show some examples (two routines one in js one in python ?)

 

IMO Interesting is that they are both very different syntaxes (and probably much different semantics) and to look which one is better and why.


Edited by fir, 14 August 2013 - 05:39 PM.


#8 Krohm   Crossbones+   -  Reputation: 3245

Like
0Likes
Like

Posted 15 August 2013 - 01:35 AM

Basically every computer has JS interpreter installed. It even got a name which means something to the user, you don't need to explain them what an interpreter is... it's just "the browser". I think this is a major plus.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS