Sign in to follow this  
shawk08033

OpenGL Making an optimized 3d mmo in open gl c++

Recommended Posts

shawk08033    96

I currently starting to make a mmorpg in c++ using opengl. How could I optimized it to run the best it can on integrated graphics but also take full advantage of top of line graphics card like a GTX 660 or higher.Would it been done directly in the way I code opengl or would it been done by changing the quality of the texture images?? 

Share this post


Link to post
Share on other sites
mhagain    13430

Drop OpenGL and port it to D3D9.

 

Seriously.

 

OpenGL on integrated graphics is getting better for sure, but it's still not in the same league as D3D for robustness of driver quality and all-round general predictable behaviour.  D3D will give you (and - importantly - your players) a much more stable, solid experience and with less driver weirdness to have to deal with on integrateds, you'll be able to access features that are just not available with their OpenGL drivers (such as high-level shaders), and you'll be able to target machines with OEM drivers that don't include OpenGL support.  D3D9 in particular will enable you to hit even older Intel GMA class graphics with a reasonably full feature set.

 

On the other hand, and being a little more serious, I'd suggest that you're spreading your target hardware too wide.  You're talking several generations of hardware and at least an order of magnitude difference in performance, and you want to get the best possible out of it all.  Even with the best will in the world that's just not going to happen; nobody does that, not even major game studios with huge budgets.  So scale down your ambitions and pick a more realistic and achievable goal instead.

Edited by mhagain

Share this post


Link to post
Share on other sites
Shawn Myers    443

No, DirectX is Windows only. That said, it sounds like you may be a beginner of sorts. Perhaps you should aim for a smaller scale project to get an understanding of the graphics API before you target something as large as an MMORPG?

Share this post


Link to post
Share on other sites
shawk08033    96

I don't consider myself a beginner, I have over 3 years of c++, c# and game programming behind me but I have not programmed a game with optimized graphics.

Share this post


Link to post
Share on other sites
mhagain    13430

OK, but I still think you're taking on too much here.  Let's recap.

 

You want this to be portable, and presumably as well as Windows and Mac you're also looking at Linux.

You want it to take full advantage of modern/high-end graphics cards.

You also want it to run as well as possible on low ends and integrateds (which are also going to include those integrateds with OEM drivers I mentioned).

 

You're just not going to be able to do this, full stop.  It's neither a realistic nor an achievable goal.  Yes, it's nice to be all inclusive, but one person dosn't have time or resources to do it.

Share this post


Link to post
Share on other sites
AgentC    2352

I have seen good OpenGL performance and compatibility in the newest Intel integrated GPUs, like HD Graphics 3000 and co. These will eg. be able to do deferred rendering without problems and with reasonable performance. Anything older than that (for example GMA 3000/4000, not HD) will be problematic and works much better with D3D. Note I'm only talking of Windows drivers here, have not tested Intel cards on Linux or Mac.

 

To scale performance consists of many things, in addition to texture resolution you can eg.

- reduce complexity of shading equations

- leave out "decoration" objects on low-end systems, as well as particle effects

- have object LODs with fewer triangles

- disable dynamic shadows, or render them with lower resolution

- disable or scale down post processing effects

 

Basically, everything you usually see in games' graphics settings menus.

Share this post


Link to post
Share on other sites
wintertime    4108

This question is like putting the cart before the horse. If you dont have a game you dont need to worry about optimizing it.

I would worry much more about how to actually undertake such a huge project as an MMORPG that needs a large amount of content. Maybe you would be better off doing something less demanding?

Share this post


Link to post
Share on other sites
alvaro    21246

I don't consider myself a beginner, I have over 3 years of c++, c# and game programming behind me but I have not programmed a game with optimized graphics.

Oh, I see! You are a big boy now! smile.png

MMORPGs require large budgets (tens of millions of dollars is probably the right order of magnitude) and involve hiring lots of people. The details of how to optimize the graphics are something you can ask one the experienced graphics programmers you will need to hire.

I know some people don't like analogies, but this is a bit like wanting to make a movie like Avatar and asking about some technical aspect, like motion capture. While motion capture was important for this movie, what you should be thinking about if you want to make a movie like Avatar is that you need a movie studio and a lot of money. Or you could make some low-budget indie film instead (clicky), or you could get a job in someone else's project so that you can learn how the business works. Edited by Álvaro

