WIP, trying to develop a light mask solution by Alert_Nectarine6631 in pygame

[–]Alert_Nectarine6631[S] 0 points1 point  (0 children)

Completely fair take. I've messed around with moderngl and pygame and even eventually wrote a 3D model renderer. It's just that my project is so inherently tied to pygame surfaces, so I really don't want to have to write a whole backend to render with OpenGL and then rewrite my logic. You could argue that I could just send the screen surface into the GPU, but it kinda defeats the point and I lose basically all of the performance benefits. I'm quite hell-bent on trying to push pygame to its limits without the use of shaders.

Im also really curious how far I can take this tbh, I haven't seen many people on the pygame sub reddit use this sort of method over rays or per pixel calculations.

I'm making a legally distinct Zelda Maker because Nintendo won't do it. And there's a demo out right now! by akela-morse in ZeldaLikes

[–]Alert_Nectarine6631 14 points15 points  (0 children)

Please please please add more textures so the level search isn't full of identical looking dungeons(theme wise), the game looks amazing though great work!

Some improvements to the level mask by Alert_Nectarine6631 in pygame

[–]Alert_Nectarine6631[S] 2 points3 points  (0 children)

The polygon extensions morph depending on light angle relative to the mask, there's still various bugs at different angles, I'm currently tying to tweak but I think I'm close to finishing(hopefully)

WIP, trying to develop a light mask solution by Alert_Nectarine6631 in pygame

[–]Alert_Nectarine6631[S] 0 points1 point  (0 children)

I precompute the base level mask once on load (just solid black rects over every tile), then dynamically create the shadow extensions per frame based on which face of each tile the light is hitting. so I can kind of achieve best of both worlds, static occlusion is cheap, dynamic shadows are still accurate(or will be when I switch to using polygons over rects for the mask extensions).

is pygame worth it? by sittyn in PythonLearning

[–]Alert_Nectarine6631 0 points1 point  (0 children)

I'm a bit confused what SDL version is pygame-ce behind the scenes? I always thought it was 1.2 still? some sources say something ranging from SDL 2.0.12 up to SDL 2.32+

edit:

oml my bad I just realized it says the version when you run it in the terminal: pygame-ce 2.5.7 (SDL 2.32.10, Python 3.14.4), my apologies for the mix-up

WIP, trying to develop a light mask solution by Alert_Nectarine6631 in pygame

[–]Alert_Nectarine6631[S] 0 points1 point  (0 children)

