Although I know just enough to be dangerous, I am working on a 3d game project. One of my issues is that part of the game involves movement throughout an open world which is being based off of a 900x900 array map that I am importing with edits from the previous episode. Because for the outdoor area the view is expansive, I am currently only getting about 20-30fps without any of the rest of the game 'guts' even operating yet and only maybe half of my model diversity in place. This frightens me a bit so I have been focusing on trying to improve this. The base terrain on the outdoor world is being built from textured 'unit cube models' (1.0x1.0x1.0) and some (slightly) more complex objects (like large rocks, grasses, a variety of trees, etc.) are being placed upon the terrain. For dungeons, I plan to have the ability to stack 6-10 levels of such terrain (think Minecraft) but for the outdoors I have already resolved that this can likely only be 2 (base terrain and 'top-layer' objects) as the horizon is occluded in dungeons while outdoors I am currently drawing much less than I desire resulting in tall objects 'popping' suddenly into view on the horizon. I am willing to live with this for now but still would like to be able to render further into the distance. Currently, my loop runs 2height x 35depth x 40width sending models based on the view direction. Here are my thoughts and would love any comments/suggestions:
1. I am currently rendering far to near because it allows me to place transparent water. This is probably a big hit and I am willing to live without transparent water if need be.
2. My textures are not currently all powers of 2; I am definitely working to revise the textures in use to powers of 2. Not sure what the impact will be on fps.
3. I did several 'tests' to try to see if my bottleneck is CPU or GPU and it seems that it is GPU related.
4. My loop currently sends quite a few objects that are not in the view left/right or behind. This is currently needed for my turning routine to look acceptable. I'm not sure if sending these draws is a hit. If so, I can try to revise this.
5. Much of my 'cube terrain' textures could probably be moved to an atlas. I'm not sure how to do this. I know that there is a raylib example but I have not tried to dissect it yet.
There are some pictures of what I am trying to accomplish here: https://oklabsoft.itch.io/vermys
So there you have it. Would love some guidance on best place to focus if anyone has an opinion. Thanks!