Some simple coding techniques to push C# as fast as possible (1 Viewer)

A

Anonymous

Guest
Exactly.

That may be the only point in the entire MP project which needs optimizing.
 

Mars Warrior

Portal Pro
August 26, 2004
158
2
Airy Crater, Mars
Home Country
frodo said:
if you profile MP (with nprof or ants) you'll see that
90% of all cpu power used goes in guifont.cs
in the method drawtext
In my opinion its better to optimize this then to
randomly optimize some code which may take up 0.00001 % cpu
Now you did it. Now 100 programmers concentrate on that single method to optimize MP, day in day out they look at those code lines :p

To stirr things up. By optimizing the fontVertices calculations my fps count went from 160 to 166, nearly 4%!!!!! And I only just started :twisted: :twisted:
 

Frodo

Retired Team Member
  • Premium Supporter
  • April 22, 2004
    1,518
    121
    53
    The Netherlands
    Home Country
    Netherlands Netherlands
    well to solve our performance problems we should batch all direct3d actions
    so that when a frame needs to be rendererd, mp just draws 1 mesh
    todo this we need to batch together all textures & fonts
    So in short
    - instead of having 1 vertex buffer per object, we need to have 1 big vertex buffer
    - instead of calling DrawPrimitive() for every object we need to put them all in 1 mesh and just draw that one
    - minimize any other direct3d calls (state/render changes)
    - check which functions are supported by the card and don't use non-supported functions

    frodo
     

    Users who are viewing this thread

    Top Bottom