3D Performance - How much polygons are possible?

Previous topic - Next topic

Zethael

Hey there,
i'm new to this forum and this is my first topic. I bought GLBasic on Steam yesterday and want to ask this:
How much polygons, triangles or quads are possible with a framerate of 30/60? I need to know that because i used Blender a lot. Would be nice to know how much GlBasic can handle. The first thing i will do in 3D is a space game, which contains much different spaceships and planets. After that, when i'm going to master GLBasic i want to do an RPG, 2D and/or 3D. I learned C++ a bit, so i have a complex standard of learning programming ;)
Would be nice to know that, thanks in advance...
Greetings
Zethael (Alex)

erico

Hello Zethael, welcome!

That is a bit of a difficult question because it will depend on your hardware and things like resolution and whatnot.
Let´s see if one of our friends here, specially the ones who use 3d more, can shed some light.

If I was on your shoes, this is what I would do:
-create a simple project on, let´s say, full hd resolution.
-add objects with a counted polygon till it slows down.
This would give me a certain measure, but your game logic may also slow things down, so I would work with some 1/4 reduction on the total.

Anyways, lets hear what others have to say. I´m interested on the subject but on a little different front. I´d like to know how many characters with a certain complex AI I can hold in a real time simulation. Like a real time rogue like with 50k live entities. This is also a hard question as it depends on the processor and the AI coded, but with the approach above I can sure get some base numbers.

Zethael


dreamerman

This is rather question what are boundaries for loaded objects/in-engine entities like object/polygon count and so on. As GLBasic overhead shouldn't be high as in some other tools, a true limiting factor will be gpu, yet as GLB uses old OpenGL we don't have those benefits from newer API's, but still this should be enough. Simplest solution would be same as erico already mentioned, make small project put many objects to it and You will see results. But remember that modern AAA games and tools like Unity/Unreal engine are using many optimizations to reach 30/60fps target. So depending on what You want to achieve there may be need to implement some basic optimizations like LOD for objects...

Erico thats another good question, as GLBasic is single-threaded (maybe something may be changed thanks to new compiler?) so probably this will be limiting factor. But it also depends how AI will be written, check for example 10 entities per frame, their current task, status, find new path and so on... it would be nice to have such playground, even in 2d, and another way to show power of GLB :-)
Check my source code editor for GLBasic - link Update: 20.04.2020

Moru

Threads used to be possible in GLBasic. Does it not work any more?

http://www.glbasic.com/forum/index.php?topic=3642.msg26493#msg26493

The attachment seems to be missing from that post though. I might be able to dig out my copy of it somewhere but not sure it's the same version.

Edit: Found something that seems to be the right file but haven't tried it, attached below. It was made for GLBasic 5 according to the project header.

SnooPI

Unreal Engine is very optimized (two decades later and all versions) but Unity Engine not really (or poorly optimized).
GLBasic's engine is simple and can therefore be easily used on multiple platforms, but it is also optimized. For example, it uses a frustum culling optimization.
But as Dreamerman said, the "Level Of Detail" is particularly lacking (although it's not too difficult to do it yourself with code, but your code may not be cross-platform anymore).

In fact, GLBasic's greatest strength (in addition to being cross-platform) lies in its INLINE function and its ability to use external DLLs.

dreamerman

Ah, hm, not sure if I saw that library earlier, but no working download for it, and it doesn't appear in more complex tutorial/code, not sure about it's status, does it work with latest GLB?
Something like this would be great, for example to put pathfinding module on separate thread. Will need to look into this later.

Thing about big game engines, or rather final games (as i don't know how many of those tricks are implemented directly in engine) they have many optimizations, and more over, specially now on consoles they are using some tricks, dynamic resolution is basic stuff now, but other most used tricks in mobile gaming (Switch/iPhone games) are skipping frame animations for distant objects, drawing them as sprites not as real 3d objects, enabling shadows only for closer objects and so on..

My advise would be to make some prototype with basic LOD for objects, specially in space based games when some objects are in great distance there is no need to render for example planet as 10k polygon sphere.. It would be really nice to see something like this here on forum ;-)

ps. thanks Moru, will check this, still GLBasic 5 sounds little old :D
Check my source code editor for GLBasic - link Update: 20.04.2020

Slydog

Try the following project which emulates a Minecraft style world:
(This is from 2013 so it may not work out-of-the-box with the latest GLBasic.)

http://www.glbasic.com/forum/index.php?topic=9499.msg82334#msg82334

You can change the world size (x, y, z) to test the limits of GLBasic.

I don't think it has a poly count indicator, but should be easily added if needed.
A global variable incremented in the AddQuad function should do it.
(It's a shame this wasn't turned into a game.  Hey, the code is freely available to anyone to modify and create something real.)
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]