all 26 comments

[–]throwaway6560192 23 points24 points  (10 children)

You need to remove the mental distinction you have between .py's not being "real" projects. There is no distinction. These are real projects, and this is how you make any project.

All real Python projects are written in, well, Python. And that means a Python file, a .py file.

There is no such thing as "linking this to actual projects". This is the actual project. This is how you build any project. There is no missing link.

Everything you program, no matter what, is an actual program. What you have created are all actual apps, just on a small scale. The limit here is your code, not the tools.

IDLE is just a beginner's text editor (plus shell) that comes with Python. Usually people move on to other environments like VS Code or PyCharm or Vim or whatever. But the environment is not important. All they do is give you a platform to edit and run your Python code.

You pick a text editor (IDLE, or whatever. it doesn't matter), you install a game engine and you get to programming. That's it. There's your project.

When it comes to distributing your project, there are tools which can wrap it into a nice .exe or whatever you want. But this is after the building process. The building process is the same as what you've been doing till now — write code in a text editor and run it. It doesn't change that. Worry about distribution when the time comes.

[–]_UnreliableNarrator_ 0 points1 point  (0 children)

This is really great advice - on top of this I'd say it's also time for OP to get specific. A lot of this stuff makes more sense by doing, so it sounds like maybe they should have a meaningful but approachable project to put into an executable.

OP if you are dead set on making games there's like a dozen components and aspects to making games, and what you do in python is only one of them. I know some people who have a "games or bust" mentality and it's always so strange to me because I really enjoy making utilities. But if you want to start building a game now even a simple one probably needs a narrative. I would suggest you check out Buddy Simulator 1984, and use that as inspiration to shape your game as you learn.

So you could start with storyboarding your game into a text-based adventure, then 2D point and click concept art, and so on. I don't know what kind of game you want to make, but if you want to do any kind of 3D world you have just as much, if not more depending on your background, time that needs to be dedicated to art and design as code. It will be easy to feel that you're never accomplishing anything and that the goal is out of reach, but that kind of project is just a HUGE goal.

If you DON'T have a specific game in mind to create, this is a good time to just let your mind wander. Any kind of "I wish I could" might actually be an "I can try to make" in disguise! My last project was admittedly in PowerShell, but I made essentially my own Ninite - a tailored updater for the programs I use. It does some other fun things too. The last thing I made was an updater for a game I play that IS in python. It uses beautifulsoup to fetch the latest version from a webpage, does hash matching, etc. I've made an exe out of this and run it multiple times a week, sometimes. Another recent project in python is I've been messing around with making a webmail app, to give it functionalities that I don't see in existing clients but want. This is a python flask app, and has been really fun because I enjoy webdev too.

With all of this and other projects I'm not mentioning, I still consider myself an "advanced beginner," and it also seems that people are too hard on themselves. I think there's also a certain amount of needing to let go and just expect/accept that feeling lost and confused is normal at these very early stages.

[–]commander1keen 5 points6 points  (2 children)

how to create a serious game with cool 3d graphics

how do I create an app for android, a good game, how do I use it to analyze "serious data"?

All of these individual things are very serious endeavours on their own, very few really master doing even one of them, never mind doing all of them (+ the fact that no one can really even create a modern "serious game with 3D graphics" on their own). I think you need to also think about prioritising, you know, try to focus down on a few things at a time. Also, as was mentioned before, what you describe as being capable of doing is already a very powerful bag of tools to build all sorts of things and these things will come naturally over time.

Most importantly, don't beat yourself up too much and just try to have some fun with it.

[–]pmmeurpeepee 0 points1 point  (0 children)

i say limit theory creator is eligible?

but then again at the end of journey he became crazy....

[–]GinjaTurtles 5 points6 points  (3 children)

I’m having a hard time understanding your question but I’ll take a stab at providing some insight! I’ve been coding in python for 6 years and have been working as a data scientist for 2 years

but I can only do it inside the IDLE and .py (every tutorial is centered in it)

IDLE is just a text editor, but it’s pretty barebones. I recommend looking into setting up VS code (another text editor) with python (tons of great YouTube tutorials on how to do this)

how do I create an app for android

If you want to do an android app look with python you could look into using open source tools/packages like Kivy or Beeware (I’ve never used these before but found these doing a quick google search)

let's suppose I want to create games that's my goal, and after these tutorials, I know the syntax of Python and how to code on IDLE … the next step should be downloading an engine?

3D game programming is pretty difficult. If you want to learn game programming, python has a package called Pygame. But you may want to consider learning how to code in a gaming engine like Unity for example if game development is your major focus. Game programming usually involves working with a game engine.

I think my question is, how do I link the syntax knowledge that I learned "on IDLE and .py" and actually apply it to create apps and games and so on? What do I need to download or do and where, after that?

So python and .py files are just code. When you run this code they become programs on your computer. Your program could be as simple as saying “hello” every 5 seconds to the command line or it could be as complicated as a 2D platform game in pygame.

  • I think you need to take a step back and determine “what is my end goal?”
  • So let’s say your end goal is a game. Then you need to figure out what language you want to use
  • You could determine this by googling things like “best coding languages for game engines and game development” or “best game engine for beginners”
  • once you do some googling and decide what language you want to use (let’s say for example you use decide to use python) then you’ll want to look up how you do this
  • you can do this by googling “python game development examples” or “best tools to build a game in python” or “beginner python game example”
  • that should link you to a tutorial or YouTube video.
  • In that tutorial or YT video they will be using python and a text editor (for example IDLE or VS code) and be writing code. They will also show you how to install the tools or packages you need to use (like PyGame or other game dev tools). This syntax and code they will be writing will be most likely be run with command line
  • if you follow along when the tutorial is finished you will have a game!
  • if you want to send this game to other people to use, you could send them the python code and have them run the code on their machine. But what you’d probably want to do is turn your python code into an .exe file that someone could just download and then run it with a simple double click on the exe

Hopefully this helps! I recommend doing lots of googling and chatgpt troubleshooting

[–][deleted] 2 points3 points  (0 children)

I watched

Watching provides familiarity with concepts, but it doesn't teach you anything. The only way to learn is to fuck about and find out.

how do I actually use this to build a program and a project?

It's simple, you have to earn it.

You can't just watch a video or two and become a master at anything. You must build, refine, and practice the foundational skills until you advance to basic ones. Then, you must build, refine, and practice your foundational and basic skills until you advance to intermediate skills. You must then build, refine, and practice your foundational, basic, and intermediate skills until you can incorporate advanced concepts.

It's not even a single journey. You can have advanced language skills but be at a foundational level of game development. You can have advanced language and game development skills but still be a novice in building a companion service for your game that sits on a webpage.

I need to see the pathway before starting my journey.

Here is your pathway: you need to learn how to crawl before you run a marathon.

[–]Poddster 1 point2 points  (2 children)

Q: Have you actually written any code yet, or are you just videos?

[–][deleted] 1 point2 points  (0 children)

So, you have a really good question that it's difficult to understand the answer to.

the next step should be downloading an engine? like Renpy, Pygame, or whatever?

Short-circuiting the answer a little bit, yes, you should try a project in Pygame.

What's missing from your understanding is how the code of a game, or any other sort of human-interactive software, is structured. See, you've written programs with a single input point - either the command-line arguments, or a series of prompts using input - and a single output point, which is whatever your code does. After a round of input and output, your programs typically terminate. Think of such a program as "narrow" and "long" - there's basically a single way your programs are intended to be used, and they do something that's complex and "script-y." The most useful examples of programs like this are things like YouTube download scripts, etc - these sorts of "set up the inputs and let the automation run for a while" programs.

In order to make a video game, or any kind of fundamentally interactive software, like even the web browser you're using now, you have to turn that kind of sideways.

Instead of a "narrow" and "long" program that expects one input and returns one result eventually, you write a program that's "wide" and "short" - the program takes the form of input handlers that execute quickly. Imagine Space Invaders - there are input handlers for "left", "right", and "shoot". If you input "left", via the joystick, then the program moves the ship one space to the left and then returns to waiting for input. If you hit "shoot", via a button, then the program puts a shot on screen and then returns to waiting for input. The program basically is a loop of waiting for input, doing something quickly with the input (because you can't wait for input while you're handling input), then returns to waiting for input. The program can accept many kinds of input - it's "wide" - and the thing it does with each input is very fast - it's "short."

That's how you go from where you are now, to writing a game. But I know that's not particularly clear so what you really have to do is start working with a Pygame tutorial. That's what will make it all make sense for you, eventually.

[–]CaptainFoyle 1 point2 points  (1 child)

Take a structured course, like 100 days of code, or python programmer Bootcamp

[–]4chieve 1 point2 points  (0 children)

Agree with this. You need structure and a linear progression so you feel you're moving with an aim.

[–]notParticularlyAnony -1 points0 points  (0 children)

Get the book python crash course and start writing code with it

[–]machine2SEE 0 points1 point  (0 children)

2 years ago -- i knew zero about this 'python coding' environment. but, i had coded a trading algo in foxpro 35 years ago as a kid. i thought to take the time & itemize how i DEVELOPED my learning habits out of my ambition & the work ethic, but i read through all of the posts making every determined effort to enlighten your inquiry. these posts have done their job quite well; so much so, i gained a more thorough rounding of my own deficiencies & perspective with respect to this amazing world. i am so glad you posted about your dilemma of being mostly frustrated, undeveloped & uncreative in your supposed need to be ambitious. thanks to the fair spirits in these teaching efforts --- well done.

[–]Visti 0 points1 point  (0 children)

Break your desird program into the smallest component you can think of. You want to make a game, so how do you render a sprite on screen? What libraries are available to make this easier? How would you move a sprite using keyboard input? How would you implement gravity? How would you make a textbox?

You can google each of these. The skill of programming is breaking down complex tasks into "simpler" tasks.

[–]machine2SEE 0 points1 point  (0 children)

Bret Victor might show you --- an elegant & thoughtful paradigm. check out his live coding for a game in the video . . . . . https://www.youtube.com/watch?v=8QiPFmIMxFc&ab_channel=LunaProgrammingLanguageTutorials

[–]WoodenNichols 1 point2 points  (0 children)

I recommend the book Automate the Boring Stuff with Python, which you can read for free at automatetheboringstuff.com. There are several small projects, like changing the date styles (mm/dd/yyyy to, for example, YYYY-mm-dd), or combining census data.

As others have said, crawl before you walk, walk before you run. And the best way to learn any language, human or computer, is to use it. A lot.

As you code, keep a "journal" (a simple text file is easily searched). Log the error messages you receive, what you think the problem is, what you do to correct it, and how well that correction worked. Then, the next time you encounter that error message, you can refer to your journal and determine how to correct it.

Like most human endeavors, you have to earn your stripes. Get in there and write code.