PycraftDev's Avatar

PycraftDev

@pycraftdev.bsky.social

I am the lead developer behind PMMA and Pycraft and here to improve application development in Python, with a bit of art and fun thrown in!

75 Followers  |  32 Following  |  1,617 Posts  |  Joined: 25.11.2023  |  2.2867

Latest posts by pycraftdev.bsky.social on Bluesky

Preview
PycraftDeveloper - Overview I am the developer currently making a 3D game called Pycraft here on GitHub and documenting my progress on Bluesky, Twitter and Threads! - PycraftDeveloper

... You can find PMMA, and our other projects on our GitHub profile here: github.com/PycraftDevel...

We release programming updates 6 days a week so stay tuned!
#buildinpublic #programming #Python #developer #gamedev #softwaredevelopment #SoftwareEngineer

Thanks for reading :D

06.08.2025 22:50 β€” πŸ‘ 8    πŸ” 3    πŸ’¬ 1    πŸ“Œ 0

... Poses for us quite a dilemma.

Which API do we choose?

Well, we believe this PMMA progress update has gone on for long enough, so we will unveil our proposal on Friday, stay tuned!

06.08.2025 22:50 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... To maintain, and we also currently would have no way to test our code as we have no Apple devices.

Alternatively we could look into DirectX, but this is Microsoft exclusive and isn't very portable to other platforms.

As you can see this...

06.08.2025 22:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... The development of the API as we are a very small team only really experienced in OpenGL.

As for other graphics APIs:

Metal is Apple exclusive and so would require Apple exclusive versions of the API which would be very time consuming...

06.08.2025 22:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... And easy to use interface make it stand out.

The natural replacement would be Vulkan - however Vulkan is a much more lower level API, and whilst we continue to consider this option we feel that it has the potential to significantly slow...

06.08.2025 22:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... Make a big shift to other graphics APIs (over an extended period of time).

This for us poses a problem - which API do we select. Whilst we didn't explicitly choose OpenGL over another graphics API initially, it's cross platform support...

06.08.2025 22:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... Platforms in favour of its own graphics API - Metal.

OpenGL has been deprecated on Apple devices for some time now, and it's possible they could remove it at any time.

Our belief is that when MacOS does this, the industry in general will...

06.08.2025 22:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... Since then we have been working on PMMA 5, which reworks a significant chunk of PMMA's Python/Cython API directly into C++ for a significant performance improvement.

We have known for a while that OpenGL is being deprecated on Apple...

06.08.2025 22:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... As it started from the utility programs that made up Pycraft, the open source OpenGL based game we are making in Python.

Since we split Pycraft and PMMA we have continued to use OpenGL in the form of ModernGL up to PMMA version 4.2.2.

...

06.08.2025 22:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Let's start with some history OpenGL was initially released in 1992. It is currently property of the Khronos Group who are the owners of some other well known APIs - Vulkan and OpenCL to name a few.

PMMA has used OpenGL since it's creation...

06.08.2025 22:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

PMMA is an OpenGL based Multi-Media API for Python and C++.

Our use of OpenGL is one of our most significant features - but it's also one of the biggest potential problems.

Today, lets discuss future proofing PMMA!

06.08.2025 22:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
PycraftDeveloper - Overview I am the developer currently making a 3D game called Pycraft here on GitHub and documenting my progress on Bluesky, Twitter and Threads! - PycraftDeveloper

... You can find PMMA, and our other projects on our GitHub profile here: github.com/PycraftDevel...

We release programming updates 6 days a week so stay tuned!
#buildinpublic #programming #Python #developer #gamedev #softwaredevelopment #SoftwareEngineer

Thanks for reading :D

04.08.2025 23:07 β€” πŸ‘ 9    πŸ” 4    πŸ’¬ 1    πŸ“Œ 0

... Also in part to additional optimisations across the C++ component of PMMA's API.

So, whilst I don't want to give too much away just yet until we complete our performance testing (hence the approximation earlier) this is something to watch!...

04.08.2025 23:07 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... My face, and performance testing will be restarted.

