[Demo]True 3D on Pokitto

update!

With the newly revealed overclocking this library has actually become pretty usable! Fullscreen or almost fullscreen renders can reach above 20 FPS sometimes, while smaller models on the screen reach even some 50 FPS. I can now imagine a complete 3D game made with this.

Binaries have been updated. Test yourself!


original post

Here is my small public domain software renderer (kind of OpenGL for small computers), small3dlib. For testing I’ve created a few demos and ported them to Pokitto among other platforms.

As I’ve expected from before I’ve even started the project – being able to compare to my raycasting experimens – this kind of true 3D is pretty resource demanding and the usability is limited (in this sense, my raycastlib is much more practically usable). This means you can’t simply go creating full 3D games and expect high FPS (I’ve reached something between 10 and 20 with full-3D views, the level and city demos) – you can comfortably use this to make your ordinary games extra shiny by adding small 3D GUI elements, a 3D game logo at the start screen, prerendering sprites and backgrounds etc. With smaller rendered models I’ve gotten to well above 30 FPS (modelviewer demo, when you zoom out a bit). With some extra cleverness and optimization, maybe even improving the library, I think there is still room to achieve something greater – I’ll leave this to you, my hackers :slight_smile:

You should find all the details in the README and the source code, I tried to document everything pretty well. Don’t forget to compile with -O3!

I’d be very glad if you kept the spirit and shared your derivative creations as free and open source as well, but it is not a requirement. The library is public domain, free of any restrictions.

Here are the sources:

Here are the bins:
city.bin (71.9 KB)
city_overclock.bin (83.4 KB)
level.bin (56.9 KB)
level_overclock.bin (69.1 KB)
modelviewer.bin (77.7 KB)
modelviewer_overclock.bin (88.8 KB)

18 Likes

Amazing work!

4 Likes

Wow.
That is all :grin:

3 Likes

Truly awesome! Such a gift! Thanks @drummyfish

3 Likes

This is amazing! I’m hoping I’ll have time to try this out because I’ve had a 3D game idea I have wanted to try out for ages now.

5 Likes

very impressive :open_mouth:

Awesome! The last gif looks like GTA :smiley: :smiley:

Nice. Looks really good!

Thanks everyone, the demos aren’t too polished, but I felt like already sharing it at this stage. I may be working on it further, this is something I am having a real fun doing.

1 Like

this tech deserves to be used for games!
Does the fps improves with no textures?

I can see either an atmospheric exploration game, like this:

Or a turn based game to go along with the low fps.

2 Likes

Just not applying a texture should speed it up a little bit by saving time on the texture sampling.

If you can do without any textures at all, you can turn S3L_FLAT on, which hugely rises FPS, because it doesn’t interpolate any values whatsoever over the triangles. However, then there is no per-pixel depth either, which means you mostly have to sort triangles, which can create some artifacts because sorting can never be done perfectly, so you need to craft the scene so that it doesn’t show much.

I think I have a version of one of the demos that showcase this flat mode somewhere, I’ll try to post it later today.

Also, there is one thing that I think could improve the FPS overall, but I won’t go into details now, need to test it out etc. I’ll need to rewrite one function completely, which may take time because I’ll be at work now, but I’ll let you know soon. Stay tuned.

That kind of atmospheric games is something I’ve been envisioning too… maybe some puzzle game like the witness?

https://hooktube.com/watch?v=URjb3RBIe7c

3 Likes

Spot on! you get close to a panel and once there maybe it switches to a 2d puzzle mini game.

4 Likes

Guys, thanks to overclocking this is now running so smoothly I think you can make regular 3D games :slight_smile: No Crysis of course, but e.g. the city demo is pretty smooth now, check out the updated bins.

7 Likes