Share this post


Link to post
Share on other sites
Megahertz    286

Do you need tens of millions of dollars in assets and hire a ton of people to make a MMORPG? No..

 

Every time somebody says they want to make an MMORPG, it always gets assumed that they are trying to create something bigger and better than World of Warcraft, or whatever happens to be the most popular MMO at the time.

 

Even if that was the goal, how do you solicit funding without some sort of proof of concept or technology demo?

 

It's entirely possible for one person to create a framework that would allow for the basic operation of a MMO type game.

Share this post


Link to post
Share on other sites
alvaro    21246
It looks like Megahertz and I have different ideas of what a MMORPG is. "MM" stands for "massively multiplayer", which already implies a level of infrastructure that a single person cannot accomplish.

What's an example of a MMORPG built by a single person?

EDIT: From the Wikipedia page on MMORPGs:

The cost of developing a competitive commercial MMORPG title often exceeded $10 million by 2003. These projects require multiple disciplines within game design and development such as 3D modeling, 2D art, animation, user interfaces, client/server engineering, database architecture, and network infrastructure.

Edited by Álvaro

Share this post


Link to post
Share on other sites
slicer4ever    6760

shawk08033, on 04 Apr 2013 - 19:09, said:
I currently starting to make a mmorpg in c++ using opengl. How could I optimized it to run the best it can on integrated graphics but also take full advantage of top of line graphics card like a GTX 660 or higher.Would it been done directly in the way I code opengl or would it been done by changing the quality of the texture images??

To answer your question, most games provide different models with different levels of details. and provide simplier shaders for hardware that can't do all the fancy stuff that modern hardware can do.

It's all about providing different rendering paths depending on some pre-set variables that the user can change(most commonly these settings are things like high quality models, high quality shaders(that do more lightning calculations, or post-processing effects), quality of textures, etc.) basically you provide several different rendering modes, and the user can select the one that is most playable for them.


However, i'd heed the warnings of the above commentors, MMO's are a pain in the ass to make by yourself. perhaps don't consider building an MMO, but instead a small multiplayer game is more manageable, and doesn't need heavy duty dedicated public servers.

Share this post


Link to post
Share on other sites
mhagain    13430

Do you need tens of millions of dollars in assets and hire a ton of people to make a MMORPG? No..

 

Every time somebody says they want to make an MMORPG, it always gets assumed that they are trying to create something bigger and better than World of Warcraft, or whatever happens to be the most popular MMO at the time.

 

Even if that was the goal, how do you solicit funding without some sort of proof of concept or technology demo?

 

It's entirely possible for one person to create a framework that would allow for the basic operation of a MMO type game.

 

Well based on the OP:

 

run the best it can on integrated graphics but also take full advantage of top of line graphics card

 

Even if we leave out the gameplay elements, building highly scalable netcode, hiring out server farms to host it, having extremely high bandwidth, etc - even if we ignore all those factors, this element on it's own is far too ambitious.

Share this post


Link to post
Share on other sites
SimonForsman    7642

It looks like Megahertz and I have different ideas of what a MMORPG is. "MM" stands for "massively multiplayer", which already implies a level of infrastructure that a single person cannot accomplish.

What's an example of a MMORPG built by a single person?

EDIT: From the Wikipedia page on MMORPGs:

The cost of developing a competitive commercial MMORPG title often exceeded $10 million by 2003. These projects require multiple disciplines within game design and development such as 3D modeling, 2D art, animation, user interfaces, client/server engineering, database architecture, and network infrastructure.


Allthough there are MMOs developed by single developers or 2-3 man teams.

The only requirement to really qualify as an MMO is that the game supports a massive number of players playing together at the same time in a single game world, if you get rid of things such as realtime gameplay, content variation, etc it becomes quite doable even for a single person and hosting costs doesn't necessarily have to be that high. (a MMO where updates are sent/revieved once or twice per minute is still an MMO, and such infrequent updates pretty much eliminates the need for a complex server/network architecture. (If you have more players than a single server can handle at those rates you can just launch more game instances, rather than try to fit more players per instance)

