It has been a busy time for me recently due to a project that was expected to push certain limits, though mainly in the area of 3D game development with SGScript. I was making a game.
Total development time for the game - two weeks. Some more time had to be spent on technology upgrades. The result is, of course, a very solid experience, which you can try yourself on a Windows PC.
There are some issues with gameplay and visual communication with the player in the game itself, I’m fully aware of those and a plan has been prepared, should I wish to push the project further.
Though I am still slightly amazed that it actually worked. I’ve had a few close calls, all of which were successfully bypassed, and the related bugs have been fixed to prevent it from happening again. Had I not known the technology before, the project would be impossible to make. It isn’t anymore.
- To make it work on a mid-level laptop, there had to be some serious optimizations, such as software occlusion culling, due to a lack of time to make things completely right (with lightmapping). Having dynamic lighting all over the place, as well as bloom and distortion effects doesn’t help at all with a laptop. They can’t stand overdraw and I initially had quite a bit of it.
- Model exporter code broke tangent vectors on just some surfaces, effectively disabling normal mapping on them. Bug was found and fixed, and players of the game can enjoy the delicious textured roughness on most surfaces.
- The version of Bullet I used is actually shipped with a bug! Managed to find and fix it in time. It reversed the normal vector of intersection on certain sloped intersections, effectively pushing bodies through triangles at some places. It was a horrible, serious, game breaking bug that had effectively reduced my options on certain projects more than one time already. I simply had to find it, and I was in huge luck that someone had done it before me.
- There is a spotlight culling bug that wasn’t fixed in the first demo version and I’m not sure that it is in this one but it’s rarely visible and it’s fixed in SS3D now. Basically, all spotlights had convex hulls generated with origin taken from the first spotlight only. Screen-space AABB overhead helped the bug to stay hidden, from me as well as others.
- Game math library needed a huge upgrade with 3×3 matrices and quaternions.
- There were some bugs in sgs-bullet resource handling, type ID system and before this game, it didn’t have support for convex hull shapes. I also found out that it was way too easy to create a memory leak by referencing self through entity in userData of a rigid body and hard to actually find out that this is the problem.
The result is that I now have a great 3D engine that continues to improve and is expected to be used on yet another game-changing project soon. It doesn’t support character animation quite yet but is partially equipped to handle that already, the work should be finished whenever I have time for that. Same goes for lightmapping and environment mapping and the level editor.
New TODO items:
- make “object island” finder or API for it (it would locate and dump/return interlocked object sets that can’t be accessed from anywhere in SGScript). For manual, one-time GC work.
New plans: Multiplayer games! Not sure how far I’ll get with this but it’s worth a try since I’m interested in trying to make it work once again (have tried several times before with big gaps in between, it’s hard to get it working, let alone get it done right!).