Can I build a game engine entirely in python. I have heard that stuff of performance but I want to build a game engine to build 2D games. Will I be able to do it in python (entirely) ? 🤔🤔

  • 11
    Python ecosystem 101: There is already a module that does what you want 99% of the time.

    Point in case, start with "pygame".

  • 0
    @Demolishun I know about pygame and used it but we can say that what I want to do is a tool with an appealing GUI to ease work of making games in python
  • 0
    @JosiasAurel I have used gui systems with pygame before. I cannot remember the name of the one I used, but it was pretty nice. They do have a gui section at pygame:

  • 0
    @Demolishun thanks anyway
  • 0
    Also, I forgot about panda3d:


    Full game engine with tons of examples.
  • 1
    If you worry about performance you can compile python files with Cython into binary form
  • 0
    Do you want to target phones as well as PCs?

    Qt might be a better option. It has support for Python and C++.
  • 4
    No, because graphics are handled by C/C++ wrappers.

    If you're not splitting hairs on the meaning of "entirely," yes. (Performance can be decent, but don't expect it to be exceptional though.)
  • 1
    You could write the abstraction entirely in Python. But you will have to go native (or choose a native library) at one point to actually draw stuff
  • 1
    That's a huge project. It will take months (or probably years) and a team of full-time developers to create something useful.
  • 0
    Since OP asked if he can, the answer is yes! I don't see why not, it will be a learning experience in many aspects.

    Though if you want it fast and good you should consider using something like pygame or something else that can already handle the graphical elements for you. Simply put, you dont need to use pygame to just make games. You can use it to build a custom tool or engine over it. And if you want to go even lower than that you can try and use PySDL2 which is a wrapper for the C written SDL2 which gives you just that little bit more control but less opengl bullshit and has plenty of docs available too
  • 0
    It's exactly what I have been thinking about. I had set up pygame and pysdl2 to build it. As I commented on another one's comment, what I want to do is build a tool in top of pygame and pysdl2 to ease building of games in python.
Add Comment