Pyglet is perhaps the BEST Game Engine for Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ส.ค. 2024

ความคิดเห็น • 125

  • @knut-olaihelgesen3608
    @knut-olaihelgesen3608 ปีที่แล้ว +35

    Pygame might require more lines to get a window up and running - but that code is also handling other things, which means they are already partial implementations for future systems

  • @felixfourcolor
    @felixfourcolor 3 หลายเดือนก่อน +6

    Btw if you still want to use pygame, use pygame-ce instead. The lead maintainer of pygame went rogue and a large number of developers migrated to the fork pygame-ce.

  • @shaqalito8740
    @shaqalito8740 ปีที่แล้ว +21

    Very nice video man. You got yourself a new sub. Keep the good content going, it's very very qualitative.

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +1

      That's awesome, I appreciate the feedback and sub. I will keep trying!

  • @anbu7049
    @anbu7049 ปีที่แล้ว +11

    Awesome video! Looking forward to see your channel grow.

  • @camable10
    @camable10 9 หลายเดือนก่อน +4

    I build a simulation model with simpy, as I completed it I wanted to add animation to know what's going on and end up choosing pyglet to process the event files from the simulation to draw in a window showing all elements of the simulation. I think it shows what I wanted to show, I am not sure, I will keep an eye out for better ways of building an animation. Great video.

  • @LifeCodeGame
    @LifeCodeGame ปีที่แล้ว +30

    Great video! Pyglet looks like a great game engine for Python. Thanks for sharing your experience with us!

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +1

      Thank you! I'm really enjoying my time with it

  • @we_all_love_coding_interviews
    @we_all_love_coding_interviews ปีที่แล้ว +6

    I love that video, everything is on point, and it is so pleasing to watch. Thank you for sharing! (The audio seems to be a bit quiet tho)

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +1

      Thank you. I'm still working out how to best normalize my volume for TH-cam! I have it at -9db but maybe that's too low?

  • @UTIII2024
    @UTIII2024 10 หลายเดือนก่อน +5

    Maybe some day a legend will rise like the sun,
    and will create the engine that all python programmers need...
    that legend that is going to create the engine will create a new
    era for all python game developers. I hope that legend comes
    soon...

  • @mrdza96
    @mrdza96 ปีที่แล้ว +4

    Created the classic Tank 1990 game using PyQt5, thought of remaking it at some point with some normal library or framework (since PyQt5 didn't work well for my usecase, but was forced to use it by my professors) and this comes to my YT feed. Looks awesome!

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +1

      Pyglet also has some awesome 3D support as well!

    • @mrdza96
      @mrdza96 ปีที่แล้ว

      Tank 1990 was my favorite game in my childhood and I had so much nostalgia hitting me while I was making it, I gotta do it again but now with something normal. Thanks for the video!

  • @soupnoodles
    @soupnoodles 3 หลายเดือนก่อน +1

    Its a great video in regards to showcasing pyglet's strength, but the reason pygame handles less is so you can handle it the way you want.
    Once you really get into making larger games, building your own implementations are far less frustrating than needing to reach out to the docs everytime

  • @belbaka8711
    @belbaka8711 ปีที่แล้ว +135

    Pygame is more of a framework, godot is an actual engine that supports python like syntax

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +28

      Godot is great! I've got a video looking at GDScript and Godot planned in the pipeline.

    • @roundabout-host
      @roundabout-host 6 หลายเดือนก่อน +5

      It's not python.

    • @fabiolean
      @fabiolean 4 หลายเดือนก่อน +1

      @@roundabout-host He didn't say it was python. He said it supports a python-like syntax, which is true. GDScript's syntax is heavily inspired by python.

    • @roundabout-host
      @roundabout-host 4 หลายเดือนก่อน +1

      @@fabiolean Sure, but syntax is not important, there is no dynamic typing, no human data structures (list, dict, set, tuple), no list comprehesions and so on.

    • @baxstart9008
      @baxstart9008 2 หลายเดือนก่อน

      ​@@roundabout-hostthats exactly what they meant, only syntax wise not language wise, he never claimed it's python.

  • @RenderingUser
    @RenderingUser ปีที่แล้ว +3

    Your nvim config looks clean as Heck

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +4

      Thank you. I have my dotfiles available in GitHub:
      github.com/elliottminns/dotfiles

  • @fuzzy-02
    @fuzzy-02 หลายเดือนก่อน +1

    Would have loved to hear more benchmark stuff like performance or how things work differently under the hood, rather than purely syntactical difference

  • @StarFury2
    @StarFury2 ปีที่แล้ว +18

    For me Pyglet is technically just far too superior to Pygame. Built-in open GL calls, antialiasing, camera with infinite zoom, expanding viewport screen resizing, batch rendering and overall much less stuttering are some things you can do with Pyglet but not with Pygame out of the box.
    Pyglet is more difficult to learn though, with it's absence of main loop and weird way of handling events.
    But Python Arcade is a great expansion for Pyglet bringing some convenient missig features like sprite collisions and even full physics (based on pymunk).

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +2

      I agree! Arcade looks really interesting, and certainly helps out the areas you mentioned!

    • @w花b
      @w花b ปีที่แล้ว +1

      The only problem is the smaller community. That's one of the reasons I gave up on raylib in C because I could not find a fix for the issues I had.

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +2

      @@w花b The smaller community is certainly a drawback, however, it does look like it's getting closer to pygame, going by Github numbers.

  • @MudZeePlayGamer
    @MudZeePlayGamer ปีที่แล้ว +5

    Pyglet seems similar to Lua's Love2D framework, and seeing how much easier this seems than..pygames...stupid..confusing syntax of surfaces and all that, might try this out next time i go back to python coding

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +1

      I find Pyglet so much easier to comprehend for game development!

  • @shayes.x
    @shayes.x ปีที่แล้ว +2

    Pyglet is a breath of fresh air for someone who has mostly only used Pygame

  • @lotusnightcore4766
    @lotusnightcore4766 ปีที่แล้ว +1

    Me having ton of work to do for my thesis also need to find a job.
    Also me getting excited to make a game after watching your video

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +1

      I know exactly how you feel!

  • @tonywtyt
    @tonywtyt ปีที่แล้ว +3

    I only heard about pyglet, and it always seems to take a back seat to pygame. I'm thinking that this might be because pygame came first. It also seems like pygame is more functional, rather than object oriented, making it easier for some new programmers. Pygame is a bit clunky, in that it your don't work with a "Sprite", but must load an image, then get its rect, and then manipulate that rect. Pygame can also get messy because you don't set events, but have to manually implement your own checks and manaully create the logic for handling the event. It looks like pyglet maybe hides the event loop and you only assign event handler methods. This is cleaner, but may be more complicate if there are side effects between the order events are called and side affects of interactions between handlers. I started or lengthy course for pygame, but you really got me look at pyglet.

    • @onddu2254
      @onddu2254 3 หลายเดือนก่อน

      Exactly why I like pygame. Not having that manual control over everything just doesn't feel right.

  • @nomoremuda
    @nomoremuda ปีที่แล้ว +5

    i'd like to see how you would manage deploying games made from pyglet, maybe a future vid?

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +1

      This is a great idea. I did some looking into this and there's some nice tools to help with deployment.

  • @Dilithium1
    @Dilithium1 7 หลายเดือนก่อน +1

    what about ursina? i think its great for anything beyond just 2 dimensions, and has an update function, great ways to handle input, spatial audio, and more

  • @naturep1x3ls
    @naturep1x3ls 8 หลายเดือนก่อน +4

    pygame and pyglet are NOT game engines nor frameworks. You can make your own engine/framework for them, but still, they arent. Both are graphics libraries. Ursina, for example is a game engine for python.

  • @seamuskills
    @seamuskills 8 หลายเดือนก่อน +1

    pygames surface system (from its sdl origins) are why I use it mainly. I can do a lot of cool rendering things with it.

    • @h4rrym00
      @h4rrym00 4 หลายเดือนก่อน

      such as?

    • @seamuskills
      @seamuskills 4 หลายเดือนก่อน

      @@h4rrym00 I made a test game based on splatoon but from a top down perspective. Because of the surface system, I was able to store the ink as a surface and draw to it with the regular functions without having to worry about offscreen pixels not being saved or retrieving the data after it was overwritten by something drawing over it. This allowed the system to have pixel accurate ink without too much performance cost that looked nice. All I did was write to a surface, then draw that surface to the screen before the entities. I can also assign certain things to a surface in order to perform actions on just those drawn objects such as tinting the color of all things drawn to it or only making it visible on certain conditions.

  • @ahmedhassannaveed5561
    @ahmedhassannaveed5561 ปีที่แล้ว +3

    what about arcade? it is built upon pyglet it also provides collisions and physics with pymunk + other cool stuff

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว

      That sounds pretty awesome. I'll take a look at it! Thank you for the suggestion.

  • @suyashgupta1180
    @suyashgupta1180 ปีที่แล้ว

    Great video! Subscribed

  • @TagetesAlkesta
    @TagetesAlkesta 11 หลายเดือนก่อน

    Kind of reminds me of the Blitz2D engine I learned in high school lol

  • @stro3277
    @stro3277 7 หลายเดือนก่อน +1

    Is it possible to full recreate pokemon firered in python?

  • @xoxogamewolf7585
    @xoxogamewolf7585 8 หลายเดือนก่อน

    0:48 hol up, what dose semicolons doin down in that on_draw method?

  • @craftyryte
    @craftyryte 15 วันที่ผ่านมา

    whats the theme ur using?

  • @matscalia
    @matscalia ปีที่แล้ว

    Totally unrelated: your titlebars look perfect. Which desktop environment do you use on Arch? And with which modifications?

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว

      On that video, I was using gnome with Catppuccin theme!

    • @matscalia
      @matscalia ปีที่แล้ว

      Thanks!

  • @onddu2254
    @onddu2254 3 หลายเดือนก่อน

    What I like about pygamme is how "manual" it is. That's why I can't stand something like tkinter, it's so unintuitive having some automatic main loop. I like being able to see the main loop exactly as it is. I would hate to have just a "app.run()" to run the main loop. I want to see how it handles events, draws background, updates objects on screen, draws those objects, flips the screen and limits fps. If I can't see those, it feels way too unintuitive.

  • @tunaan80
    @tunaan80 24 วันที่ผ่านมา

    Python Arcade is sad for not having his name mentioned anywhere haha (İ use Pygame btw)

  • @user-co1dw3lx7t
    @user-co1dw3lx7t 9 หลายเดือนก่อน

    cool video)

  • @googlebingyahoo
    @googlebingyahoo ปีที่แล้ว

    nice content!

  • @notagamer8782
    @notagamer8782 8 หลายเดือนก่อน +1

    Honestly is very similar to pygame. Pygame can do all this

  • @noaheben555
    @noaheben555 ปีที่แล้ว +1

    Great video! Consider me persuaded and subscribed!

  • @pie19988
    @pie19988 ปีที่แล้ว

    I am new too the whole programming thing...I am trying to make a text based game that has Background images...can pyglet do that?

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว

      Pyglet absolutely can do that

  • @smanzoli
    @smanzoli ปีที่แล้ว

    Code at 0:40 is not fair, we also only need 5 lines to get a screen running in Pygame lol
    I like both, pretty similar in many ways.

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว

      I'd love to see a shorter version! I think pygame zero is a lot better as well.

    • @smanzoli
      @smanzoli ปีที่แล้ว

      @@dreamsofcode sure, Pygame Zero can really do that with a WORKING window lol
      Regular Pygame can bring a window with 3 lines, but it will not answer for closing it and you'll have to close window using OS:
      import pygame
      pygame.init()
      window = pygame.display.set_mode((800, 600))
      done lol😄
      And thanks for the video btw

  • @xhenryx14
    @xhenryx14 ปีที่แล้ว

    yeah! pyglet!

  • @minetomek
    @minetomek ปีที่แล้ว +1

    How did you make so pretty windows?

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว

      My terminal windows? I'm glad you think they look good! I use alacritty with the Catpuccin theme!

    • @minetomek
      @minetomek ปีที่แล้ว

      @@dreamsofcode Thanks for quick response and help.

  • @AnthyLoneExoria
    @AnthyLoneExoria 9 วันที่ผ่านมา

    If you are considering Pygame, please for your sanity use Pygame CE. It's way more supported, with a lot more developers behind it. Whatever you go with, use what works for you and stick to it!!

  • @blankRiot96
    @blankRiot96 ปีที่แล้ว +1

    I liked the video

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว

      Thank you! I'm glad you enjoyed it

  • @BRLN1
    @BRLN1 6 หลายเดือนก่อน

    after consideration ... pygame is still is the "best" (i.e. beginner friendly, 2D) game engine for python.
    Pyglet adds convience where it is not needed.
    If I seek for convinience and want to avoid boilerplate code, then I better go for Unreal, Godot or Unity (ya know ... the grown ups).
    Pygame instead provides a thin layer of abstraction and interfacing to the SDL libraries.
    Hence pygame teaches you a lot about image manipulation (which pyglet automatizes away).
    Furthermore pygame provides more control over the main-game-loop which i prefer over pyglet's approach.

  • @christopherwiseman1267
    @christopherwiseman1267 2 หลายเดือนก่อน

    In addition pyglet has access to opengl allowed 3d game development

  • @askmo99
    @askmo99 ปีที่แล้ว

    where do you write the code ? is there an IDE ? where is the software if not ?

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +1

      I write code using vim as a personal preference, but I'm sure pycharm can work just fine as well!

    • @askmo99
      @askmo99 ปีที่แล้ว

      @@dreamsofcode i teach engineering and make youtube tutorials .... i've been trying to improve my stuff lately .... and by far i think this is what i need
      ❤❤❤❤

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว

      Awesome! Glad I could help.

    • @TimelessGamingSoftware
      @TimelessGamingSoftware 3 หลายเดือนก่อน

      dont use pychar use visual studio or sublime text

  • @lhsebi10
    @lhsebi10 6 หลายเดือนก่อน

    thx for bringing pyglet to my atention, looks much easier than pygame or cocos2d :)

  • @boxhead-zk7sn
    @boxhead-zk7sn 9 หลายเดือนก่อน

    what about pygame with GPU

  • @Toothpaste_Guy
    @Toothpaste_Guy 9 หลายเดือนก่อน

    can you publish a game to steam if i was to make something on this engine?

    • @ttrev007
      @ttrev007 6 หลายเดือนก่อน

      i think a TH-camr named DaFluffyPotato has published on Steam using Pygame engine so i don't see why their would be a problem with pyglet

    • @Toothpaste_Guy
      @Toothpaste_Guy 6 หลายเดือนก่อน

      @@ttrev007 Thanks!

  • @BlazeTheCatMan
    @BlazeTheCatMan 6 หลายเดือนก่อน

    this looks very cool i tried to mess with pygame but its very buggy for me and its hard and confusing mess for me. plus pygame does not have 3D and ive been looking for a 3D game making module for python which i came across pyopengl but i never could get ti to work and plus i am ditching pygame for this one!

  • @gamingwithlucas2862
    @gamingwithlucas2862 ปีที่แล้ว

    what editor do you use?

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว

      I use neovim, with the NVChad base configuration.

  • @revimfadli4666
    @revimfadli4666 ปีที่แล้ว

    Is pyglet to python like processing to Java?

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +1

      Yes! Very similar, except more focused around game development and multimedia.

  • @gamalielgerona2391
    @gamalielgerona2391 2 หลายเดือนก่อน

    Bro just betrayed Pygame, my favorite game engine. But I think I should give Pyglet a try too cause it sounds very cool. +1 sub and +1 like

  • @Isusia
    @Isusia ปีที่แล้ว

    What about multiplayer mode?

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +1

      I've got a video planned about adding game networking. Going to use pyglet for the base of that one!

  • @arbitervildred8999
    @arbitervildred8999 ปีที่แล้ว

    He is like "I want to make a game in pyglet! - oh there are no tutorials"
    *goes on youtube*: pyglet is the best engine to make games in python
    _now we wait_

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว

      Haha! Theres one in the planning stages. Next video is going to be another brief intro one, but the one after will be pyglet related.

  • @TrueMayo1
    @TrueMayo1 ปีที่แล้ว

    could you make a tutorial on pyglet plz :D

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +1

      Absolutely! I'm planning on making a game with it in the coming weeks and will make sure I turn it into a tutorial. I also want to do some more advanced game concepts with it as well.

    • @TrueMayo1
      @TrueMayo1 ปีที่แล้ว

      @@dreamsofcode thank you :D

  • @axolotron1298
    @axolotron1298 ปีที่แล้ว

    Every time I see a video about Python game engines I feel like I should have started my Python engine as a 2d engine instead of focusing on 3d.
    I would have gotten further into its development and perhaps it could be worth using it and developing it, instead of what it is now 😑

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว

      Is your engine available anywhere? I'd love to take a look!

  • @SuperPuperCode
    @SuperPuperCode 11 หลายเดือนก่อน

    Pygame-CE best!?

  • @user-rp8ov5zy4c
    @user-rp8ov5zy4c วันที่ผ่านมา

    I personally think Pygame is trash... I've only ever seen maybe 1 good game made using Pygame and it was unfinished... I'm going to try to check this out and see if it's any better but I really don't think I will ever find anything to compare to Unity other than Unreal and Unreals spec requirements for me at this moment in time is what's truly Unreal.

  • @ArachnidAbby
    @ArachnidAbby ปีที่แล้ว

    I will now pronounce pygame as "pig-aim"

  • @livingmybestlife8410
    @livingmybestlife8410 ปีที่แล้ว

    I'm new and I say "Piglet" LOL

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว +1

      I am with you. Piglet feels more natural!

  • @programaconscratchd2903
    @programaconscratchd2903 ปีที่แล้ว

    amongus😂

  • @Montegasppa
    @Montegasppa ปีที่แล้ว

    I’d programmed in both frameworks, and Pyglet has always been way superior to PyGames. PyGames is too hype.

  • @5minutemovies977
    @5minutemovies977 7 หลายเดือนก่อน

    There's no interface and you do absolutely everything by code? No thanks, I'm too noob for that.

    • @Naburgondux
      @Naburgondux 7 หลายเดือนก่อน

      You will eventualy need to code,but you can start without it in some some progam like scratch,even Game-Maker has support for no-code,but in this GUI progaming,you have limited options,and you will need to do a certain thing that doesnt have in the progam,but its a great way to start!

    • @5minutemovies977
      @5minutemovies977 7 หลายเดือนก่อน

      @@Naburgondux I'm not afraid of coding, but I like with Godot is that you have a UI

  • @energy-tunes
    @energy-tunes ปีที่แล้ว

    Does it support z layer,simple square sprite collision and sprite opacity

    • @dreamsofcode
      @dreamsofcode  ปีที่แล้ว

      Z layer can be done using OrderedGroups with batching. (I did a quick example with the health bar).
      Collision detection still needs to be manually built, I'm afraid. But you can use Pymunk for some more advanced collisions and physics.
      Opacity is supported!

  • @energy-tunes
    @energy-tunes ปีที่แล้ว

    Three minutes into the video and I'm sold, already ten times better than pygames annoying boilerplate annoying and sprite rotation