Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Python or Java?


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
19 replies to this topic

#1 jinxiful   Members   -  Reputation: 104

Like
0Likes
Like

Posted 18 January 2014 - 07:10 AM

About a week ago I started learning Python.
I started from scratch (meaning i knew NOTHING about programming),
and so far i only know some basics (Variables, Strings, Lists, Functions etc).
I learned from TheNewBoston's video guides on youtube, and I got up to episode 16 (out of about 43 i believe).
So far I have only made some extremely basic stuff, such as a program that asks you to input 5 numbers and then tells you which of the numbers you typed is the biggest (really simple stuff).
From reading around some more, I came to realize that Java is much more efficient than python for creating full scale iOS and PC games (that's what im aiming for).
 
So my question is:
Should I drop python and start learning java (which would be harder, but better for my goals in the long run- python might be just a waste of time, and i should master java instead), or go on with python because i'm already a used to it, and learn a different language only when I have already mastered it (the only reason I chose python is because I read that it was easy to pick up- again, I know nothing about programming).
 
and another small question: how much time of language learning does it take to make a game, even a game as basic as "tic tac toe"?
and how does a fully developed game's (let's say a 2D platform adventure game) script looks like? Whats its length? can anyone send an example?
 
thanks in advance


Sponsor:

#2 d4n1   Members   -  Reputation: 424

Like
9Likes
Like

Posted 18 January 2014 - 08:36 AM

Is your goal in life to learn languages, or use languages to make awesome stuff?



#3 studentTeacher   Members   -  Reputation: 869

Like
7Likes
Like

Posted 18 January 2014 - 09:07 AM

I second this: d4n1 has the right idea -- focus on learning game programming, not learning a language (if that's what you want to learn). Pick the language best for you (especially since you're starting out only a week ago) and learn the language. From there focus on game programming, not game programming in *this language I chose to learn*. The language is the tool; the real idea is using the best tool for the job.



#4 jinxiful   Members   -  Reputation: 104

Like
0Likes
Like

Posted 18 January 2014 - 09:07 AM

Is your goal in life to learn languages, or use languages to make awesome stuff?

I don't want to learn as many languages as possible if that's what you mean by "learn languages".

I want to master a language or two and be able to use them to make awesome stuff



#5 jinxiful   Members   -  Reputation: 104

Like
0Likes
Like

Posted 18 January 2014 - 09:15 AM


I second this: d4n1 has the right idea -- focus on learning game programming, not learning a language (if that's what you want to learn). Pick the language best for you (especially since you're starting out only a week ago) and learn the language. From there focus on game programming, not game programming in *this language I chose to learn*. The language is the tool; the real idea is using the best tool for the job.

 

so your'e saying that this: http://www.youtube.com/playlist?list=PLEA1FEF17E1E5C0DA (what im studying from) is for learning the language it self in depth, and will not eventually get me to making a game?

so where should i learn from? 

and how do i know the "best programming language" for my needs?



#6 SimonForsman   Crossbones+   -  Reputation: 6167

Like
2Likes
Like

Posted 18 January 2014 - 09:29 AM

 


I second this: d4n1 has the right idea -- focus on learning game programming, not learning a language (if that's what you want to learn). Pick the language best for you (especially since you're starting out only a week ago) and learn the language. From there focus on game programming, not game programming in *this language I chose to learn*. The language is the tool; the real idea is using the best tool for the job.

 

so your'e saying that this: http://www.youtube.com/playlist?list=PLEA1FEF17E1E5C0DA (what im studying from) is for learning the language it self in depth, and will not eventually get me to making a game?

so where should i learn from? 

and how do i know the "best programming language" for my needs?

 

 

Start by learning a language and how to program, the language you choose is irrelevant as long as it is reasonably popular(Learning how to program is far harder than learning a language and both your needs and the languages available will change over time), The new bostons python tutorials cover the very basics, nothing more, once you've worked through them i'd recommend looking at the official documentation and getting a decent book, pick a small project to work on to put what you've learned to practical use.


I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#7 rnlf   Members   -  Reputation: 1167

Like
2Likes
Like

Posted 18 January 2014 - 09:39 AM

If you already started with python, stick to it. Python is perfectly fine as a language and also specifically for game development.

 

Java is better for Android development, but for the PC, neither has any real advantage in the sense of deployment or availability. Most people have a Java VM installed, but Python can be packed pretty small and distributed with your game (py2exe even makes an executable file from it).

 

