Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project revamp and movement #104

Open
blankRiot96 opened this issue Sep 6, 2024 · 1 comment
Open

Project revamp and movement #104

blankRiot96 opened this issue Sep 6, 2024 · 1 comment

Comments

@blankRiot96
Copy link
Contributor

blankRiot96 commented Sep 6, 2024

Motivation

This project has been sterile for a while. It still has immense potential imo (seeing as there are still no comprehensive text based pygame tutorials I would point to)

Possible revamping

A lot has changed since this project began, namely:

  • The introduction of a fork (pygame-ce)
  • New python versions
  • The author of the first part of the tutorial series moving OS and hence no longer having the same file structure (me)

I believe this calls for a long overdue revamp of this project. The following would benefit from discussion but here's what I would change:

  • Start by mentioning the existence (with minimal bias) of both pygame and pygame-ce. For all reasonable purposes, I believe we should use pygame-ce for the tutorial and advice the same
  • Move away from trying to make one big project as I was suggesting long before. A platformer is a nice project but it probably isn't a good idea to try and introduce all the new concepts by tying them together in the form of a platformer
  • Rather than a platformer series, split up into separate isolated individual "fundamentals". Those may include:
    • Opening a window
    • Drawing shapes
    • Clock and time management
    • Fundamental idea of surfaces and positioning types (rects, vectors, primitives(tuples, lists))
    • An explanation of the API
    • etc. in an order that must be discussed and changed
  • Maybe after these fundamentals, making smaller projects would be better (cookie clicker, tic tac toe, etc.)

Movement

Moving forward, I believe having a discussion surrounding each topic and then compiling it into an article would be useful. Assembling the thoughts of competent pygamers and then putting it into an article is what sounds best to me

Also, more theoretical pygame concepts regarding tooling and ecosystem could be beneficial to write about. Like using Tiled for tilemaps, what text editors to use, file structure, code architecture, profiling, game jams etc.

NOTE: All of the above needs discussion

@blankRiot96
Copy link
Contributor Author

blankRiot96 commented Sep 6, 2024

Concrete Revamp Suggestion

Note: While any statement may seem absolute, everything said below is up for discussion and change.

Goal

The most important aspect of our project is its goal. To understand it I've posed some questions

  • Q. Why was this project created?
    • A. To teach pygame to newcomers. There aren't currently any comprehensive text based Pygame guides that we can confidently point to.
  • Q. Who do we want to target?
    • A. This isn't a marketing question, but rather what we want to accommodate for when making this site. Do we want to accommodate python beginners? Probably not. While it would be amazing to blindly recommend this site to anybody and state it covers Python as well, so anybody - whether they are a programmer or not - can use it to learn pygame from the ground up - I believe it would be smarter to still suggest the site to such a person but not try to cover Python within the site.
      I believe listing Python resources within the site may be more beneficial to everybody involved, there are quality Python resources out there and there's no reason to replicate them.
  • Q. What would you expect to find in a book that's meant to comprehensively teach pygame?
    • Well I'd want to be able to make stuff after reading such a book - well yes obviously, but I mean independantly. I'd at least want to be able to navigate the pygame API well enough so that I can directly implement a new concept without having a pygame specific example for it. For example: Even if the user has never learned how a camera is implemented in games, and lets assume the book doens't cover it, they should be familiar enough with employing the pygame.Surface API and a positional datatype(rect, vector2, list, tuple etc.) well enough so they can easily implement the scrolling of a surface with respect to an offset (once they know to think of having an offset, which they could learn in whatever manner - browsing the web for camera systems for example)

Structure

Given the idea of the goal from the above section, I believe this would teach a newcomer in the best way possible (in order):

  • What this book is
  • Prerequisites (I also believe including a tiny python quiz to check if you're ready for pygame might be useful to link to, but we should leave it out of the MVP)
  • Pointer to a couple different Python resources. For example, the official tutorial is what I'd recommend to somebody who already knows how to program in another language, whereas I might recommend something like ATBS or Corey Schafer to someone who doesn't
  • What pygame is, what pygame-ce is, installation
  • Opening a window
  • Surfaces and positional datatypes (rects, vector2, lists, tuples etc.) - I believe this would be the most important one of them all. Basically knowing this and some collections you could do anything (which is how dafluffypotato was doing it for a long time).

So the above would be, the absolute basics. I think moving forward teaching absolutely useful higher level concepts would be beneficial. That means pygame theory

These would be my suggestion:

  • Implementing entities. Implementing an individual entity - just an image and a mutating position
  • Implementing a collection for entities. A container for entities, removing and adding entities on queue.

STOP. What about sprites? I dont know. Cant say I use them, or I would ever use them for bigger projects. Frankly I don't believe they offer much at all. But casting all that personal detail aside, I still think its super useful and keeps it way simpler to stick with using a primitive collection like a list to learn to architect a system. Counterpoint: It might be better to teach pygame.Sprite to teach the usage of pygame as the API that it is, but I'm still leaning towards non-pygame.sprite in this section, it will be introduced later on anyways

  • Animating something, storing frames and iterating through them
    • Animation class
    • Combining the entities system just discussed, and animation
  • Loading assets (a simple asset workflow that makes sense)
  • pygame.draw API
  • pygame.Rects and collisions
  • The pygame input API - event.get, key.get_pressed, key.get_just_pressed, mouse.get_pressed etc. (looking at all this as an 'Input API' would have been eye opening in my earlier pygame days)
  • Game states
  • Basic UI - buttons, etc.
  • Core/Main class
  • Basic file structure

And the list goes on. What I've listed are articles that build on top of each other and necessarily cover enough for someone to start pygaming confidently. But I also think the book should cover some more important theoretical and toolkit related pygame concepts, but these need not be part of the "series" and can be separate, isolated articles.
Some I might suggest:

  • Tilemaps, using Tiled, pytmx vs building your own editor. Pros and cons
  • File structure for larger games
  • Code structure for larger games, paradigms and techniques
  • Utilizing OpenGL, the right way and the fluffy way
  • Powerful Text editors out there and their pros and cons. Also covering project workflow (venvs, cli tools, etc.)
  • Profiling your pygame code
  • Debugging your pygame code
  • Creating a helper library or creating a wrapper engine, scrapping parts from older projects to newer ones - maintenance theory

The above are more discussion based, I'd also like a section for more individual technical pygame concepts, such as:

  • Blend flags
  • Colors
  • Fonts
  • set_mode flags
  • pygame.sprite API
  • pygame audio API (mixer)
  • Framerate management

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant