How different is GDscript from Python? [closed] - python

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 21 days ago.
Improve this question
I recently started developing games on Godot after 3 months of Python experience. Is it good to learn Python before jumping into GDscript? If not, how different are the two? Is it okay to first learn Python in preparation?
Thank you! :)
I decided I should watch the official GDscript tutorials that the Godot channel put out, I have not finished it entirely as it is very long, so I was wondering if someone on the forum could answer :)

Is it good to learn Python before jumping into GDscript?
It is not necessary. It is arguably good, but not because of it being Python specifically. Any prior programming experience will transfer well.
If not, how different are the two?
They have similar syntax. Keywords are different.
In general it is easy to translate algorithms from Python to GDScript. However, it might result in a suboptimal GDScript/Godot solution.
A common experience among beginners has been implementing things in GDScript to later discover that Godot already have a built-in way to do it that is both more convenient and more efficient (I'm not saying this is always the case, but that it is very common). Please notice that is not so much learning GDScript, but learning Godot.
Don't expect any advanced Python to work on GDScript. The reason being that GDScript semantics are closer to Java or C#.
I want to mention that in GDScript you are free to specify types or omit them from your code (in which case it behaves as a dynamically typed language). In general I encourage to use types, it allows for static analysis (and starting from Godot 4 it should give you better performance too).
Is it okay to first learn Python in preparation?
You can learn whatever. Learning Python first is OK. It will not hinder your experience with GDScript.
With that said, I want to point out that GDScript is a good entry level programming language. You can jump into GDScript without prior programming knowledge.
Is there any good sources such as books or writing that I should refer to?
While it is off-topic to ask for learning material on this site, it is OK to recommend…
There is a canonical answer: Tutorials and resources.
I decided I should watch the official GDscript tutorials that the Godot channel put out, I have not finished it entirely as it is very long
Do as you wish. People have different preferences for learning.
Some of us rather have a project to motivate us, and learn the things we need to get it done. Other prefer to explore and experiment the options. Others prefer to have tutor that guide them.
It is all valid.
If I were you, I would go with GDScript basics and jump in. But I'm not you.
so I was wondering if someone on the forum could answer :)
This is not a forum. This a Q&A site. Open ended conversations do not work well here.
With that said, I would like to point you to: the official Godot forum. See the Godot's community page.
I would also want to point out that despite GDScript being the intended and preferred way to use Godot, you don't have to. Yes, you might even use Python. And yes people coming from Unity might use C#. See using different programming language in godot game engine?. If you plan to do something like that, I would still encourage to give GDScript a try.

Godot documentation is very clear, well organized and straigthforward.
You definately should take a look at it. If you just casualy read the General and Getting Started section from the navbar you probably gonna learn lots of things. Godot Docs
If somehow you still are doubtfull about GDScript, the docs also have a section under the Scripting link dedicated to it's introduction and other stuff. GDScript Docs
Have fun! :)

Related

Student Seeking Programming Advice [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I am a high school student, and I have just finished 4 free youtube courses on python, along with a "beginners guide to python" book, and I am a little lost. I understood the language quite well and enjoyed learning it. My question is: what do I have to learn in order for me to start designing and building things with python. Just to be clear, I am not talking about complicated things such as websites or machine learning applications. I am talking about simple games and apps so that I can form a better understanding of software development through practical experience. I honestly thought this is where the course and book would get me by now. I feel like my understanding of python is great (for a beginner). I understand all of the fundamental terms and definitions of the language, and I can answer questions other students may have about directories, methods, strings and so on without trouble. I just have no idea where to begin designing and building real things that can test my knowledge as a programmer.
I understand that I have a lot to learn. I just have no discernible vision as to how I can become better without practicing what I learn.
I am grateful for any advice you can provide on how I can resolve this issue, as well as any book recommendations or helpful links for learning resources.
Thank you for your time.
There are lots of fun ways! Try some of Swagart's books (Automate the Boring Stuff with Python, etc). By all means try making a basic web application with Flask. Try making a game with Pygame (Al Swagart's pygame book is good for that). Try interfacing a database directly with sqlite3. The possibilities are endless. Don't stick to just raw python, the best way to get experience is to use external modules and apply your knowledge to them. If you need to write Python for a job they will want you to be using something or other to do something or other and the only way to be able to say "Oh yes I can learn this module you're using for webdev/game/anything" is to have experience learning new modules and use cases.