This was in preparation for the release of PMMA 5, which we are aiming to be in the mid to late part of this month!

Its very important to point out that some of this performance gain was...

04.08.2025 23:07 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... Made the whole API over 10x faster.

Yeah, think about that for a moment.

PMMA can now render 85 thousand circles at a radius of 2 at 15 FPS. Pygame in the same test manages 1 FPS.

Naturally when I realised this, it put a big smile on...

04.08.2025 23:07 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... All of this combined means that we where slowing down the performance of PMMA without realising it in our builds.

This is slightly frustrating having just completed a lot of performance testing on the API, but also fantastic as it basically...

04.08.2025 23:07 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... Debugging version of a C++ project will include additional information and processes that aid in tracing and diagnosing issues - hence the name.

However, it also prevents some more aggressive optimisations that we thought we where using.

...

04.08.2025 23:07 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... Intending to build release versions of the project for testing and for public use, we where actually building debug builds for some components of the API (but not all of them, for reasons I can't explain).

For anyone that doesn't know, a...

04.08.2025 23:07 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... And it's dependancies and realised something.

We where configuring CMake from the command line, and this configuration wasn't being corrected passed down into the files that do each process.

This means that whilst we where...

04.08.2025 23:07 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... A lot easier for us, as CMake kept trying to do things differently (but doubtless in a way that would have made sense if I had a better understanding of the process).

Anyway, the other day we where optimising the build process for PMMA...

04.08.2025 23:07 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Let's cut immediately to the chase.

PMMA is build using CMake, and it splits the build process into 4 steps, individual files that handle installing dependancies all the way through to PMMA it's self.

This process made making the CMake script...

04.08.2025 23:07 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

We made a big mistake.

Its very embarrassing, but this is one of those rare occasions when a mistake turns out to be hugely beneficial for us.

PMMA may actually be faster than we initially thought. A lot faster.

Let's discuss this today!

04.08.2025 23:07 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
PycraftDeveloper - Overview I am the developer currently making a 3D game called Pycraft here on GitHub and documenting my progress on Bluesky, Twitter and Threads! - PycraftDeveloper

... You can find PMMA, and our other projects on our GitHub profile here: github.com/PycraftDevel...

We release programming updates 6 days a week so stay tuned!
#buildinpublic #programming #Python #developer #gamedev #softwaredevelopment #SoftwareEngineer

Thanks for reading :D

01.08.2025 23:54 β€” πŸ‘ 8    πŸ” 4    πŸ’¬ 1    πŸ“Œ 0

... API around it improves.

So whilst rendering for example in PMMA is as fast as we know we can make it for PMMA 5, we might still be able to improve performance further in later updates!

...

01.08.2025 23:54 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... Ends up being rewarding in the long run.

Because of this extended process, we aim to deliver what we call an "initial optimisation" with the features first debut - then over time explore more exotic and time consuming optimisations as the...

01.08.2025 23:54 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... By yes introducing optimisations, but additional overhead as the API tries to see if these optimisations can apply.

As you can now clearly see, when it comes to optimising PMMA, it can be a delicate operation - but often one that...

01.08.2025 23:54 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... Cut!

Just today we introduced an optimisation to shape rendering that makes rendering faster when changing colours a lot, but slightly slows down rendering elsewhere.

Sometimes it's possible to go too far...

01.08.2025 23:54 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... Of course, I am far too modest to make such a claim, but it serves to get the point across.

Reality is far removed from even from these test applications, and we want to make meaningful optimisations.

But even with this it isn't as clear...

01.08.2025 23:54 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... Our program for everyone.

Yes, we absolutely could cheat and say "our API is the fastest API in the world" and maybe it is in a very very specific situation, but everywhere else it's actually terrible.

...

01.08.2025 23:54 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

... However it this poses us with an interesting problem.

When optimising PMMA, we never try to optimise the API to run faster specifically in those test applications - we instead try to use the data we collect from these tests to optimise...

01.08.2025 23:54 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

@pycraftdev is following 20 prominent accounts