Python has good enough performance for everything you might want to do in the first years (and it will take years before you can think about making anything "big").  You will also be able to transfer all your python knowledge to Java later. Most experienced programmers can pick up a new programming language in a matter of days or weeks, because they know the concepts and only need to learn how to express them in the new language.

 

I suggest you stick with Python, learn how to program (which is easier in Python than in Java, imho) and once you really need it, switch to Java. But that will probably not be before the end of the year or so, if you really want to learn the concept correctly.


my blog (German)


#8 studentTeacher   Members   -  Reputation: 869

Like
0Likes
Like

Posted 18 January 2014 - 10:02 AM

 


I second this: d4n1 has the right idea -- focus on learning game programming, not learning a language (if that's what you want to learn). Pick the language best for you (especially since you're starting out only a week ago) and learn the language. From there focus on game programming, not game programming in *this language I chose to learn*. The language is the tool; the real idea is using the best tool for the job.

 

so your'e saying that this: http://www.youtube.com/playlist?list=PLEA1FEF17E1E5C0DA (what im studying from) is for learning the language it self in depth, and will not eventually get me to making a game?

so where should i learn from? 

and how do i know the "best programming language" for my needs?

 

Yes you need to learn a language or two to actually program. But keep an eye on the bigger picture: you are learning to program, not to program just in Python. Things like variables, functions, etc. are all applicable to many, many languages that's all. For now, sticking to python and using that tool to learn programming, and then game programming, is your best bet. You can then move to Java, or C++, or anything else and it'll be easier to transfer your knowledge from language to language.

 

Learning the "best" programming language for your needs is a science and an art. In the future, you'll have experienced using different languages. As you work with Python, you'll notice what it does well and what it's not good at. If you later move to Java, you'll notice the same thing for that language. As time goes on, you'll have intuition. If there's another language you don't know, but think it might be a good one, just do some research, test the language out, etc.



#9 SeanMiddleditch   Members   -  Reputation: 6351

Like
4Likes
Like

Posted 18 January 2014 - 03:01 PM

From reading around some more, I came to realize that Java is much more efficient than python for creating full scale iOS and PC games (that's what im aiming for).

 

Efficiency is one of the last things you should worry about as a beginner.  You're not exactly going to be writing Battlefield 5.  Focus on what you find easiest to work with for now which certainly will be influenced by familiarity (so sticking with Python if you're already started down the road is very valuable).  Given a year or three of experience you'll have the knowledge to not only make a choice between languages for new projects but also be able to ask the right questions.



#10 boogyman19946   Members   -  Reputation: 1071

Like
3Likes
Like

Posted 18 January 2014 - 03:40 PM

I'm with Sean on the point of efficiency. You should not worry about it unless you're making some truly performance critical software, and if you're not sure if your software is performance critical, then it's a safe bet that you're not writing it.

 

Now, on the note of learning programming, you're off to a good start. You first have to learn the basics of some language in order to start using it. This part is relatively straight forward. Which language you pick, however, will determine how easy the rest of your learning is going to be.

 

Second, you have to clock in a lot of practice, and if you intend to take programming seriously, then you must take your practice seriously. You cannot get rid of this step. In order to become an effective programmer, you must gain a certain amount of experience that you cannot read in books. Books are a great starting point, but they don't work very well with our memory. In order to remember something, you must repeat it. The more you work with it, the more available the knowledge becomes to you. 

 

Third, while you practice your programming chops, feel free to expand your knowledge in other areas. Programming can only get you so far. Programming is a tool, not a magical solution to everything. If you don't know classical mechanics very well, then your game physics code will reflect that with the results it's producing. You must know how to do something before you can tell the computer to do it, therefore, study! Knowledge can't hurt, and you can gain many benefits from it.

 

You'll notice I didn't mention anything about your Java vs Python question. That's because your question should be self-explanatory after reading the rest of your post. You're making progress in Python, so it would be silly to scrap that and start somewhere else.


Edited by boogyman19946, 18 January 2014 - 03:41 PM.

"If highly skilled generalists are rare, though, then highly skilled innovators are priceless." - ApochPiQ

My personal links :)
- Khan Academy - For all your math needs
- Java API Documentation - For all your Java info needs :D
- C++ Standard Library Reference - For some of your C++ needs ^.^