Just being Curious [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
So I'v been learning how to program for about a month now. I just finished reading 'Invent your own games with python'. Before the book I had never seen a line of code. After reading the book I'm able to read code and understand what's going on. But that's about it. I got the syntax down and can use all the flow statements. I'm still not able to create my own projects and when I try to do a challenge online, I just sit there and stare at it not knowing where to start. Is this normal? Is this one of those things where one day I'm gonna wake up and It's gonna click in head. Any suggestions as too what I can do accelerate my learning?
I think you've reached the bliss point between knowing how to write Python and how to actually program.
Python is the tool, programming is the practice.
I was in your shoes a few months ago (I had finished Data Structures and Algorithms in Python, also a good book). I decided to look online for areas to practice and understand programming problems as well as improve my math skills (math shortcuts come in handy). Nothing really clicks until you've gotten a few projects accomplished.
Designing a game IS HARD and it may not be the best place to start but if that's where you want thing to click I'd highly recommend breaking games down as a programmer might: take a feature of a game, say SimCity's Sim.
What features in OOP terms does this feature have as attributes?
What does the object do?
What external classes/objects affect this object?
What does this object externally impact?
Since you're learning Python, learning how to use the OOP paradigm is crucial and designing projects around it allow you to use Python with greater strength.
It's absolutely normal to look at a problem and have no idea where to start.
That's a lack of experience. Get some.
This is where I start if I want to get a feeler for a new language: https://projecteuler.net/
There's plenty of resources online to test your skills and there's probably an offline community near you.
Yes, this is perfectly normal for any beginner.
What you need to do is just continue doing what you are doing.
The beginning will be difficult learning curve so aim for more beginner/basic level questions (i.e.: beginner level online challenges).
Develop plenty of your own programs for fun and whenever you get stuck ask online.
When other people answer your questions online look for the most elegant solutions (i.e.: quickest execution time, neat coding style, etc...) and try remember their solutions.
The fastest way (in my opinion) to learn code is to build your own programs for fun. Just never give up no matter how hard and frustrated it gets.

Learning Python Exercise [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have taken it upon myself to learn python. As it is my second language is has not been that hard to get the hang of. I am looking for some simple python projects to undertake so I can better learn the syntax of the language in general. I would specifically like to learn the syntax of arrays, lists, and dictionaries.
Edit:
I cant say that one of your answers are right or wrong but between all of you i have alot of material! Thanks everyone :D
ps I particularly liked Google's Python Class
Google's Python class has a bunch of projects you can work on.
The Python Challenge has been by far the coolest exploratory stuff I've done with Python.
Take your time working through the problems - it's worth it.
Python Koans is a good interactive tutorial that covers basic syntax and advanced concepts.
A usual response to such things is Project Euler. Not necessarily special to python, but all those problems are solveable with python, and by working on them, you especially learn a lot of things that make Python special.
You can try pyschools.com
There are many small exercises categorized into different topics. Quite a fun way to learn how to program.
Steve Lott's Building Skills In Python is great. He's prominent on this site, too.
I would highly recommend the following e-book for learning Python. It covers several different programming paradigms and is a very good introduction to Python in general.
www.greenteapress.com/thinkpython/thinkCSpy.pdf
If you are already familiar with programming in general then Dive into Python is an unbeatable resource for getting the foundation of the language fast.
I have read both of the above and found them to be very helpful.
Also something similar to Project Euler is Rosalind
http://rosalind.info/problems/list-view/
Most of the problems are solved by writing programs that perform opetarions on strings, which makes it a goot tool to learn about lists and dictionaries. And you also learn something about bioinformatics which doesn't really help you much in your programming career but is really cool =D
Sorry to state the obvious, but why not read a good book or two, like:
Learning Python: Powerful Object-Oriented Programming
If you like more of a learn as you go approach, there's always the venerable:
Python Cookbook
Also in line with the Project Euler answer already provided, I'd recommend looking into some Code Kata. I generally go through these as part of learning any new language, and here's a link to several good ones:
http://codingdojo.org/cgi-bin/wiki.pl?KataCatalogue
Also a Stack Overflow question discussing Kata:
https://stackoverflow.com/questions/44533/your-favorite-code-kata
Python challenge is cool. And I see another good http://projecteuler.net

Starting Python and PyQt - Tutorials, Books, general approaches [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
After doing web development (php/js) for the last few years i thought it is about time to also have a look at something different. I thought it may be always good to have look of different areas in programming to understand some different approaches better, so i now want to have look at GUI development.
As programming language i did choose Python where i now slowly get the basics and i also found this question:
How to learn python
which already contains good links and book proposals. So i am now mainly looking for some infos about PyQt:
Tutorials
Books
General tips for GUI development
I already looked at some tutorials, but didn't find any really good ones. Most were pretty short and didn't really explain anything.
Thanks in advance for advises.
The first thing to realize is that you'll get more mileage out of understanding Qt than understanding PyQt. Most of the good documentation discusses Qt, not PyQt, so getting conversant with them (and how to convert that code to PyQt code) is a lifesaver. Note, I don't actually recommend programming Qt in C++; Python is a fantastic language for Qt programming, since it takes care of a lot of gruntwork, leaving you to actually code application logic.
The best book I've found for working with PyQt is Rapid GUI Programming with Python and Qt. It's got a nice small Python tutorial in the front, then takes you through the basics of building a Qt application. By the end of the book you should have a good idea of how to build an application, and some basic idea of where to start for more advanced topics.
The other critical reference is the bindings documentation for PyQt. Pay particular attention to the "New-style Signal and Slot Support"; it's a huge improvement over the old style. Once you really understand that document (and it's pretty short) you'll be able to navigate the Qt docs pretty easily.
I had this bookmark saved:
http://www.harshj.com/2009/04/26/the-pyqt-intro/
There is a step-by-step guide at popdevelop.com on how to set up Eclipse with PyQT.
My advice would be: have some particular goal in mind, some app that you, or even better someone else, would use in a real world scenario.
I started with the same book Chris B mentioned, i.e. Rapid GUI Programming with Python and Qt and I found it useful and it touched many of the topics you would need in most GUI applications. Additionally, after some time and some confidence gained, you want to have PyQT Classes handy.
Do not avoid C++ examples to explain some problem you'd like to solve, rewriting it in Python is not that hard (depending on the problem, and scope of course).

Where can I find good python Twisted framework documentation, blog entries, articles, etc? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm playing around with Twisted and documentation found on their homepage doesn't answer all my questions.
The topic I am most interested at the moment is Twisted Application Framework. Also some open source servers using twisted framework would provide nice material for studying how it's all tied up together in a bigger project.
So far I've checked out iCal and read documentation on twisted website (3x) and few good articles I found in google.
I think you need to get your concepts right to start with. I found this blog post to be helpful.
Introduction to Asynchronous Programming and Twisted
The published book is pretty useless, in my opinion.
I recommend starting with the "deferred" docs online, and making absolutely sure you understand what asynchronous means and what deferreds are for. The best online docs that I've found are on the official site, though they could surely use some polishing:
http://twistedmatrix.com/trac/wiki/Documentation
The developers recommend reading the source as well, though if you have specific questions, I've found that the devs hang out and respond on both the IRC channel (#twisted on the freenode network) and the online mailing lists (There's a general and a twisted-web specific list)
As for blogs, there's at least the two below (both blogs are by twisted developers). I bet if you asked this same question on the twisted-python mailing list, you'd get a much better and more comprehensive answer than I could possibly give. :-)
http://oubiwann.blogspot.com/
http://glyph.twistedmatrix.com/
Divmod has some medium sized projects which use Twisted and might make good additions to your reading list. Additionally, the Twisted Community Code in Launchpad will give you a much longer list of Twisted-based projects to look at.
I found the Twisted Network Programming Essentials book to be a useful guide when first learning Twisted. Although it is more of a Twisted "cookbook". Some of its "recipes" are useful.
There's an overview here: The Twisted Network Framework.
Bruce Eckel wrote a nice article that points out some of the weird names Twisted uses: Grokking Twisted. According to that article, there are some good examples in The Python Cookbook, 2nd Ed (O'Reilly).
This unofficial tutorial is, in my opinion, the absolute definitive way to learn Twisted.
It contains step by step examples on how to use everything from super basic to advanced features. Everything is motivated by first doing it the hard way so that you really understand what problem each part of the Twisted solves.
I've used software based on Twisted for five years but it was only after working this tutorial that I now really understand it and use it from scratch for my own programs.
This is not self-promotion. I do not know the author of the tutorial to which I linked.

Categories