Hi. I compiled the fps_game example after a clean. The exe file does run, but the frame rate is only slighly over 1 FPS. My computer is an old Windows 10 machine but it runs DirectX9 games and other games I have bought from GOG with no problem. For example, there is no problem running Delta Force. Please explain how I can make a FPS game for Windows 10 and achieve an acceptable frame rate. My graphics hardware is Intel(R) Q45/Q43 Express Chipset (Microsoft Corporation -WDDM 1.1).
Get the latest graphic drivers available for your card + win10. I had problem like this with old drivers on one computer.
Good suggestion. I will see if Intel has the necessary driver, although their forum says it no longer updated drivers for my chipset. Maybe that forum post is wrong. But my question really is why I can run other old GOG 3D FPS games with good frame rate, but not fps_game. I think the games that run well are all linked to DirectX 9. Which graphics lib is fps_game using?
DirectX is windows specific. CGE is open-gl based which is cross-platform. Your card/driver probably has poor support for opengl. They may not update drivers any more… but you still maybe can get newer drivers than you have.
OK, I understand. Perhaps if my upcoming 2D game for Windows is successful I will buy a brand new PC. I think the downside will be Windows 11. I like Linux and I would develop for Linux too but the market is still too small.
Hello!
-
Your graphic card is indeed rather old – this page from Intel tells that the “product is discontinued” and latest drivers are from 2012 for Windows XP.
Since you say it runs on Windows 10, then the drivers are correct (Intel or Microsoft must have updated them to Windows 10, which still has security support), but even if you upgrade → it will likely remain rather slow, as the hardware is from <= 2012. And Intel GPUs in general are low-end (NVidia or AMD Radeon are better).
-
That said, we do support even old GPUs like yours with Castle Game Engine! So, read on
Yes you can make games run fast on older machines with our engine – just our example “examples/fps_game” is admittedly not made for this. We have a TODO ticket about this: Optimize fps_game example performance (e.g. bake non-dynamic lights) and loading time (e.g. load vertex buffers from glTF directly) · Issue #444 · castle-engine/castle-engine · GitHub .
The reason why the “examples/fps_game” example is slow is because we use a lot of light sources there, and they are all dynamic. We also use physical based lighting model, which is more realistic but a bit slower.
To make your own game run faster on older machines, you should:
2.1. Use less light sources and/or bake light sources. The information how to use lights baking in Blender is on Blender | Creating Game Data | Castle Game Engine . We don’t support this operation in Castle Game Engine automatically (unlike e.g. Unreal which has this built-in) so you need to use Blender (or other 3D authoring software) for this and export to Castle Game Engine a model with already baked lighting.
If this sounds complicated, then simply limit your lighting usage, or even use vertex colors.
Baking lights is exactly what games is previous “era” have been using. So you will effectively use a similar technique as older games that you mention work fine for you.
2.2. Also, switch from physical-based lighting model to Phong lighting model. How to do this depends on your models, but usually (and this is the case for our examples/fps_game) if you use glTF format (which we recommend, see glTF (model format) | Creating Game Data | Castle Game Engine ) all you need to do is set the global boolean
GltfForcePhongMaterials
fromCastleLoadGltf
unit totrue
.Do this early – e.g. in the
AppplicationInitialize
in the unitGameInitialize
, if you follow the typical “New Game” project template created by the editor.2.3. As a brute-force solution (that makes 2.2 completely unnecessary and makes 2.1 less necessary) you can also do
TGLFeatures.RequestCapabilities := rcForceFixedFunction;
This is somewhat brute-force solution, it makes a few things uglier, but it makes sense if you really want to target low-old GPUs. You can test it even with “examples/fps_game”. You can add the line
TGLFeatures.RequestCapabilities := rcForceFixedFunction;
to theAppplicationInitialize
or you can choose in CGE editor menu item “Run → Run Parameters → Force Ancient Rendering” and run the game. You will see the game looks worse – but is also much faster. See the Optimize fps_game example performance (e.g. bake non-dynamic lights) and loading time (e.g. load vertex buffers from glTF directly) · Issue #444 · castle-engine/castle-engine · GitHub for mode details, I gave there a similar answer with a screenshot
I shall add this information to the README visible on castle-engine/examples/fps_game at master · castle-engine/castle-engine · GitHub too.
P.S. As a more general answer “how to make things run fast” we have a dedicated (and long now ) manual page about optimization: Optimization and profiling | Manual | Castle Game Engine . If you’re interested in making games for lower-end machines, it’s worth reading.
Let me know if this helps
Thanks. I will definitely check it out later. Right now though I need to finish a 2D game project to get things started. When I get some more money I will buy a new Windows 11 PC.