I’ve been developing a 3D rendering engine Prism for some time now and would like to solicit some feedback from the community. The engine is functional with some basic defaults so you can quickly replicate the demo.
What this is/is not
A quick note about terminology. I’m officially calling this a 3D rendering engine, and not a game engine because I see more value in creating a solid platform for 3D development. This can be used to create games, but I don’t plan to turn Prism into a full featured game engine with sounds, physics, etc. What I hope will happen is other people in the community will use Prism to build game engines, desktop UI tool-kits, etc. I think so much more can be accomplished long term if Prism focuses on being really good at just rendering 3D so that others can use it’s tools. Ok that wasn’t so quick…
What I’m trying to accomplish with this post
I’d like to find out what people’s initial thoughts/questions/concerns are so I know how to better plan and approach documentation, api design, and features.
And it would be great if I could find some people to help build this into something amazing!
I just made a lot of updates to the engine. I’ve been picking through another 3D game engine tutorial and was able to fix a lot of bugs and add some more features. As a result the example app looks much more interesting.
I’m still not happy with how lighting is working. I’m trying to figure out a good paradigm that’s both flexible and simple.
I’ve decided to go back on my decision to make this “not a game engine” because I’m following tutorials for building a game engine, and it will be so much easier if I stay on that track.
Later, once this is mature enough, I’ll think about splitting it into a generic rendering engine and a game engine.
I tried different OpenGL crystal bindings to do sphere tracing using the GPU, but could not find any stable lib. Which OpenGL bindings do you use for your game engine ?
Just published another version of the engine. You can read about the release here https://github.com/neutrinog/prism/releases/tag/v0.7.0. If you’ve had to wire up shaders to your code before I think you’ll like it. I’ve managed to abstract 99% of the busy work out of the way.
I’m taking a few days off from crystal to clear my head a little before starting on the next task. I was going to work on either using an existing entity-component-system libary or implement one myself. First however, I think I’m going to focus on cleaning up the rendering engine so you can add custom shaders to the renderer without having to hack the core. And add multiple light support back so the example doesn’t look bland.
I avoided the code for a few days to think about how I wanted to implement an entity framework, and I’m pleased with the results. The most recent release now has a slick entity-component-system framework at it’s heart. https://github.com/neutrinog/prism/releases/tag/v0.8.0.
Among other things, this finally opens up the core rendering logic so you can customize everything if you wanted to. It may not be the easiest just yet, but this was a HUGE step towards extensibility.
With that mostly out of the way I’ll be focusing on tidying up the entity framework, and getting back into the visuals.
Just showing off the current rendering performance.
I’m getting 60fps with 1000 randomly generated cubes plus the landscape. Later on things far away or out of view won’t be rendered, which will further improve performance.
Notice the frame rate in the bottom right corner. the gif was recorded at 10fps to keep the file small.
Made some more visual improvements in addition to refactoring a TON of the code. I’m working hard to get the API just right so it’s fun to use and not frustratingly convoluted.
Most recently I’ve been reworking the camera and adding in some built in view modes. The default is first person, and the third person view is almost finished. Here’s a demo of the third person view. It supports zooming onto whatever the camera is attached to, rotating around, and changing the camera tilt.
The new camera controls aren’t released yet. Still need to work out some bugs.
I don’t know anything about 3d engines or anything, but this looks incredible! Nice work. So cool to see the kinds of things people are doing with Crystal
I wasn’t able to get this to work on arch for whatever reason. Seems like sdl3 is having a hard time finding the intel iris driver (I don’t have a dedicated GPU). Still, very well done :)
Published another release. This time I decided to create a video to demo some of the main things. You can see it on YouTube https://youtu.be/22hVTIDaIrM.
I’m thinking of continuing making videos for each release. Sort of like a release blog. I’m hoping it will generate some more feedback, or just be a fun way for people to see what’s new without having to compile something.
Indeed! They are interesting. Looking at the gigs first, and trying it on my computer (a Mac) I thought it was running really slowly. But in the YouTube video you can see it runs smoothly. I tried using the mouse and the usual arrows or wasd keys tyi move the camera but it was still not working well, so maybe I’m doing something wrong.