Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Faster Rendering Ideas

  1. #11

    Re: Faster Rendering Ideas

    700 polygons per object is maybe too much for big amounts on screen. It is also possible to make extra-low poly models or like mentioned before, simple sprites for objects in distance.

    How are you going to handle 10000 ships combat in multiplayer? In event like that rendering is only like 10-30% of processing power (Curious because i'm making very similar game myself)

    How many players should be able to attend same time with their armies?

  2. #12

    Re: Faster Rendering Ideas

    Quote Originally Posted by Orgun109uk
    I prefer using lists over arrays, especially when it will constantly be updated (adding and deleting), just makes things a little more simpler. Although if using TList is slower in Lazarus than arrays, i will need to look more into dynamic arrays.
    Imagine i would have a list of 10000 particles and particle #500 goes old for kill. What happens in TList i don't know but common behavior includes moving all 9499 list items 1 step backwards. Now, imagine these particles would be constantly spawned and killed, it would put whole cpu power in that loop, being very very slow.

    What i like is control in my own hands. You only need to move index #(N-1) in position of removed item. (It may be possible to do this manually with TList too but then wouldn't it be just the same using dynamic array?)

    Dynamic arrays tend to be slow process to increase/reduce capacity so should only be done in bigger packs, like every 1000 units or more.

  3. #13

    Re: Faster Rendering Ideas

    Hi User137,

    Quote Originally Posted by User137
    700 polygons per object is maybe too much for big amounts on screen. It is also possible to make extra-low poly models or like mentioned before, simple sprites for objects in distance.
    The 700 polygons was just for the model i was testing with. The models im planning of using vary on what they are. The structures shouldn't be that big, maybe 50-100 max. The units however are different, some are around 500 and go up to around 3000.

    I have swapped my original test model (700 polygons) for another one (3076 polygons) and there is not a huge difference in the FPS while rendering 10,000.

    Im only loading the model once, and storing it in the GFX cards memory, then im using the mesh instance class to render it with glDrawElements.

    Quote Originally Posted by User137
    How are you going to handle 10000 ships combat in multiplayer? In event like that rendering is only like 10-30% of processing power
    Im limiting down the amount of calculations that need to be done; for example, i have it so that i only calculate the bounding box once (when the model is loaded) and then any updates on the position are done using pointers.

    The main problem i can see will be the network updates, which im looking into using threads for.

    On a side note, im also looking into the possibility of placing the majority of the math functions into separate threads.

    Quote Originally Posted by User137
    (Curious because i'm making very similar game myself)
    Cool, hows yours going?

    Quote Originally Posted by User137
    How many players should be able to attend same time with their armies?
    This will all depend on many things, im hoping for at least 30. But we shall see when i get to that stage.

    Quote Originally Posted by User137
    Imagine i would have a list of 10000 particles and particle #500 goes old for kill. What happens in TList i don't know but common behavior includes moving all 9499 list items 1 step backwards. Now, imagine these particles would be constantly spawned and killed, it would put whole cpu power in that loop, being very very slow.

    What i like is control in my own hands. You only need to move index #(N-1) in position of removed item. (It may be possible to do this manually with TList too but then wouldn't it be just the same using dynamic array?)
    Im doing something similar when an object is destroy. When an object is to be removed, it is done like:

    [pascal]
    value := List[500];
    List[500] := List[list.Count - 1];
    List[list.Count - 1] := Nil;
    FreeAndNil(value);
    [/pascal]

  4. #14

    Re: Faster Rendering Ideas

    Quote Originally Posted by Orgun109uk
    Cool, hows yours going?
    It's this project:
    http://www.pascalgamedevelopment.com...p?topic=5597.0
    But slowly now sry... been playing afwul lots of World of Warcraft.

    Quote Originally Posted by Orgun109uk
    Im only loading the model once, and storing it in the GFX cards memory, then im using the mesh instance class to render it with glDrawElements.
    I rendered most objects in displaylist aswell using glDrawElements but without vbo's.

    Quote Originally Posted by Orgun109uk
    To explain the project a bit better, its kinda like an Online RTS (Online Command and Conquer), you can build your own army to "take over the galaxy" or join a clan and create an even bigger army (which is why i am aiming for such i high number of objects).
    I guess projects end up in their technical limits eventually but this sounds like it'd need a supercomputer to run.. i mean, galaxy even if it's not made into scale of Spore but Master of Orion like, tens of stars with 0-5 planets means quite alot units to hold on for server. Sending tight battles across planets to even 8 players same time would be comparable to a upload and download of a full length movie.

    There is theory i've tried to explain in my project thread but to me it seems like the only way to handle the masses in network.

    And to not offtopic too much in "graphics related post", you may want to create another topic about the project too

  5. #15

    Re: Faster Rendering Ideas

    Octree is good for static objects. For dynamic a spatial grid is better.
    With such a big number of objects visible it's may be a good idea to use imposters.

    P.S. It's good that OpenGL allows to make 5K render calls per frame without slowdown. DirectX doesn't.

  6. #16

    Re: Faster Rendering Ideas

    Quote Originally Posted by User137
    But slowly now sry... been playing afwul lots of World of Warcraft.
    Ahh yes, the WoW bug .

    Quote Originally Posted by User137
    I guess projects end up in their technical limits eventually but this sounds like it'd need a supercomputer to run.. i mean, galaxy even if it's not made into scale of Spore but Master of Orion like, tens of stars with 0-5 planets means quite alot units to hold on for server. Sending tight battles across planets to even 8 players same time would be comparable to a upload and download of a full length movie.

    There is theory i've tried to explain in my project thread but to me it seems like the only way to handle the masses in network.
    Yeah i have thought about this a lot, and have a few ideas i'm going to try out. But we shall see when i get to that point.

    Quote Originally Posted by User137
    And to not offtopic too much in "graphics related post", you may want to create another topic about the project too
    Yep, i shall do very soon.
    Not that i have managed to speed things up, thanks to everyone, i will have some screenshots, then i will post it (it doesn't look like much at the moment).

    Quote Originally Posted by Mirage
    Octree is good for static objects. For dynamic a spatial grid is better.
    With such a big number of objects visible it's may be a good idea to use imposters.
    Thanks for the input, i shall look more into those options.

  7. #17

    Re: Faster Rendering Ideas

    Just to keep an update, i have managed to speed up the TList overhead a little by directly accessing the dynamic array (TList.List) and by using the TList.Sort to sort objects by the frustum and the distance from the camera.

  8. #18

    Re: Faster Rendering Ideas

    I'm a little rusty, but to look at this from a general perspective.

    If you are creating and killing stuff like there is no tomorrow, from the perspective of a list or array of some sort, why not just have a static array that exceeds what you need and zero out one when it becomes available and use it when you need it.

    I know it requires some more processing on the side to deal with this, but surely it beats resizing the poor thing a billion times per second.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •