Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to learn more?
#1
Hi! I've been coding some smaller projects like a text version of Rock Paper Scissors and a 1-10 number guessing game and I don't know how to apply slightly more complicated things like lists, tuples, dictionaries, etc. I feel that I've hit a bit of a road block and I want to learn these before diving into some modules. I want to get into 2D graphical game development. What do I need to do to get started?
Reply
#2
take a tutorial, a couple of sugestions:
http://interactivepython.org/courselib/s...index.html
or
https://www.python-course.eu/python3_course.php
Reply
#3
Just find online courses. Also make sure you start right from the basics instead of the more advanced stuff.
Reply
#4
(Mar-06-2019, 06:24 AM)keegan_010 Wrote: Just find online courses. Also make sure you start right from the basics instead of the more advanced stuff.

I've taken those courses, and i don't know how to slowly reach my way into more advanced stuff. I always find tutorials that are too big of a leap past things I can handle.
Reply
#5
(Mar-06-2019, 04:09 AM)Icaari Wrote: I want to get into 2D graphical game development. What do I need to do to get started?

(Mar-07-2019, 12:53 AM)Icaari Wrote: I always find tutorials that are too big of a leap past things I can handle.
What do you define as advanced stuff? You should know the basics before attempting any graphical dev. Sometimes tutorials you just have to jump in over your head to get anywhere.

(Mar-06-2019, 04:09 AM)Icaari Wrote: I don't know how to apply slightly more complicated things like lists, tuples, dictionaries, etc.
Lists are used a lot when you group things together. For example if you are loading a bunch of images. You could group them together in in an image list and loop the list to load and draw them. The following would be an example in game dev terms
images_list = [
'right1.png',
'right2.png',
'right3.png',
'right4.png',
'left1.png',
'left2.png',
'left3.png',
'left4.png',
]
It would be better to do this than load each image separately.

Tuples are the same except immutable. More often i dont use them unless i am trying to state that it only has X number in it. no more, no less. For example Display((600,400)) is saying the display is 600 pixel by 400. Its a tuple to show that there is only x and y parameters.

Dictionaries map key(s) to value(s). They created a human readable nested ability to more organize. The same example before but organize in a dictionary. In this way we could animate left only by looping images_dict['left']
images_dict = {
    'right':['right1.png', 'right2.png', 'right3.png', 'right4.png'],
    'left':['left1.png', 'left2.png', 'left3.png', 'left4.png'],
}
It would be even better to do this as it more organizes and makes it easier to code. Instead of using lists and remember that images_list indexes 0-3 are right animations, and 4-7 are left animations, it much simpler and bugless to use dictionaries.

Classes are also going to be a big deal in use of 2d graphics.

Here are some ideas to program things to utilize some basics. Go down to very specific challenges and they show you what basics are required to fulfill that challenge. NOTE: this was taken from c++ tutorials so arrays are basically lists, maps are dictionaries, no switch statement, etc.
https://python-forum.io/Thread-Collectio...challenges

Before starting anything graphical, i would make some basic text games. This would harden your basic knowledge. Then i would move on to pygame to start real 2d game dev. When i started pygame i thought i was in over my head. You kinda just have to jump in sometimes.
Recommended Tutorials:
Reply
#6
(Mar-07-2019, 02:16 AM)metulburr Wrote: Here are some ideas to program things to utilize some basics. Go down to very specific challenges and they show you what basics are required to fulfill that challenge. NOTE: this was taken from c++ tutorials so arrays are basically lists, maps are dictionaries, no switch statement, etc.
https://python-forum.io/Thread-Collectio...challenges

This was exactly what I was looking for earlier, but I wasn't sure where to find it. I thought that maybe something like this would be perfect to hone my skills, and here it is!
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020