#11 jinxiful   Members   -  Reputation: 104

Like
0Likes
Like

Posted 19 January 2014 - 08:49 AM

Ok, I get it. So the language is a tool for creating games, and I first need to learn "programming" before I learn "game programming". So i'll stick to python.

But let's say iv'e watched all of thenewboston's videos about python (43 of them), and I now know and have practiced all the basics. I know all the basic commands, functions, modules etc. Where do I go from there? How do I get this knowledge of writing python to serve me in making actual games? How will "print x" or "if x else y" be translated into a game? How do I start doing this process called "game programming"? It's like learning how to use work tools and then wanting to build a building. 


Edited by jinxiful, 19 January 2014 - 08:51 AM.


#12 SimonForsman   Crossbones+   -  Reputation: 6167

Like
0Likes
Like

Posted 19 January 2014 - 09:14 AM

Ok, I get it. So the language is a tool for creating games, and I first need to learn "programming" before I learn "game programming". So i'll stick to python.

But let's say iv'e watched all of thenewboston's videos about python (43 of them), and I now know and have practiced all the basics. I know all the basic commands, functions, modules etc. Where do I go from there? How do I get this knowledge of writing python to serve me in making actual games? How will "print x" or "if x else y" be translated into a game? How do I start doing this process called "game programming"? It's like learning how to use work tools and then wanting to build a building. 

 

For Python you can use pygame (a library) to handle graphics, input and sound.

Start with a very small game project (i usually recommend pong since it is fairly trivial).

 

Break it down into as small parts as you can.

what objects or data structures do you need to represent the game state ?

what rules govern how the game state is updated ?

 

then its simply a matter of a loop that:

*checks for player input

*updates the game state

*presents the gamestate to the player (i.e , draw stuff on screen and play sound effects)


Edited by SimonForsman, 19 January 2014 - 09:15 AM.

I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#13 fir   Members   -  Reputation: -460

Like
0Likes
Like

Posted 19 January 2014 - 09:25 AM

Ok, I get it. So the language is a tool for creating games, and I first need to learn "programming" before I learn "game programming". So i'll stick to python.

But let's say iv'e watched all of thenewboston's videos about python (43 of them), and I now know and have practiced all the basics. I know all the basic commands, functions, modules etc. Where do I go from there? How do I get this knowledge of writing python to serve me in making actual games? How will "print x" or "if x else y" be translated into a game? How do I start doing this process called "game programming"? It's like learning how to use work tools and then wanting to build a building. 

 

write some simple stuff like mandelbrot set viewer or arkanoid 

then you could try to learn some more complex platform game

or something

 

hard truth is that this (doin decent game) is very hard (very large amunt of work, it is for example much harder then get a master degree in the college)

 

I was learning such basics you learn 20 years ago about '90

(though I was going very low lewel and got more than 10 years

of break in meanwhile) and still trying to make some decent game

with only partial succes - If this is not scary you - it should ;/

 

ps. probably native engish speakers got somewhat easier here becouse not knowing english can probably slow down you much here and learning english to this extent can take 5-10 years too (big part of articles tutorials etc are only avaliable in english - end even whan i was able to read english i was doing it much slower than in native language (still probably i read it a bit slower and it get more tired when reading english) - 


Edited by fir, 19 January 2014 - 09:39 AM.


#14 studentTeacher   Members   -  Reputation: 869

Like
0Likes
Like

Posted 19 January 2014 - 02:46 PM

If you need to further your programming (and library use), I'd suggest learning to use API's and looking up the information on installation and use of the pygame library to make some simple games. Python and pygame is great and you can do a lot with it -- so go at it! You'll notice that something like "handling collision" and other algorithms can be translated from language to language, so "game programming" will be a bunch of tools and algorithms you learn using python and pygame. Check it out and learn a lot!

 

There's also a ton of videos on youtube about making games with pygame, so if youtube videos are helping you a lot, I'd say go for it :)



#15 Serapth   Crossbones+   -  Reputation: 5581

Like
1Likes
Like

Posted 19 January 2014 - 04:50 PM

 

From reading around some more, I came to realize that Java is much more efficient than python for creating full scale iOS and PC games (that's what im aiming for).

 

Efficiency is one of the last things you should worry about as a beginner.  You're not exactly going to be writing Battlefield 5.  Focus on what you find easiest to work with for now which certainly will be influenced by familiarity (so sticking with Python if you're already started down the road is very valuable).  Given a year or three of experience you'll have the knowledge to not only make a choice between languages for new projects but also be able to ask the right questions.

 

 