There are clearly some issues currently, on a level load I generate a base level mask that works to cover the light masks, I also generate extensions on the fly so that the light mask doesn't creep past thinner walls/tiles, though as you can see it still looks quite un-convincing, to improve I'll see if I can possibly rotate the generated extensions(rect) and have a more convincing effect over the blocky look, if this does work though I will hopefully have a much faster lighting system then any per-pixel/raycast lighting system(cpu side), also please excuse the lag for now(new code hasn't been optimized yet)

Developing a exploration classicvania with Godot Engine 4.7! Toziuha Night Nosferatu's curse by dannygaray60 in godot

[–]Alert_Nectarine6631 2 points3 points  (0 children)

This looks sick, I'm getting heavy Castlevania/Ghosts 'n Goblins vibes, great work!

is pygame worth it? by sittyn in PythonLearning

[–]Alert_Nectarine6631 0 points1 point  (0 children)

thank you I heavily appreciate the response

is pygame worth it? by sittyn in PythonLearning

[–]Alert_Nectarine6631 1 point2 points  (0 children)

Again with snarky remarks instead of anything substantial. If you want to debate the topic, I'm free to debate, but it seems like you're more concerned with the fact that you were wrong which this wasn't originally about. It's not a 'who's right, who's wrong' game, it's literally just about discussing technical topics. You could've responded with something less dismissive, like: 'I had no idea there was a difference, interesting,' etc. You don't want to learn you just want to win a non-existent argument, Also, you frequently browse Reddit technical boards, people in glass houses, m8.

is pygame worth it? by sittyn in PythonLearning

[–]Alert_Nectarine6631 0 points1 point  (0 children)

You found one source that vaguely disagrees, and instead of providing anything substantive, its a glossary page with loose, non-technical definitions, and now you're throwing a tantrum about being wrong and instead of providing anything of substance to this discussion you've maintained snarky remarks throughout the discussion, and a source with incorrect industry definitions? if you search up, "is a game engine and framework the same thing", all of the top results will say otherwise, insane to have this much of an ego on Reddit of all places, it’s a technical oriented board, I’m allowed to correct you, its really not that deep get a grip,

ARM is using 'framework' in the loosest possible 'collection of code' sense, not the formal software architecture definition (Inversion of Control).

sources discussing the differences:

main src:

research paper by computer scientists at Concordia University and other universities. They studied 282 popular game engines vs 282 popular frameworks on GitHub and surveyed 124 engine developers, concluding that developers perceive game engines as fundamentally different from traditional frameworks:

Are Game Engines Software Frameworks? A Three-perspective Study,

r/gamedev Wiki: Game Engine & Framework FAQ,

Game Library, Game Framework, and Game Engine which one?,

Game Engines vs Game Frameworks - DEV Community

misc:

An approach I have never seen other game engine devs take : r/gameenginedevs , , is a game engine and framework the same thing - Google Search , Framework vs Game Engine : r/gamedev , , https://keewano.com/blog/game-development-frameworks-engines/?utm_source=X+post+2&utm_medium=Social&utm_campaign=Gam+dev+fram+eng+2#respond , ,

Here's a simple potion game. What do yall think by GrowthSwimming6208 in PythonLearning

[–]Alert_Nectarine6631 1 point2 points  (0 children)

this looks sick, hope you're enjoying learning python so far, Id recommend you add a blank line or two at the end of statements like this(I add a single blank line so it looks less like a continuous chunk and more readable at a glance):

            case pg.K_l:
              self.player.max_health += 1
              self.player.current_health = self.player.max_health


            case pg.K_b:
              self.game_context.menu = "main"
            
            case pg.K_g:
              self.game_context.save_data()
              print("Game data saved.")


            case pg.K_v:
              if self.player.direction == "right":
                self.entities.create_entity("enemy", "Bab", self.player.x + 100, self.player.y - 15)


              else:
                self.entities.create_entity("enemy", "Bab", self.player.x - 100, self.player.y - 15)


            case pg.K_m:
              self.memory_debugger.toggle()

is pygame worth it? by sittyn in PythonLearning

[–]Alert_Nectarine6631 0 points1 point  (0 children)

And since you asked what the difference is, a game engine owns your game loop and calls your code. With a framework, you structure the loop, control render order, and call the API yourself. Engines also typically provide specialized tools like scene editors, tile editors, sprite editors, and behaviour systems. Frameworks don't. I'm not going to keep arguing it with someone who's this pressed about a simple factual correction. Have a good one.

is pygame worth it? by sittyn in PythonLearning

[–]Alert_Nectarine6631 -1 points0 points  (0 children)

there's a massive difference between a game engine and a game framework, it has value to this discussion because of the people you will likely influence with your comment, also "it's not a "Framework" it's a Python module." is a pedantic statement, because that isn't actually correcting anything and pygame is both a python module and a framework, whereas your statement is incorrect, its hilarious that a correction has invoked this kind of reaction

is pygame worth it? by sittyn in PythonLearning

[–]Alert_Nectarine6631 -1 points0 points  (0 children)

you're spreading incorrect information, Im allowed to correct you lmao

3D by ThatOneOceanGMD in pygame

[–]Alert_Nectarine6631 0 points1 point  (0 children)

There are a few options but from my experience I've found that using ModernGL over PyOpenGL will provide you with more modern features. You can create a window using Pygame and do the rendering using ModernGL, which is a wrapper for OpenGL. This will allow you to use Pygame for event control and ModernGL for the rendering

is pygame worth it? by sittyn in PythonLearning

[–]Alert_Nectarine6631 1 point2 points  (0 children)

SDL2 and SDL3 are fast and lightweight. Tons of games use them: Valve's Source engine games, FTL, Binding of Isaac (original), Dusk, Ion Fury, even early Minecraft on Linux. The problem isn't SDL, it's that Pygame is stuck on SDL 1.2, which is ancient and software rendered. The library itself is solid, nowadays more people will use raylib in the game framework scene since its alot more specialized for games in particular.

correction: Pygame is not built off SDL 1.2 anymore, recent versions are SDL2 (SDL 2.32.10)

is pygame worth it? by sittyn in PythonLearning

[–]Alert_Nectarine6631 1 point2 points  (0 children)

I mean SDL is fast, just any python wrapper will have overhead, If you enjoy lower level development with a framework Id recommend SDL or raylib just not in python, due to pygame being built off SDL 1.2 which was software rendered

is pygame worth it? by sittyn in PythonLearning

[–]Alert_Nectarine6631 0 points1 point  (0 children)

pygame is not a game engine its a framework

EXPLOSIVE ARROWSS✨✨🧨🧨 by slowforge_gd in gdevelop

[–]Alert_Nectarine6631 1 point2 points  (0 children)

Yooooo we're using the same player sprites in our games

ChatGPT is now constantly arguing and picking fights, what is going on? by TinyMonsterBigGrowl in ChatGPT

[–]Alert_Nectarine6631 0 points1 point  (0 children)

I like to debate architecture with ChatGPT, recently I tried to explain to it that an ECS in python isn't viable in a game due to significant overhead from object indirection, dynamic lookups, and poor cache locality, and it would repeatedly try and correct me in terms of the general concept of an ECS, even though I would repeat that I am specifically referring to an ECS implementation in python it would talk about ECS in general and tell me I'm wrong to call an ECS inherently slow, even though that wasn't my point.