(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.