Jump to content

UI/rendering with python? What is python actually good for?

pipnina
Go to solution Solved by Sauron,

So it's not as capable as a language like C++ but is suitable for less complicated applications or making larger ones work?

 

So if I want to make a game... I should put learning C++ as a higher priority than Python?

 

Well, it all depends on what kind of game you want to develop. Space invaders can be done just fine, and with a lot less hassles, using python with pygame. Battlefield 4 won't happen on python though. I still recommend learning python first, it's an easy language and with it you can learn the base concepts of programming that apply to EVERY programming language.

For a while, I have been learning python with hopes for using it to make some form of game. But so far I have not encountered anyone in my college course (Including my tutor) using Python for UI or anything pixel based. (e.g. not defining a window size or loading images etc)

 

I have, however, played a game (Dysfunctional systems: Learning to manage chaos) on steam that has a lot of python files in its directory.

 

Is python capable but not in IDLE? What is pythons purpose as a language?

Link to comment
Share on other sites

Link to post
Share on other sites

To make simple games with python you can use a library called "Pygame". Don't expect anything too advanced though. It works perfectly with IDLE.

 

The main purpose of python is scripting and writing quick programs to do some simple things in less time and with less headaches that what would be required to fire up visual studio, code in, say, C++ with the super-strict syntax and compile the project. It's used as a sort of glue between executables; the main executable will call a python script (a few hundred lines at most) which checks a few things and makes sure the component requested is launched with the requested parameters. For example, if the game's launcher needed to find out where exactly the game files were located before starting the game, it could lauch a python script that looks for the files and feeds the main game's executable with their locations.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

To make simple games with python you can use a library called "Pygame". Don't expect anything too advanced though. It works perfectly with IDLE.

 

The main purpose of python is scripting and writing quick programs to do some simple things in less time and with less headaches that what would be required to fire up visual studio, code in, say, C++ with the super-strict syntax and compile the project. It's used as a sort of glue between executables; the main executable will call a python script (a few hundred lines at most) which checks a few things and makes sure the component requested is launched with the requested parameters. For example, if the game's launcher needed to find out where exactly the game files were located before starting the game, it could lauch a python script that looks for the files and feeds the main game's executable with their locations.

 

So it's not as capable as a language like C++ but is suitable for less complicated applications or making larger ones work?

 

So if I want to make a game... I should put learning C++ as a higher priority than Python?

Link to comment
Share on other sites

Link to post
Share on other sites

Python is mainly used as a scripting language. It is extensively used in building web frameworks. For example reddit uses Python. Also the support for lots of libraries it makes it an attractive choice for use. Lets say you want to make a RSS reader. You can use Python to parse RSS feeds and display the news headlines. 

Idle does have a GUI library called Tkinter that you can use to make GUI based programs. 

The only way to deal with an unfree world is to become so absolutely free that your very existence is an act of rebellion.

Link to comment
Share on other sites

Link to post
Share on other sites

So it's not as capable as a language like C++ but is suitable for less complicated applications or making larger ones work?

 

So if I want to make a game... I should put learning C++ as a higher priority than Python?

 

Well, it all depends on what kind of game you want to develop. Space invaders can be done just fine, and with a lot less hassles, using python with pygame. Battlefield 4 won't happen on python though. I still recommend learning python first, it's an easy language and with it you can learn the base concepts of programming that apply to EVERY programming language.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

Well, it all depends on what kind of game you want to develop. Space invaders can be done just fine, and with a lot less hassles, using pything with pygame. Battlefield 4 won't happen on python though. I still recommend learning python first, it's an easy language and with it you can learn the base concepts of programming that apply to EVERY programming language.

Ok, thanks.

 

I guess considering me and my friend were going to make an interactive, multiple ending book, we should use python and some xml files. (Tutor recommended using XML to store the content so I guess that's next after python)

Link to comment
Share on other sites

Link to post
Share on other sites

Ok, thanks.

 

I guess considering me and my friend were going to make an interactive, multiple ending book, we should use python and some xml files. (Tutor recommended using XML to store the content so I guess that's next after python)

 

.txt files were just fine for me ^^ but if your tutor says so, go right ahead!

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×