Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

196 Neutral

About Isokron

  • Rank
  1. To see this type of shadows (using sqrt for compression) being used in a more complete game see TaSpring.
  2. Isokron

    FBO without depth attachment?

    glGenFramebuffersEXT(1,&frameBuffer); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, frameBuffer); glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, waveTex1, 0); glDisable(GL_DEPTH_TEST); glDepthMask(0); glViewport(0,0,1024,1024); glDisable(GL_BLEND); GLenum status; status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); if (status != GL_FRAMEBUFFER_COMPLETE_EXT) info->AddLine("FBO not ready"); Generates FBO not ready for me while if I add the line glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, depthTex, 0); it works so I can only assume that that is the problem ...
  3. In the spec for framebuffer_object there is an example for how to use FBOs without a color buffer and just drawing to the depth buffer (I must confess that I havent read the entire spec). But is it possible to do the opposite and only attach a color buffer in case you dont need the depth buffer. I have tried to do stuff like glDisable(GL_DEPTH_TEST); glDepthMask(0); But I still dont get framebuffer complete unless I attach a depth buffer to the FBO. Is there something more that needs to be done?
  4. Isokron

    A* 2-teir pathfinding... questions?

    In a RTS game im developing ( we use three tiers of A*. The base one on each square, one on 8x8 and one on 32x32 squares. This lead to very fast path searches over the whole map (meaning we can be lazy and just get an individual path for each unit instead of trying to map them into groups and also dont have to put them in any sort of path que). The main drawbacks is that you no longer get optimal paths (esp if a 32x32 happens to span several areas with high costs between them) and that it takes time to precompute the costs for the larger squares. Of course the "precompute" cost also comes back as soon as the map changes (new building or terrain changed) meaning we have to have a recompute que instead of a path que. Just averaging the costs of smaller nodes into the bigger node get really bad results though (although it would alleviate the precompute cost) and instead I propose you define a center for each large node and compute the path costs between those centers which is what we do. Its released under the GPL so feel free to check out the code if you think it might be usefull. Here is something I wrote on the subject a few years ago.
  5. Isokron

    Warcraft 3 AI Files

    Me and some others are creating an open source RTS that currently uses Total Annihilation as a base for units etc. It supports pluginable AI through DLL files which sounds like what you are looking for. There is two different kinds of AI DLLs that you can plugin. GroupAIs that is supposed to control a group of units and is assigned to hotkey groups by humans and GlobalAIs that is supposed to take over a team entirely and act like a skirmish AI (in the future we will try to add more support for having this act in support for a human player also). The later one only exist in the CVS repository so far but the next release will include it. Visit for more info.
  6. Isokron

    Directional Light: Shadowmap

    CalcMinMaxView calculates the minimum and maximum values in a coordinate system where the camera is the center and the axises are ortogonal to the light direction where the camera frustum can see objects given the assumption that all objects has y (height) coordinates between 0 and 700 in world space and only have a certain view distance. To be frank the code look kind of strange to me also now but it made sense when i wrote it :) The matrix is then calculated so that this min/max values will be at the edge of the shadow matrix to get as much resolution as possible from it. The process is complicated by the fact that i also run an non linear transform (sqrt) on the the coordinates to get higher res close to the camera. If you just have a top down camera and the sun somewhat high over the horizon you can probably skip these steps more or less.
  7. Isokron

    Directional Light: Shadowmap

    If you want to look at some code we do this and some more in a GPLed RTS game Im working on. However since its a whole game there is a lot of code and some of it quite messy (including the shadow code im afraid). Well mostly you would be interested in the CShadowHandler class. Source code can be found here. Edit: Ops didnt see the gf2 requirement, this code wont run on that.
  8. Isokron

    How can this happen

    Hmm ops now i feel extremely stupid. Then the only question is how it can read outside the 512*512 array when its less than 512.
  9. Take a look at this screenshot. As can be seen in the watch window it comparing 507 + 4 with 512 but for some reason it thinks 513<512 and manages to get into the if statement and crash. How can this happen ?
  10. Isokron

    RTA* info

    I and some others are working on an open source remake of Total Annihilation ( where we allow for 1000s of units and dynamic maps. We basically use a multileveled A* approach where we refine the path as we travels along it. I havent looked at RTA* very closely so I dont know how close it is to it. But anyway the only slight delays we get is at the creation of the path where we have a delay of about 1ms for each unit pathing from one end of a medium map to the other (512*512 search squares). This can be noticable for >100 units starting to path at once so i hope to be able to reduce it further by introducing a caching system on the higher level paths. This should work since large groups of units starting pathing at once usually move along roughly the same path. This approach cant give completly optimal paths but the error it create is usually not visible and and in some tests i did a few years ago it generally produced paths within 5% of the optimal value. If you want to test it make sure to check out the latest CVS version since the pathfinding of the 0.41 version is horribly broken.
  11. Me and some others are working on a RTS ( that is starting to shape up. The problem is keeping computers in networked games syncronized. The networking format is build upon sending just the user input and having all computers run the same simulation. So we have two sorts of code, synced code(all world simulation) that is run the same on all computers and unsynced code (ui,graphics etc) that differs. But for some reason the syncronized simulation breaks down sometimes (usually 15-20 minutes into a game). We think its because either synced code use unsynced data or unsynced code modify synced data, but it very hard to track down the error position. To make it easier we are planning to create two sorts of memory and protect them using VirtualProtect from being used by the wrong sort of code. The problem is that VirtualProtect only seems to work on memory allocated with VirtualAlloc and it seems impossible to get CreateHeap to use this sort of memory. Is there some way to do this or will we have to create our own memory allocation code ? In that case what free code would you suggest we base it on?
  12. Isokron

    Vertex program and clipplanes

    Thanks Yann L although it wasnt the answear I was hoping for. Ademan: I render the reflected image into a texture. Render a few sinewaves into a texture. Then perturbes the reflection texture with the sinewave texture using a fragment program (calculating the correct "plane" reflection per vertex)
  13. It seems like ClipPlanes doesnt work together with vertex programs on Nvidia cards while it works perfectly on ATI cards. Does anyone know what the spec says? (yes im lazy i suppose). With clipplanes, without clipplanes.
  14. I am creating a game that might soon have progressed far enough that some public testing is in order. My problem is that if the program crash on your own computer you can easily get visual to show the function it crashed on in a release build (if you included mapping info) but is there any way to see this just given the crash address you usually get after a crash. Either by entering it somewhere into visual or by using some third party app. On a related note how much extra work is it to make a program output the function it crashed in or better yet a stack trace like Unreal tournament.
  15. Im currently writing a RTS game that uses syncronized simulation on all machines and just sending user input over the network. The problem is that some parts of the programs are unsyncronized (everything having to do with drawing etc) and some syncronized (all the stuff that actually change the gameworld). Now to keep the simulation syncronized I need to restrict how data is accessed. Syncronized code can read/write syncronized data and write unsyncronized data while unsynced code can read/write unsyncronized data but only read syncronized data. As long as I was the only coder in the project this was somewhat easy to uphold but now that a few more people has started coding on the project the risk of mistakes increase. Is there some way to uphold the above access patterns by some features in C++ ?
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!