Actually, efficiency is EXACTLY what he/she should worry about as a beginner; it's just a matter of how you define efficiency.  ( For the record, I agree with you completely, I am just being a pedant ).

 

 

See, there are many metrics by which you can measure a programming languages efficicency.  The speed of the code it generates, the productivity of the programmer using it, or the speed in which someone learns the language.

 

As a beginner, you want to choose a language that is efficient for learning.  This generally means no or a simplified build cycle ( if you dont know what this means, good!  you picked a language that fit the criteria! ), lots of supporting documentation and a large community of people to talk to.  Python fits this criteria, although it wouldn't be my personal recommendation.  ( I would personally recommend LUA ).



#16 boogyman19946   Members   -  Reputation: 1071

Like
0Likes
Like

Posted 20 January 2014 - 12:22 AM


Ok, I get it. So the language is a tool for creating games, and I first need to learn "programming" before I learn "game programming". So i'll stick to python.

But let's say iv'e watched all of thenewboston's videos about python (43 of them), and I now know and have practiced all the basics. I know all the basic commands, functions, modules etc. Where do I go from there? How do I get this knowledge of writing python to serve me in making actual games? How will "print x" or "if x else y" be translated into a game? How do I start doing this process called "game programming"? It's like learning how to use work tools and then wanting to build a building. 

 

If-statements allow you to make decisions based on a test case. Can you not think of any situations in a game where you could use this? Logical statements are the most commonplace things. If I'm hungry, I eat, else, I don't eat. Simple. Of course the computer doesn't attribute it's logic skills to intuition, so you have to make that decision explicitly. If a player's health is less than 0%, then end game and notify the player.

 

You probably wouldn't be using the "print" function unless you were making a text-based game or debugging with the console. The reason why tutorials use functions like this when teaching is because they're easy to use and without them you wouldn't have any means to get meaningful output without writing code to accomplish that. That's clearly not a good start. 

 

Also, I should note that, you don't have to learn "programming" before learning "game programming." Just practice writing code, and make sure you complete your projects. In that respect, you ought to start small and gradually crank up the difficulty. If you feel you can handle a small game, then write a small game. 

 

I'm not sure if I explained your questions coherently. I feel like I might not have addressed them completely. I'm a little tired so I'm writing this on limited mental capacity, but I'll get back to this tomorrow and see if what I said makes sense biggrin.png


Edited by boogyman19946, 20 January 2014 - 12:30 AM.

"If highly skilled generalists are rare, though, then highly skilled innovators are priceless." - ApochPiQ

My personal links :)
- Khan Academy - For all your math needs
- Java API Documentation - For all your Java info needs :D
- C++ Standard Library Reference - For some of your C++ needs ^.^

#17 lrh9   Members   -  Reputation: 174

Like
1Likes
Like

Posted 20 January 2014 - 09:20 AM

You can always use both. It's incredibly easy to extend Java with Python (or to use Java in Python) with Jython. Jython let's you use Java in Python, and you can use the Java Scripting API to script Java applications. But unless you really need both it's generally not done.



#18 rnlf   Members   -  Reputation: 1167

Like
0Likes
Like

Posted 21 January 2014 - 02:00 AM

Irh9: I would also not recomment mixing multiple languages when you just start with programming. Usually the syntax of one language is enough to deal with for a beginner. Two different ones are already problematic for someone who tries to understand the basic principles of programming.


my blog (German)


#19 jinxiful   Members   -  Reputation: 104

Like
0Likes
Like

Posted 21 January 2014 - 08:04 AM

Ok so for now ill study python and later use pygame for making some basic games. And ill see where ill go from there :)

 

Thanks to everyone who commented for your time and patience :)



#20 fir   Members   -  Reputation: -460

Like
0Likes
Like

Posted 21 January 2014 - 08:10 AM

IMo It is not to much important what you will chose, you still can change it a 'million' times. To be honest such kind of questions often gets me a bit angry (boring, boring, boring) but what to do. I would much like prefer to make a whole directory in this forum for such kind of questions "where to start"/"what to use"


Edited by fir, 21 January 2014 - 08:38 AM.





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