# Game Development And Other Stuff(7 questions)

How are not in built data structures used in game dev? How can I use them? I mean these(I studied them before in Python courses):

What game development Python module should I use: not(Pygame because it caused me an error when I tried to install it), maybe Pyglet?
What language should I learn for not web games(don’t say Python)?

Also, sometimes in lessons I see functions without a `global` statement change a global variable? How is that possible(I mean in a scope or namespace perspective)?

Also, because I have done about 10 courses in the Python section, I want a suggestion. When I try to make games, should I take a course, or learn by the docs or video tutorials outside of Codecademy?

Finally, what fields of programming are used for games? I learnt about Computer Science but not AI, should I learn about NLP?

Also, how many lines of code does a modern simple game have? Maybe 200 lines for a simple game and 20 000 lines for a normal complexity game?

Also, I have done Python for 9 months now(only 5 months worth of days actually studying coding; about 150 days). Can I learn another language?

A simple game can be written with very little code, but simple in user terms does not necessarily equate to simple on the code logic side. We cannot measure it in lines of code, and instead look at the complexity in terms of loops and nested loops (time complexity) and data structures (space complexity).

Certainly we can write simple games in a few dozen lines. But what are those lines? Are they imperative code constructs or are they declarative expressions? We can use the latter to produce one-liners that perform the same tasks as imperative code that needs a dozen. Comes down to how the programmer thinks.

Bottom line, we don’t start at the top, but at the bottom. How capable are we to write the functions that will perform the logic of our game? Can we write functions to do Coordinate Plane maths? How are we at writing Trigonometric functions? What about motion? How well do we understand linear maths relating to lines and slope? How effective are we at working with 2D and 3D lists? Start with where you are and begin to build from the bottom up, not the top down. The latter is nothing more than a chair in the sky.

3 Likes

What are 2d and 3d lists?

A list is a comma separated sequence wrapped in list delimiters, which in Python are, `[]`. That is `1D`. Lists can have any type of object as elements, including other lists. A `2D` list will generally be homogeneous, meaning the outer list contains only more lists.

``````[
[ ], [ ], [ ]
]
``````

This `2D` list is sufficient to run a TICTACTOE game.

A `3D` list would be comparable, carrying forward the structure.

``````[
[
[ ], [ ], [ ]
],
[
[ ], [ ], [ ]
],
[
[ ], [ ], [ ]
]
]
``````

One can easily see how complex 3D is compared to 2D, the latter of which we MUST master before going to the next level.

3 Likes

If we double the number of elements in the last example we could be playing tictactoe on each side of a die.

What about 4d and 5d and 10d?

Why? Is a 2d list like a grid? How do I make a Tic Tac Toe game? How would I use a 2d list to model the positions?
You have forgotten about these questions:

.

Have you learned Python? What’s the point of moving on unless the answer is, “Yes.”?

2 Likes

Of course, I have.

The point is reasonable, because I want to make not just simple games(Python is good for that but is not fast enough for more advanced games.

.

Look at this post:

.
I would rather do system programming.

What mtf meant by have you learnt Python is do you know it well enough to be able to explain concepts that you’ve learnt to people who don’t know Python? Can you visualise how more advanced concepts you’ve used could be applied to real world scenarios? Can you identify the strengths and weaknesses of Python, to really assess why you want to learn another language?

Yes.

Maybe.