Get access to Vaegrant's source code (+shaders) and maybe pay for my lunch? 😳 www.patreon.com/dafluffypotato Also, there’s a mistake at 4:20. I may have been talking to someone in Discord at the time and not noticed that I highlighted an unrelated section of code from a file that wasn’t even the associated shader. lol The base shader functionality is open source though: github.com/DaFluffyPotato/pygame-shaderlib
@leonstansfield2 жыл бұрын
I am constantly amazed at your work... just knowing the background footage was made with pygame is amazing
@ShotgunLlama2 жыл бұрын
I ran a test once comparing pygame's software blit vs opengl rendering a quad to draw many copies of an image to the screen with random sizes and positions. With any large number of images to draw, opengl was 1-2 orders of magnitude faster than the standard blit function even when each instance of the image was a separate vertex array. I'm using opengl for the pygame project I'm currently working, but I'm using the moderngl wrappings instead of PyOpenGL
@undeadpresident Жыл бұрын
So I suppose it takes more work to get all the images rendered and placed correctly, but then you get much better performance and can use shaders without it running super slow?
@HammerHeadGameStudio7 ай бұрын
I enjoy periodically coming back to your videos. Every time I see one pop up on my feed, I think, what's Da Fluffy Potato been up to in Pygame now, and im always impressed by how much content you will have released in the meantime to binge.
@Jay1001 Жыл бұрын
I would like to personally thank you for uploading your code for this. I know you have a more up to date video using modernGL, and that this code probably isn't for everyone, but honestly this code was exactly what I needed. I have an existing pygame game and was looking to add a few openGL features to it but wanted precise control over the integration of GL and was having a HELL of a time getting ANYTHING to run, and I literally was frustrated in a way I had never been before. Then I came across this video, downloaded your code, and after a little tweaking got it to run and was finally able to start playing around with and testing everything. I got a shader programmed up for my needs and I don't know if I ever would've made it this far without you. Thanks, thanks, thanks. You da man :)
@giabaonguyenvan32792 жыл бұрын
I can feel how happy you are because of the update.
@bmorr2 жыл бұрын
I spent a few weeks in the fall of 21 trying to implement shaders in pygame for a fireworks sandbox, and I thought I reached a dead end cus I really didn’t want to rewrite the whole program to use OpenGL rendering. I was only doing this as a month long project and the time constraint meant it wasn’t worth it to switch to OpenGL. I will have to implement this bypass into my code and then I can finally make my fireworks have proper bloom in real-time!!!
@Rotten.Cheddar9 ай бұрын
Since I'm Supposed To Learn C++, I Won't Learn Pygame Anymore, But You Fill Me With So Much Inspiration, Thx So Much!!!
@Skeffles2 жыл бұрын
Great video. I wasn't aware of any pygame games that use this so it's cool to know it's possible.
@iamtheprarieking71372 жыл бұрын
I was wondering if you have a public version of the current engine you've made? Love your videos!
@illusealrr1006 Жыл бұрын
Thanks for the video. I have my own game engine written with c++/SDL2.0. With the game mostly finished, I decide that I want to use a bloom shader. I guess that what I need to do is just convert the SDL texture for main screen to opengl like you do.
@Willerhide2 жыл бұрын
@Smelly Frog used an OpenGL texture to add Steam Overlay to his pygame game. Honestly worth checking out if you ever wanted to add it to your own games at some point.
@DaFluffyPotato2 жыл бұрын
I saw that. The steam overlay only works with OpenGL, so you kind of have to do that for it to work.
@lodybaguette24872 жыл бұрын
Hey , for your dialog system , I think if you calculate before how words will appear avoid words warped at the end line , anyways good job bro
@Avaxar2 жыл бұрын
How about using ModernGL? Wouldn't it be a more friendly library (Basically a pythonic wrapper for OpenGL) than raw direct PyOpenGL, which directly ports every function there is from C's OpenGL?
@DaFluffyPotato2 жыл бұрын
Blubberquark was recommending that. That's not what I did because I wasn't aware of it at the time, but that would probably be easier.
@zsirothehero4330 Жыл бұрын
Hi DafluffyPotato. Your work is wonderful no doubt about that :) I just want to ask if you have a tutorial on how to make sprite I'm really bad at drawing or even designing. If you have a suggestion on where should I start. That would be greatly appreciated. Again, thanks for the work you've done!!
@DaFluffyPotato Жыл бұрын
kzbin.info/www/bejne/apS8cp5-m81sra8
@Questionable_Insights2 жыл бұрын
You're making me want to try Pygame finally lol
@zicraftian2 жыл бұрын
Dude you are a big inspiration for me when it comes to learning python
@petthepotat2 жыл бұрын
your huge brain never ceases to amazes. Keep up the great work Mr potato master >:D
@ech0_exe2432 жыл бұрын
just… WOW! It’s soooo amazing
@AngelGonzalez-vp2en2 жыл бұрын
You could use this lighting thing for fire particles but it's probably super slow. It's based off your particles video, removing during iteration video, and lighting in pygame video: import pygame import sys import random from pygame.locals import * pygame.init() Clock = pygame.time.Clock() Screen = pygame.display.set_mode((800, 700)) pygame.display.set_caption("Base") particles = [] particle_colors = [(127, 63, 15), (127, 63, 31), (127, 63, 0)] click = False def glow(radius, color): glow_surf = pygame.Surface((radius * 2, radius * 2)) pygame.draw.circle(glow_surf, color, (radius, radius), radius) glow_surf.set_colorkey((0, 0, 0)) return glow_surf while True: Screen.fill((0, 0, 0)) mx, my = pygame.mouse.get_pos() if click: particles.append([[mx, my], [random.randint(3, 10) / 5, random.randint(6, 15) / 3], random.randint(6, 12), random.choice(particle_colors)]) for i, particle in sorted(enumerate(particles), reverse=True): particle[0][0] += particle[1][0] particle[0][1] -= particle[1][1] particle[0][1] += 1 particle[2] -= 0.1 if particle[2] 9: color = (255, 255, 255) elif particle[2] > 6: color = (224, 112, 61) elif particle[2] > 3: color = (112, 61, 30) else: color = (56, 23, 11) # pygame.draw.circle(Screen, color, (int(particle[0][0]), int(particle[0][1])), int(particle[2])) #will look ugly with this radius = int(particle[2]) * 2 Screen.blit(glow(radius, (particle[3])), (int(particle[0][0]), int(particle[0][1])), special_flags=BLEND_RGB_ADD) for i in range(3): copy = Screen.copy() copy.set_colorkey((0, 0, 0)) copy.set_alpha(127) Screen.blit(copy, (i * 2, i * 2)) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() if event.type == KEYDOWN: if event.key == K_q: pygame.quit() sys.exit() if event.type == MOUSEBUTTONDOWN: if event.button == 1: click = True if event.type == MOUSEBUTTONUP: if event.button == 1: click = False pygame.display.update() Clock.tick(60)
@AngelGonzalez-yy8dh2 жыл бұрын
Good video
@FollowNdFeel2 жыл бұрын
Your game is looking incredible. So…. I’m on episode 2 of the devlog so this might not work for you… catching up. Have buffs in the game that make you really strong but are unusable. Pair those with debuffs to make it usable. I.e. +100% run speed(making you zip back and forth on the screen) and then get something that does more dmg but slows you down.
@joshbarros1995 Жыл бұрын
This is incredible! Can you create a Quake Clone with OpenGL that renders oficial Quake BSP maps and TrenchBroom maps?
@DaFluffyPotato Жыл бұрын
Theoretically, yes.
@dclxviclan Жыл бұрын
Cool style, i love this
@CloudlessStudio2 жыл бұрын
I’ve been using both for simple 3D renders
@RoRaresGaming2 жыл бұрын
Can u make a video about saving/loading ?
@boxhead-zk7sn6 ай бұрын
great video love what your doing, i have a question what does the ftexcoords stand for in 4:18 cause i try to copy the CRT tv style in my game, it will help if you told me
@DaFluffyPotato6 ай бұрын
UVs
@boxhead-zk7sn6 ай бұрын
@@DaFluffyPotato thanks and pls also the myconstant value
@ghostsakai44422 жыл бұрын
Live your work dude
@t3st3d2 жыл бұрын
This is very impressive
@itsmemattagain98412 жыл бұрын
You reckon it would be possible to make a 2d tile game online with a decent performance in python?
@leobozkir54252 жыл бұрын
Could you make a video on how to convert a pygame surface to an opengl texture and render that to the opengl display? If not no problem, but I think other people might be interested into that as well perhaps. And as a side note, how did you learn all this? Through documentation or any other online sources?
@undeadpresident Жыл бұрын
Everyone I've seen do it uses the pygame.image.tostring() function (which is slow af) then glTexImage2D function and I think it may not feasible unless you have low-res graphics or create all the textures ahead of time and do all the graphics through opengl and not try to mix the two.
@dclxviclan2 жыл бұрын
Super, awe$ome
@pccoder95472 жыл бұрын
I use c++/sdl2 for mini projects and unity for big games
@riyamandal76672 жыл бұрын
Can u pls make a tutorial on this topic?
@bobdillon1138 Жыл бұрын
Why would you dig a hole with a teaspoon.
@fada92386 ай бұрын
Dude, the game in the background is PyGame...? If so, I would like to ask: how to make such exact collisions? All my attempts to do at least something that we see in game engines have not been successful, it just doesn't work correctly and with terrible errors...
@DaFluffyPotato6 ай бұрын
I have multiple tutorials on that
@electricimpulsetoprogramming2 жыл бұрын
Is programming hard? I feel very dumb trying to learn it.
@noobintheinternet2 жыл бұрын
Hello Fluffy! Please make new video.
@rudyfaile2 жыл бұрын
the best way to learn is by teaching :)
@DaFluffyPotato2 жыл бұрын
Yes, but putting questionable content out there isn’t good for the people trying to learn from it.
@rudyfaile2 жыл бұрын
@@DaFluffyPotato yeah I'm not suggesting you publish guesswork, but as you're refining your tutorial I'm sure you'd master the concepts
@nj00862 жыл бұрын
yayy
@spenceabeen2 жыл бұрын
Gonk :o
@SophiaWoessner Жыл бұрын
you could always make your own library wait you already did that
@304nokia2 жыл бұрын
I'm suggesting to try Ebitengine. It very similar to SDL2 but with fragment shader support out of the box. Also Python is too bad for multi-platform development.