Ofcourse, "Optimized 3D MMO" sort of suggest that the OP is trying to take on games like WoW head on. Edited by SimonForsman

Share this post


Link to post
Share on other sites
shawk08033    96

I have been told about how hard mmo are but right I am just trying to make a demo because I have a friend who owns a marketing firm whos interested in the game. Right now i am just creating simple code structure so I can show off the concept.  

Share this post


Link to post
Share on other sites
Steve_Segreto    2080

shawk08033 - one thing that could be done to keep performance high across many generations of hardware is to have different art assets with less polygons, smaller textures and less intensive pixel shading requirements. If you also had a "high-res" version of these assets, players with more modern graphics hardware could use that.

Share this post


Link to post
Share on other sites
rouncer    294

You definitely need to start with a really good mmorpg maker, either that, or make one instead, without the best tools youll never finish it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Similar Content

    • By Kjell Andersson
      I'm trying to get some legacy OpenGL code to run with a shader pipeline,
      The legacy code uses glVertexPointer(), glColorPointer(), glNormalPointer() and glTexCoordPointer() to supply the vertex information.
      I know that it should be using setVertexAttribPointer() etc to clearly define the layout but that is not an option right now since the legacy code can't be modified to that extent.
      I've got a version 330 vertex shader to somewhat work:
      #version 330 uniform mat4 osg_ModelViewProjectionMatrix; uniform mat4 osg_ModelViewMatrix; layout(location = 0) in vec4 Vertex; layout(location = 2) in vec4 Normal; // Velocity layout(location = 3) in vec3 TexCoord; // TODO: is this the right layout location? out VertexData { vec4 color; vec3 velocity; float size; } VertexOut; void main(void) { vec4 p0 = Vertex; vec4 p1 = Vertex + vec4(Normal.x, Normal.y, Normal.z, 0.0f); vec3 velocity = (osg_ModelViewProjectionMatrix * p1 - osg_ModelViewProjectionMatrix * p0).xyz; VertexOut.velocity = velocity; VertexOut.size = TexCoord.y; gl_Position = osg_ModelViewMatrix * Vertex; } What works is the Vertex and Normal information that the legacy C++ OpenGL code seem to provide in layout location 0 and 2. This is fine.
      What I'm not getting to work is the TexCoord information that is supplied by a glTexCoordPointer() call in C++.
      Question:
      What layout location is the old standard pipeline using for glTexCoordPointer()? Or is this undefined?
       
      Side note: I'm trying to get an OpenSceneGraph 3.4.0 particle system to use custom vertex, geometry and fragment shaders for rendering the particles.
    • By markshaw001
      Hi i am new to this forum  i wanted to ask for help from all of you i want to generate real time terrain using a 32 bit heightmap i am good at c++ and have started learning Opengl as i am very interested in making landscapes in opengl i have looked around the internet for help about this topic but i am not getting the hang of the concepts and what they are doing can some here suggests me some good resources for making terrain engine please for example like tutorials,books etc so that i can understand the whole concept of terrain generation.
       
    • By KarimIO
      Hey guys. I'm trying to get my application to work on my Nvidia GTX 970 desktop. It currently works on my Intel HD 3000 laptop, but on the desktop, every bind textures specifically from framebuffers, I get half a second of lag. This is done 4 times as I have three RGBA textures and one depth 32F buffer. I tried to use debugging software for the first time - RenderDoc only shows SwapBuffers() and no OGL calls, while Nvidia Nsight crashes upon execution, so neither are helpful. Without binding it runs regularly. This does not happen with non-framebuffer binds.
      GLFramebuffer::GLFramebuffer(FramebufferCreateInfo createInfo) { glGenFramebuffers(1, &fbo); glBindFramebuffer(GL_FRAMEBUFFER, fbo); textures = new GLuint[createInfo.numColorTargets]; glGenTextures(createInfo.numColorTargets, textures); GLenum *DrawBuffers = new GLenum[createInfo.numColorTargets]; for (uint32_t i = 0; i < createInfo.numColorTargets; i++) { glBindTexture(GL_TEXTURE_2D, textures[i]); GLint internalFormat; GLenum format; TranslateFormats(createInfo.colorFormats[i], format, internalFormat); // returns GL_RGBA and GL_RGBA glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, createInfo.width, createInfo.height, 0, format, GL_FLOAT, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); DrawBuffers[i] = GL_COLOR_ATTACHMENT0 + i; glBindTexture(GL_TEXTURE_2D, 0); glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + i, textures[i], 0); } if (createInfo.depthFormat != FORMAT_DEPTH_NONE) { GLenum depthFormat; switch (createInfo.depthFormat) { case FORMAT_DEPTH_16: depthFormat = GL_DEPTH_COMPONENT16; break; case FORMAT_DEPTH_24: depthFormat = GL_DEPTH_COMPONENT24; break; case FORMAT_DEPTH_32: depthFormat = GL_DEPTH_COMPONENT32; break; case FORMAT_DEPTH_24_STENCIL_8: depthFormat = GL_DEPTH24_STENCIL8; break; case FORMAT_DEPTH_32_STENCIL_8: depthFormat = GL_DEPTH32F_STENCIL8; break; } glGenTextures(1, &depthrenderbuffer); glBindTexture(GL_TEXTURE_2D, depthrenderbuffer); glTexImage2D(GL_TEXTURE_2D, 0, depthFormat, createInfo.width, createInfo.height, 0, GL_DEPTH_COMPONENT, GL_FLOAT, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glBindTexture(GL_TEXTURE_2D, 0); glFramebufferTexture(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, depthrenderbuffer, 0); } if (createInfo.numColorTargets > 0) glDrawBuffers(createInfo.numColorTargets, DrawBuffers); else glDrawBuffer(GL_NONE); if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) std::cout << "Framebuffer Incomplete\n"; glBindFramebuffer(GL_FRAMEBUFFER, 0); width = createInfo.width; height = createInfo.height; } // ... // FBO Creation FramebufferCreateInfo gbufferCI; gbufferCI.colorFormats = gbufferCFs.data(); gbufferCI.depthFormat = FORMAT_DEPTH_32; gbufferCI.numColorTargets = gbufferCFs.size(); gbufferCI.width = engine.settings.resolutionX; gbufferCI.height = engine.settings.resolutionY; gbufferCI.renderPass = nullptr; gbuffer = graphicsWrapper->CreateFramebuffer(gbufferCI); // Bind glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo); // Draw here... // Bind to textures glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, textures[0]); glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, textures[1]); glActiveTexture(GL_TEXTURE2); glBindTexture(GL_TEXTURE_2D, textures[2]); glActiveTexture(GL_TEXTURE3); glBindTexture(GL_TEXTURE_2D, depthrenderbuffer); Here is an extract of my code. I can't think of anything else to include. I've really been butting my head into a wall trying to think of a reason but I can think of none and all my research yields nothing. Thanks in advance!
    • By Adrianensis
      Hi everyone, I've shared my 2D Game Engine source code. It's the result of 4 years working on it (and I still continue improving features ) and I want to share with the community. You can see some videos on youtube and some demo gifs on my twitter account.
      This Engine has been developed as End-of-Degree Project and it is coded in Javascript, WebGL and GLSL. The engine is written from scratch.
      This is not a professional engine but it's for learning purposes, so anyone can review the code an learn basis about graphics, physics or game engine architecture. Source code on this GitHub repository.
      I'm available for a good conversation about Game Engine / Graphics Programming
    • By C0dR
      I would like to introduce the first version of my physically based camera rendering library, written in C++, called PhysiCam.
      Physicam is an open source OpenGL C++ library, which provides physically based camera rendering and parameters. It is based on OpenGL and designed to be used as either static library or dynamic library and can be integrated in existing applications.
       
      The following features are implemented:
      Physically based sensor and focal length calculation Autoexposure Manual exposure Lense distortion Bloom (influenced by ISO, Shutter Speed, Sensor type etc.) Bokeh (influenced by Aperture, Sensor type and focal length) Tonemapping  
      You can find the repository at https://github.com/0x2A/physicam
       
      I would be happy about feedback, suggestions or contributions.

  • Popular Now