• Advertisement

Archived

This topic is now archived and is closed to further replies.

OpenGL another OpenGL book?

This topic is 5905 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The question has been brought up, and lately I''ve been doing some serious consideration: "will Dave and I do an ''Advanced OpenGL Game Programming'' book?" The question I have is, "what would this book encompass?" Obviously we''d try to take where we left off from "OpenGL Game Programming" and continue, but maybe some things need more indepth discussion or clarification, in addition to a slew of new topics. So, if it were to be done, what is everyone wanting to see in an advanced OpenGL game programming book? Kevin

Share this post


Link to post
Share on other sites
Advertisement
Artificial Intelligence
More on fog
Special effects, like fire and water
Lens flares
a better "final project"
loading other model types, like .obj and .3ds
gluProject and gluUnProject
More in-depth on the four rendering buffers, especially the accumulation buffer

That''s all I can think of right now. You''re best bet is to look through the OpenGL reference and discuss anything that might be of use to game programmers that you didn''t cover last time

Share this post


Link to post
Share on other sites
Maybe there is a god....


Lol. Ill never turn religous but reading this post almost made me want to Here it goes:

-rather than Dirct Input and Sound, can you use the SDL(Id like to learn how to use that rather than microsofts garbage. I would learn Direct X if I wanted to use DInput and Sound )?

-how to create isometric games

-the full development of a (demo!) RPG or RTS

-less brief explanations of important and usefull stuff

-some more on the openGL camera would be OK but not nessesary since its not hard to figure out on your own.

Basically, I want to see a book that teaches you the concpepts and programming behind an RPG or another advanced type of game. Things like charecter creation, NPC's, group management, turn based and real time combat coding, and possibly how to make it into a small multiplayer game. An isometric game with a few people in a small town where you and a friend compete in a tournament against each other and a few other guys.

I think I would learn alot from a book covering topics like that, and I would be on my way to creating games based on the fantasy books I am writing, and then writing my own books on OpenGL, too(thats one of my goals, I would like to be able to write some books for complete begginers to learn an easier way than I have to!).

Right now, this is all I can come up with because I am excited but I will have some more suggestions later in the day or week with a reason behind them.

"I've sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do'Urden

Edited by - Drizzt DoUrden on September 22, 2001 10:30:44 PM

Share this post


Link to post
Share on other sites
Have you seen primagamedev.net or com or whatever? THey have books on Multiplayer games in Direct X, Special Effect in Direct X, RPG's in Direct X, Isometric games in Direct X.

Thats depressing.

You should combine it all into one good OpenGL book. (If not.. then make a book explaining how to switch from OGL to DX... )

The final project in the other book is very brief, and was not explained very well. What is it, 10 pages in that chapter?

I understand why. You guys made a pretty big book with a large amout of information in it. You had to make it as brief as possible I would guess.

You should only use the first 4 or 5 chapters to teach alittle more on OpenGL(that is needed to start..) and then go straight into a 10 to 15 chapter section on the development of a game, putting it in 10 to 15 good steps, teaching what is needed if they don't already know as you go.

The best way to learn is to actually do it.

"I've sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do'Urden

Edited by - Drizzt DoUrden on September 22, 2001 10:48:43 PM

Share this post


Link to post
Share on other sites
Advanced OpenGL? Maybe I''d have to buy this one . I haven''t bought the first one, since I seemed to be past it anyway, so if I point out a topic or two you did actually cover, ignore them . Anyway, topics I haven''t conquered yet are:
  • Shadows
  • Programmable vertex and pixel shaders (I don''t have a video card that supports them in hardware, but I''d like to know about them)
  • 3D Textures (again, I don''t think my video card supports them anyway)
  • Advanced math demonstrations are cool. Like deformable surfaces, reflecting particles, et cetera. But that''s all just extra stuff, since the book it aimed at OpenGL.
  • I can''t think of anything else that I don''t know and want to know that has to do with OpenGL at the moment, maybe I''ll post some more later

Even though this would be outside the scope of the book to go in depth on, I think using the SDL would be pretty cool . I use it now, but I wish more people knew about how great it it. It isn''t required though, as long as the OS specific code is kept out of the way.

