• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

128 Neutral

About metimmee

  • Rank
  1. First of all, the big list is culled to what is within range. This is further filtered against bearing so that only the points that the radar scanner is pointing at are updated (or more accurately, the sector that has been drawn in the last frame update). The big cull only needs to take place every second, when the aircraft position is updated. The bearing sort, against the culled data takes place every frame update. The scanner scans at between 10 seconds per scan and 1.5 seconds.
  2. I'm working on a project that is creating a simulated radar display. On the display there is the normal green (raw) video as well as environment targets. The environment targets are displayed as glpoints. The targets are fixed points in space with a latitude, longitude and power. The vehicle containing the radar is moving. The map contains about 100K environment targets. Currently, as the aircraft moves, the list containing the environment is culled to include pointers to the targets within the maximum range of the radar. Then, after the sort, as the scanner rotates, **every** target is iterated through to determine if it is on the correct bearing to be updated. Each movement of the scanner will initiate a new bearing sort. The bearing sort is completed against the whole of the culled list serially. Currently, our system is choking on 8K targets. We need the system to be able to cope with approximately this number comfortably. Basically, we have a single list and I was wondering if there is a more efficient way to organise the targets so that we can find the targets on the current bearing without having to query the whole range culled list. Any help and advice would be greatly appreciated.
  3. I have a texture that only uses the green channel. I would like to use that texture on another object but alter its colour, to say grey. Is there any way to do this without affecting the original texture?
  4. glTexSubImage2D help

    I posted the same article on the OpenGL newsgroup. The problem was that I needed to supply the row's address. The solution is below: glTexSubImage2D(GL_TEXTURE_2D, //target 0, //level 0, //xOffset m_nCurrentSpoke, //yOffset TEXTURE_RESOLUTION_X, //width 1, //height GL_RGBA, //format GL_UNSIGNED_BYTE, //type &checkImage[m_nCurrentSpoke][0][0]);//pixels
  5. I am trying to draw a scanning radar display using a fan of 1024 textured GL_TRIANGLES. The texture is a 512 x 1024 array. I texture each triangle 'spoke' with a single row from the texture array. When I first implemented this, every time the frame was drawn I updated the whole texture glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, TEXTURE_RESOLUTION_X, TEXTURE_RESOLUTION_Y, GL_RGBA, GL_UNSIGNED_BYTE, mapTexture); This works fine except that its quite inefficient. I wish only to update the part of the texture that is equal to the current directon of the radar scanner. I wish the remainder of the texture to remain intact and unchanged. I tried the following but it draws the same textured row across all of the spokes. The variable nCurrentSpoke runs from 0 to 1023 as the scanner rotates. glTexSubImage2D( GL_TEXTURE_2D, //target 0, //level 0, //xOffset m_nCurrentSpoke, //yOffset TEXTURE_RESOLUTION_X,//width 1, //height GL_RGBA, //format GL_UNSIGNED_BYTE, //type mapTexture); //pixels The following only updates what was previously updated and is faster, but as the scanner reaches the latter part of its scan it slows down since its fetching and carrying an ever larger portion of the texture. glTexSubImage2D( GL_TEXTURE_2D, //target 0, //level 0, //xOffset 1, //yOffset TEXTURE_RESOLUTION_X,//width m_nCurrentSpoke, //height GL_RGBA, //format GL_UNSIGNED_BYTE, //type mapTexture); //pixels Am I missing something here? Any help would be appreciated since I've been working on this for ages now and performance is becoming a big issue. Thanks
  6. Yay for errors and headaches

    As a side-note, avoid the 'using' keyword in .h since any subsequent inclusion of that .h will also inherit the 'using namespace std'. Using within a cpp is better since the scope is immediately limited, although that can be improved upon. //this, in the most part will be ok void CMyClass::MyFunc() { using namespace std; string myString.... //lots of namespace std stuff //.. //.. } //By limiting the scope of the using keyword, you can avoid potential // clashes later. void CMyClass::MyFunc() { {//You can limit the scope like this using namespace std; string myString.... //lots of namespace std stuff //.. //.. } { using namespace widget; string myWidgetString .... //lots of namespace widget stuff //.. //.. } } }
  7. Thanks for the replies. What I am doing just now is refactoring an existing project in which the state machine is plumbed into a complex simulation project. The complexity comes from the fact that there are over 100 state machines within the main state machine. Some state machines are affected by others within the main state machine. I have also found a use for what I call 'Variable Atoms', these are literally variables that are affected by state changes, where their values or valid ranges are changed, dependent on what events have been posted. The state machine is serialized into an XML file and loaded at run-time. I have a graphical editor which allows simulation and debug of the state machine. One of the features which I have found most powerful is the ability to change behavior significantly without having to change a line of code. Bug reports come in and on several occasions, after further testing, the XML file is emailed to the customer; job done. There is also a report generator which generates tabulated html documentation. As a side-note. Would it be worth going to the effort of making this project generic so that I could release it open source as an add-on for other projects?
  8. I need to implement a 2d lookup table for my state machine. It needs to be efficient and variable in size. The lookup table will hold CEvent objects. I have ruled out a 2d array and a 1d vector with x * y elements since the lookup table needs to be dynamic in size. I have considered a vector containing structures which contain the CEvent object and another structure containing the 2 lookup states (new state/current state) and overloading operator == to check the state structure to allow searching. My app uses STL containers. Am I on the right track, or is there a better/easier way? Thanks
  9. Why do the British hate Bush?

    Quote:Original post by LessBread On the subject of Saddam's biological weapons, there was a letter to the editor from a wingnut in yesterday's edition of the local newspaper here. The writer even went so far as to claim that Saddam has used biological weapons against the Kurds! That the notion came up here too suggests to me that there is a misinformation campaign at work. Saddam used chemical weapons against the Kurds, but no one has been able to show that he also used biological weapons on them. And when it comes to gasing the Kurds, we should also remember that he used helicopters sold to him by the USA to carry out the attacks [1], [2], [3], [4] [4]. // edit - fixed bad link I believe the nerve agent was delivered by MIG23s. At the time Saddam was our friend and the rest of the world turned their backs. Only when it suited the west, did it become an issue. Lets not forget also that the Turks have been bombing the Kurds in the north while the UK/US were enforcing a no-fly zone in at the same time....in fact from the same bases.
  10. Fear of Outsourcing

    This is an interesting thread. Can someone who's had experience of outsourcing explain how the contractor has managed to produce something less than adequate? Surely if the requirements, test plan, coding and documentation standards are adequately defined there should be no room for maneuver from the supplier.
  11. Bitwise Operations

    I'd never use #defines in the manner in which I posted. that was just copied straight out of an MFC class...oops did i just admit that. Slap my wrist for not posting good style....as well as the bitwise operator bug....I'll get my coat.
  12. Bitwise Operations

    Yes, exactly. But you need to remember that we are talking 'bit wise'. You change that specific bit, it will change the valule of the number, but the other bits remain unchanged. lets take the following as an example. byte var = 0x0000; byte flag1 = 0x0001;//or binary 0000 0001 byte flag2 = 0x0002;//or binary 0000 0010 byte flag3 = 0x0004;//or binary 0000 0100 byte flag3 = 0x0008;//or binary 0000 1000 var = flag1 | flag2 | flag3 | flag4;//var now equals binary 0000 1111 because all bits in the low nibble have been set. //what if we want to clear flag3? var = var ^ flag3;//whatever the value of the 2^3 bit, it will be set to zero because of the exclusive or operator.
  13. Bitwise Operations

    Consider the following #define LVCF_FMT 0x0001 #define LVCF_WIDTH 0x0002 #define LVCF_TEXT 0x0004 #define LVCF_SUBITEM 0x0008 lvcColumnZero.mask = LVCF_FMT | LVCF_IMAGE | LVCF_TEXT ;//Format, image and text to be set lvcColumnZero.mask can now be a single value, containing what effectively amounts to a number of bool's indicating that a particular feature is enabled/disabled.
  14. sw engineering with games

    Quote:Original post by Promit Quote:Original post by DaBono However, I disagree that you blame UML for this. UML just specifies how you can draw up designs so that everyone that knows the language understands your design.Fair enough. Quote:Formally designing and documenting a product is ESSENTIAL. Keeping developers on the leish and forcing them to go through the nause of designing and actually thinking about whats ahead can be tricky in practice though. The idea that UML or other formal methods of designing leads to an over-complicated product is just plain wrong. If anything its the opposite.I don't buy it. If you go and design everything beforehand, you'll simply get raped when your requirements change -- and they always do. You need to document what the hell you're doing, obviously, but extensive design beforehand is a waste of time. So if anything, doing UML after the fact is the best way to use it. Changing requirements is something else that has to be managed of course; change costs. I imagine that this is of particular concern for an in-house project. Remember, the act of designing illicits requirements as it stimulates the dialog between the architect/developers and customer. Our requirements are linked to design specifications and test schedules. If the requirements need to change, we are able to quickly assess the cost. Before we even started desgin, we had a change management plan in place which the customer signed up to before we proceeded to elaboration. There are diminishing returns wrt the depth when designing beforehand of course, for some organisations a high degree of control and planning is necessary. For example, we never designed every method/attribute of every class. We extensively described the responsibility of each class, we documented the structure of each part of the project and tested use-cases(yuk) against the candidate structure. We also completed sequence diagrams, showing the interaction between the classes. The architecture that was generated is pretty stable but at the end of each construction phase, the developers submit change proposals for the architecture document. I would imagine CMM 5 organisations probably fully design before cutting code. We were assesed as CMM 3-4 during our last audit. I remember joking that this wasnt a measure of how good we are at developing - just how we manage the project. Quote:I don't buy it. If you go and design everything beforehand, you'll simply get raped when your requirements change -- and they always do. I dont see how forging ahead and not designing before you code would remedy this.
  15. sw engineering with games

    Disclaimer - I do not work within the games industry, although I am the snr dev for a synthetic training project. Formally designing and documenting a product is ESSENTIAL. Keeping developers on the leish and forcing them to go through the nause of designing and actually thinking about whats ahead can be tricky in practice though. The idea that UML or other formal methods of designing leads to an over-complicated product is just plain wrong. If anything its the opposite. I've found that developers tend equate progress with apparent progress. The two can be quite different. Apparent progress is when the developer, in the early stages gets stuff to happen early on, advocating the "just get on with it" premise. Later on in the project, especially when other developers on the team depend on each others work, the problems and assumptions appear, and before you know it youre changing structure and form. My central premise is "make each day a step forward". That can only happen if you plan and document. If a team has any risk management strategy they ought to design and document so that the effect of losing key personnel can be minimised. Also to keep the option of getting in a consultant if the team hits a problem can only be an option if the project is sufficiently documented - do you want to pay a consultant to figure out how your project works and then figure out a solution, or just the latter? Documenting and designing is not just about what 'is' but also, 'why it is'; in other words the reasoning that goes behind making a particular design decision. "Game Architecture and Design" and its Software Factory is pretty close to how my team works.
  • Advertisement