• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

129 Neutral

About Programmdude

  • Rank
  1. Modern Garbage Collectors under the Hood

    My understanding of why two survivor spaces are needed is for combating fragmentation. When you copy from one survivor space to the other, you could copy them over without any gaps. If there was only one survivor space, then you would get gaps from survivor space objects being freed or promoted to the long life space.   My solution for real time applications, such as games, is don't use java. My reasoning is due to the existance structs. In C# and C++, when you create a struct, or non pointer object in c++, since it either lives in the heap or as part of another object there is no GC overhead, and so games written in these languages don't suffer from as many objects being created. In java however, there is no concept of struct, and only primitive types such as int or float are on the stack, if you need a position object containing x, y and z, you would need a new object for each and every position, causing far too many objects to be created.
  2. The Guide to Implementing 2D Platformers

    I don't plan on making a platformer, but it is a very informative article and was a good read.
  3. Best Algorithms for Rendering Voxels

    Another idea that could work with regards to the texturing is have vertices have a texture index, and then use that to get the right texture. Then all you need to do is send in either a 3D texture, or a 2D texture array. The exact implementation would depend on whether you are using DX9, DX10+ or OpenGL.
  4. Best Algorithms for Rendering Voxels

    A long time ago(3ish years) I worked with some friends on a voxel engine. I wasn't directly working with the graphics, but we did talk about it a lot. The first try was to render lots and lots and lots of cube models. Even with a frustum culling it was awfully slow. The approach we went with is construct a vertex buffer & index buffer based upon all of the visible faces. You shouldn't do that every frame either, just when blocks change. If I remember correctly the approach we had for different textures was have a set of vertex buffers, one for each texture.
  5. I have a project with three rendering backends, D3D9, D3D10 and GL2, and currently have a sample project, where I render a texture. I know, groundbreaking stuff I am doing [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img] Via DX10 I use the R8G8B8A8_UNorm format, works perfectly fine. Via GL2 I use GL_RGBA. Also works perfectly fine. However with DX9 I either use A8R8G8B8 and the colors are reversed(b = r, r = b) or I use A8B8G8R8 and have it crash. According to MSDN they are identical to each other: [url="http://msdn.microsoft.com/en-us/library/windows/desktop/ff471324(v=vs.85).aspx"]http://msdn.microsof...4(v=vs.85).aspx[/url] The debug error messages are: Direct3D9: (ERROR) :Invalid format specified for texture Direct3D9: (ERROR) :Failure trying to create a texture The code to get the pixels is the same, and so is pretty much every other bit of code. CheckDeviceFormat() returns false, so my question is why does the exact same format work in DX10 and OpenGL but is not supported in DX9? I have searched and I cannot find anything on google or MSDN that implies that A8B8G8R8 is a bad evil format to work with.
  6. Precompile Effect

    That is what I use currently, what I am looking for is a way of compiling it before running the game into some form of optimized binary form instead. It should speed up loading the effect.
  7. Precompile Effect

    I am using DX9/DX10 via SlimDX for a project, and am looking into ways of speeding up loading. One of the slow-downs is loading the effect files. I am currently using Effect.FromString to load the effects. I have looked through the documentation and on google, but I have found no way of precompiling effects for either DX9 or DX10. The only slightly related articles are those of compiling individual shaders(pixel shader, vertex shader, etc), but it doesn't seem possible to recreate the effect after you compile the individual parts.
  8. RPG Dialouge System Questions

    I think the point of the editor application would be so you can edit everything in one place, as opposed to edit the talking.xml file, the monsterdata.xml file, the ....xml file and so on. I personally don't like XML, too much extra fluff that I find annoying. However, that is my personal opinion. I would recommend it if you don't want to make some form of proprietary format. JSON is another possible option, you should be able to find readers/writers for virtually any common language out there.
  9. Hey, I am wondering how modern games render terrain. I am mainly interested in the texturing/rendering, though other terrain related information could be useful. Currently I send over 5 textures, and store the texture weights in a float4/vec4. It draws each texture depending on each weight, and the last texture based on the absence of weight. I could easily extend this to 9 textures for each chunk, which would probably be enough. However, what about specular mapping and bump mapping? I would need to send over 2x/3x more textures, and graphics cards can only handle so many at a time. And I have heard about detail textures, I understand the theory behind them, but that would be even more textures. What techniques to modern games/engines use to get it working nicely? I have googled this and will continue to do so until I get an answer, but if anyone is able to help I would be grateful. So any modern, useful articles or anything would be very helpful. There is a lot of information out there, but that just means there is a lot to sift through. Matthew
  10. Game Engine or not?

    ill and vleugel are right, game engines are pretty much libraries that tie everything together nicely and that you can use in other projects. The library code would work just as well being inside the game project as it would in the library, with the obveous exception of using it in other projects. Whether or not you want to use an engine, in house or someone elses, always keep your project neatly organized. Don't just shove a whole load of things in the game class, seperate it all out into there own classes. It makes it so much easier when fixing bugs and trying to add new features. As for graphics, on windows in C# there is XNA, [url="http://slimdx.org/"]SlimDX [/url]and OpenGL. XNA and SlimDX both use DirectX 9, though SlimDX can also use DirectX 10 and 11. I have had no problems with XNA running on my own computer (Win7 x64), but there are several things I don't like about it too much. Not easily able to load files without the content pipeline, which means making your game moddable has now become almost impossible. No DirectX 10/11 support hurts a little when doing 3D games, and it doesn't support x64 projects. SlimDX is very similar to XNA, but without the content pipeline, with DirectX 10/11 support and with x64 support. There are several OpenGL wrappers for C#, with probably the best being [url="http://www.opentk.com/"]OpenTK[/url]. If you want cross platform via mono, then this is your choice. You mentioned doing OpenGL through java before, so this could be another one to consider.
  • Advertisement