[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites
Just for graphics ideas (special effects and such):

- Water effects, like ripples and similiar effects
- Terrain simplification algorithms other than roam
- Object LOD
- Advanced camera control techniques
- Vertex and pixel shader coverage
- Lightmap generation
- Per pixel lighting techniques (dot3 bump mapping and such)

Actually, this sounds more like a next generation 3D engine feature list, but you get the idea . Mo'' 3d graphics techniques!

---------------------------
FaceHat Software -- Wear the hat.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
overlay and underlay.

Share this post


Link to post
Share on other sites
How about some of the advanced techniques'' application in vertex programs and register combiners?

Share this post


Link to post
Share on other sites
After reading your first book I started investigating current OpenGL games to see how they work.
What I noticed is that many of them seem to use their own transform systems rather than the GL''s.
I would really like to see code and theory explanations of this.



--------------------
so, what you''''re saying is, that the mushroom spores were brought in from outer space by - who??

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
a chapter about creating 2D/iso games would be cool... and perhaps a ROAM implementation or an indoor shooter using BSP trees...

Share this post


Link to post
Share on other sites
Have a chapter in the beggingin telling about things such as:

-Using alt + tab to switch programs.
-How to organize the data in a game (.cpp''s, .h''s, and other types of files..)
-How to prevent writing error prone code.

AND(!) multiplayer game in OpenGL!

"I''ve sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do''Urden

Share this post


Link to post
Share on other sites
Please do it.
" Opengl game programming " is definitly the best game programming book now available on the market.

Artificial intelligence
3d file formats, particulary .md3 and .3ds
BSP trees
Phisics
Optimisations technics

but most important an " Advance game programming " book should focus on real examples and " game programming tricks " rather then theory.
It should provide also re-usable code

Share this post


Link to post
Share on other sites
quote:
Original post by AlbertoT
but most important an " Advance game programming " book should focus on real examples and " game programming tricks " rather then theory.It should provide also re-usable code



I agree with this, I think it would be a good alternative for actually creating a game throughout the book.

I still would rather walk through the whole development proccess.. it would make the book unique and OpenGL might take over

Share this post


Link to post
Share on other sites
There are many books covering OpenGL, so making a section on basic OpenGL in a sequal to an OpenGL book seems rather pointless. "-How to organize the data in a game (.cpp''s, .h''s, and other types of files..)" There are many free articles and books written on that matter.
"-How to prevent writing error prone code." And, there are lengthy papers on doing that...books too!

"AND(!) multiplayer game in OpenGL!" If one knows the OpenGL API somewhat thoroughly, and is a descent programmer, it should not be too-hard to implement DirectPlay into an OpenGL application, due to the amount of information and open-source applications over the net dealing with DirectPLay and mixing DirectX with OpenGL.

Share this post


Link to post
Share on other sites
Your right, there are MANY books on OpenGL and only one that relates directly to game programming. I would like to know how to organize my game. This book is supposed to be about games, right?

It would be nice to see how multiplayer games work in OpenGL, since I do not know much about multiplayer games at all, it would be hard for me to just go take a tutorial and implement it with OpenGL myself...

"I''ve sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do''Urden

Share this post


Link to post
Share on other sites
quote:
Original post by Drizzt DoUrden
It would be nice to see how multiplayer games work in OpenGL, since I do not know much about multiplayer games at all, it would be hard for me to just go take a tutorial and implement it with OpenGL myself...



But OpenGL has nothing at all to do with the networking aspect of the game. It just handles graphics. I don''t know whether we''d cover multiplayer or not, but the point is, any information currently available on multiplayer should apply to whatever you want to do, regardless of API.

Share this post


Link to post
Share on other sites
I''m still reading the book, and up till now it''s pretty good, but I agree with one of the other comments. Some of the more important subjects seemed to be breezed over. Of course, I can''t give many examples only being on chapter 11 but here''s a couple of suggestions:

more in depth matrix review. The first book showed the math behind matrixes, but not a lot of code. Very little code really. I''d like to see real examples of each of the matrix transformations with detailed exlainations.

Some more of the simple topics seemed to be left out such as bitmap masking. Along with this goes the glBlend stuff. It was touched on, but examples of the resulting effects of all of the possible blends would be nice, rather than just saying, "play with them and you''ll come up with cool effects"

Also, a more robust bitmap loading function? This one is VERY pickey and only excepts bitmaps saved in a special way. It won''t use a bitmap straight out of photoshop or webimage or some others. Also, how about transparent bitmaps where you parse the specific transparent color out of it?

Maybe framerate limiting? The good way...

I''ll post more when I think of them.

- Mike

Share this post


Link to post
Share on other sites
I look at it like this:

Your first book was called OpenGL Game Programming, and focuses on teaching OpenGL and making a small game.

This next book should be called "Game Programming with OpenGL" or "Game Creation using OpenGL," teaching more on how to use OpenGL and C++ to make games for windows.

(Note that I am not saying that should be the title, but thats what it should be based on)

"I''ve sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do''Urden

Share this post


Link to post
Share on other sites
It seems to me that that''s what the first book does. The first several chapters are introduction to OpenGL and it''s functions, teaching you how to use them. Once you get to about chapter 18 or so, you really start putting what you''ve learned together and make games. The second I don''t think should involve games at all. I feel the second book should merely discuss advanced OpenGL techniques.

One thing to remember is:

There are many books that teach game design, and as many that teach OpenGL. OpenGL Game Programming did a great job to combine the two fields. Now it''s time do define what to do next. Do you guys want to make a more advanced version of the first one? Or do you want to make a book dedicated to one of the two fields of design/implementation or OpenGL?

I personally don''t know how you could take the book further. What I might suggest, is to make a revision of the first book adding and correcting what has already been stated.

As you can tell, I''m a little mixed on my opinion. I''d love a book that describes, in great detail, the advanced OpenGL techniques and special effects. But I''d also like a book that discusses the advanced game engine mechanics as well. if you could combine the two, it''d be perfect.

- Mike

Share this post


Link to post
Share on other sites
Well, today I started listing possible topics (not going to list them here), and from the looks of it, I'm wanting to cover advanced OpenGL techniques, special effects, and game engine topics that could be applied using any graphics API, but that we explain using OpenGL.

I don't know yet whether or not there would be a full game included, or a full blown engine for that matter (lots of work). I can see us doing various parts of an engine, though, and maybe explaining the concepts behind engine design. The idea of this book would be to cover the topics we wanted to cover in the first one, but cut out because of time (there were about 30 chapters in the original table of contents), while also including those topics that we simply ignored or glossed over.

Again, it's all in a concept phase right now. We've hardly discussed it amongst ourselves. Keep the topic ideas coming, though. I might have 40 topics, but I'm sure I'm missing something.

Kevin

Share this post


Link to post
Share on other sites
Sheep: There is a large abundance of articles on methods of subdividing ''space'' for 3d applications, over the internet and in a few books, such as Game Programming Gems, probably GGems2, 3d Games: Real Time Rendering & Soft. Technology.

Share this post


Link to post
Share on other sites
I think that the advanced opengl game programing should be developed on top of de simp engine , the topics you should build on top of the simp engine :

First and most important , optimization techniques ( Space subdivision techniques [octrees,portals] , Simplification ... etc )

After that you should make a chapter Reading a 3DS file format , that is a important knowledge.

Then you should talk about beautiful terrains and how to render then fast.

I would like a chapter about colision detection , and picking in 3d space.

To the final part I have an interesting sugestion , most of the space subdivision techniques require that the scenary to be static , you could come up with a way to render fast scenes were the cenary can change ... I heard a game that you could ,with a bazooka, blow a hole in the ground and change the cenary , that would really rock!!! Do you think you can do it?

In the final chapter you change the name of simp engine , to comp engine , and you create a demo were you are in the top of a mountain looking at a huge scenary with the sea in the end(I remember Black and White now). This way we all will have an engine good enough to render anything our mind can think of, and it will be advanced enough to make everyone happy.

I really don´t think you should make chapters about Artificial Intelligence , you would be much better if you use some of the topics I mentioned. I would definitively buy a book with those topics ... hell I would buy it twice !

Wow ... big message....

Share this post


Link to post
Share on other sites
Besides the fact that I want to go through the development of a full game, here are a few thigns I would like to see:

-How to use SDL
-Isometric game programming
-More on blending( taking the futile colors out of TGA''s and BMP''s )
-Maybe working on the Simp Engine alittle more, as in adding to it and giving better explanations
-More on collision, and AI
-Alittle on using DPlay in OpenGL would be nice, if you plan on using DInput and DSound. If you are using SDL, then I guess WinSoc

Thats about it.

"I''ve sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do''Urden

Share this post


Link to post
Share on other sites
I wouldn''t mind seeing a bit on how to do Bump mapping in OpenGL
and other effects like that.



"Shhweeet, look atem blow" - Anonymous dwarf
"Hmm, I always thought I was a pretty nice guy, but no, apparently I''m the Antichrist..." -Rudan

Share this post


Link to post
Share on other sites
We''ve been talking about doing this still, and we even have a topic list, but when we look at the topic list, we''re not sure how a book would be made out of it. The only title that makes sense is "OpenGL Game Programming, Part 2".

In any case, what I don''t think we would do is use the SimpEngine, or make an extension of it. IF, and it''s a big IF, we were to do an engine in this book, we''d redo it from the ground up. This would be after all, an "advanced" GL book.

I''m not going to post the entire "topic idea list" I have here, but here''s a few lines:

  • data structures: BSP''s, Portals, Quadtree, Octree, and more
  • special fx: water, realistic explosions, decals, lightmap generation, and more
  • model loading
  • level loading
  • picking/selection
  • camera techniques
  • extensions
  • and more..

    Still debating AI..

    So, we shall see. The more I think about it, the more I want to do it as crazy as it would make my life again for another 8 months. But, hell. You only live once, right?

    Kevin

    Share this post


    Link to post
    Share on other sites

    • Advertisement
    • Advertisement
    • Popular Tags

    • Advertisement
    • Popular Now

    • Similar Content

      • By QQemka
        Hello. I am coding a small thingy in my spare time. All i want to achieve is to load a heightmap (as the lowest possible walking terrain), some static meshes (elements of the environment) and a dynamic character (meaning i can move, collide with heightmap/static meshes and hold a varying item in a hand ). Got a bunch of questions, or rather problems i can't find solution to myself. Nearly all are deal with graphics/gpu, not the coding part. My c++ is on high enough level.
        Let's go:
        Heightmap - i obviously want it to be textured, size is hardcoded to 256x256 squares. I can't have one huge texture stretched over entire terrain cause every pixel would be enormous. Thats why i decided to use 2 specified textures. First will be a tileset consisting of 16 square tiles (u v range from 0 to 0.25 for first tile and so on) and second a 256x256 buffer with 0-15 value representing index of the tile from tileset for every heigtmap square. Problem is, how do i blend the edges nicely and make some computationally cheap changes so its not obvious there are only 16 tiles? Is it possible to generate such terrain with some existing program?
        Collisions - i want to use bounding sphere and aabb. But should i store them for a model or entity instance? Meaning i have 20 same trees spawned using the same tree model, but every entity got its own transformation (position, scale etc). Storing collision component per instance grats faster access + is precalculated and transformed (takes additional memory, but who cares?), so i stick with this, right? What should i do if object is dynamically rotated? The aabb is no longer aligned and calculating per vertex min/max everytime object rotates/scales is pretty expensive, right?
        Drawing aabb - problem similar to above (storing aabb data per instance or model). This time in my opinion per model is enough since every instance also does not have own vertex buffer but uses the shared one (so 20 trees share reference to one tree model). So rendering aabb is about taking the model's aabb, transforming with instance matrix and voila. What about aabb vertex buffer (this is more of a cosmetic question, just curious, bumped onto it in time of writing this). Is it better to make it as 8 points and index buffer (12 lines), or only 2 vertices with min/max x/y/z and having the shaders dynamically generate 6 other vertices and draw the box? Or maybe there should be just ONE 1x1x1 cube box template moved/scaled per entity?
        What if one model got a diffuse texture and a normal map, and other has only diffuse? Should i pass some bool flag to shader with that info, or just assume that my game supports only diffuse maps without fancy stuff?
        There were several more but i forgot/solved them at time of writing
        Thanks in advance
      • By RenanRR
        Hi All,
        I'm reading the tutorials from learnOpengl site (nice site) and I'm having a question on the camera (https://learnopengl.com/Getting-started/Camera).
        I always saw the camera being manipulated with the lookat, but in tutorial I saw the camera being changed through the MVP arrays, which do not seem to be camera, but rather the scene that changes:
        Vertex Shader:
        #version 330 core layout (location = 0) in vec3 aPos; layout (location = 1) in vec2 aTexCoord; out vec2 TexCoord; uniform mat4 model; uniform mat4 view; uniform mat4 projection; void main() { gl_Position = projection * view * model * vec4(aPos, 1.0f); TexCoord = vec2(aTexCoord.x, aTexCoord.y); } then, the matrix manipulated:
        ..... glm::mat4 projection = glm::perspective(glm::radians(fov), (float)SCR_WIDTH / (float)SCR_HEIGHT, 0.1f, 100.0f); ourShader.setMat4("projection", projection); .... glm::mat4 view = glm::lookAt(cameraPos, cameraPos + cameraFront, cameraUp); ourShader.setMat4("view", view); .... model = glm::rotate(model, glm::radians(angle), glm::vec3(1.0f, 0.3f, 0.5f)); ourShader.setMat4("model", model);  
        So, some doubts:
        - Why use it like that?
        - Is it okay to manipulate the camera that way?
        -in this way, are not the vertex's positions that changes instead of the camera?
        - I need to pass MVP to all shaders of object in my scenes ?
         
        What it seems, is that the camera stands still and the scenery that changes...
        it's right?
         
         
        Thank you
         
      • By dpadam450
        Sampling a floating point texture where the alpha channel holds 4-bytes of packed data into the float. I don't know how to cast the raw memory to treat it as an integer so I can perform bit-shifting operations.

        int rgbValue = int(textureSample.w);//4 bytes of data packed as color
        // algorithm might not be correct and endianness might need switching.
        vec3 extractedData = vec3(  rgbValue & 0xFF000000,  (rgbValue << 8) & 0xFF000000, (rgbValue << 16) & 0xFF000000);
        extractedData /= 255.0f;
      • By Devashish Khandelwal
        While writing a simple renderer using OpenGL, I faced an issue with the glGetUniformLocation function. For some reason, the location is coming to be -1.
        Anyone has any idea .. what should I do?
      • By Andrey OGL_D3D
        Hi all!
        I try to use the Sun shafts effects via post process in my 3DEngine, but i have some artefacts on final image(Please see attached images).
        The effect contains the following passes:
        1) Depth scene pass;
        2) "Shafts pass" Using DepthPass Texture + RGBA BackBuffer texture.
        3) Shafts pass texture +  RGBA BackBuffer texture.
        Shafts shader for 2 pass:
        // uniform sampler2D FullSampler; // RGBA Back Buffer uniform sampler2D DepthSampler; varying vec2 tex; #ifndef saturate float saturate(float val) {     return clamp(val, 0.0, 1.0); } #endif void main(void) {     vec2 uv = tex;     float sceneDepth = texture2D(DepthSampler, uv.xy).r;     vec4  scene        = texture2D(FullSampler, tex);     float fShaftsMask     = (1.0 - sceneDepth);     gl_FragColor = vec4( scene.xyz * saturate(sceneDepth), fShaftsMask ); } final shader:
        // uniform sampler2D FullSampler; // RGBA Back Buffer uniform sampler2D BlurSampler; // shafts sampler varying vec4 Sun_pos; const vec4    ShaftParams = vec4(0.1,2.0,0.1,2.0); varying vec2 Tex_UV; #ifndef saturate  float saturate(float val) {     return clamp(val, 0.0, 1.0); } #endif vec4 blendSoftLight(vec4 a, vec4 b) {   vec4 c = 2.0 * a * b + a * a * (1.0 - 2.0 * b);   vec4 d = sqrt(a) * (2.0 * b - 1.0) + 2.0 * a * (1.0 - b);       // TODO: To look in Crysis what it the shit???   //return ( b < 0.5 )? c : d;   return any(lessThan(b, vec4(0.5,0.5,0.5,0.5)))? c : d; } void main(void) {     vec4 sun_pos = Sun_pos;     vec2    sunPosProj = sun_pos.xy;     //float    sign = sun_pos.w;     float    sign = 1.0;     vec2    sunVec = sunPosProj.xy - (Tex_UV.xy - vec2(0.5, 0.5));     float    sunDist = saturate(sign) * saturate( 1.0 - saturate(length(sunVec) * ShaftParams.y ));     sunVec *= ShaftParams.x * sign;     vec4 accum;     vec2 tc = Tex_UV.xy;     tc += sunVec;     accum = texture2D(BlurSampler, tc);     tc += sunVec;     accum += texture2D(BlurSampler, tc) * 0.875;     tc += sunVec;     accum += texture2D(BlurSampler, tc) * 0.75;     tc += sunVec;     accum += texture2D(BlurSampler, tc) * 0.625;     tc += sunVec;     accum += texture2D(BlurSampler, tc) * 0.5;     tc += sunVec;     accum += texture2D(BlurSampler, tc) * 0.375;     tc += sunVec;     accum += texture2D(BlurSampler, tc) * 0.25;     tc += sunVec;     accum += texture2D(BlurSampler, tc) * 0.125;     accum  *= 0.25 * vec4(sunDist, sunDist, sunDist, 1.0);           accum.w += 1.0 - saturate(saturate(sign * 0.1 + 0.9));     vec4    cScreen = texture2D(FullSampler, Tex_UV.xy);           vec4    cSunShafts = accum;     float fShaftsMask = saturate(1.00001 - cSunShafts.w) * ShaftParams.z * 2.0;              float fBlend = cSunShafts.w;     vec4 sunColor = vec4(0.9, 0.8, 0.6, 1.0);     accum =  cScreen + cSunShafts.xyzz * ShaftParams.w * sunColor * (1.0 - cScreen);     accum = blendSoftLight(accum, sunColor * fShaftsMask * 0.5 + 0.5);     gl_FragColor = accum; } Demo project:
        Demo Project
        Shaders for postprocess Shaders/SunShaft/
        What i do wrong ?
        Thanks!
         


    • Advertisement