• Content count

  • Joined

  • Last visited

Community Reputation

164 Neutral

About Armand

  • Rank
  1. Unique thread identifier? (WinXP)

    If you have a few threads going, that function can EAT YOU Alive. Mainly because people use it a lot to switch globals (like memory heaps) a thread uses. Its not just checking a register, or a memory local, Its doing some sort of system level look up. My suggestion, use a thread local var. GCC : __thread // unsigned int __thread lt_threadId; MSVC : __declspec(thread) //// unsigned int __declspec(thread) lt_threadId; It acts as a global var, but is global in the context of you thread. Better yet, if your switching a resource on thread id, then have that as a thread local var.
  2. Globals arnt that bad (they just arnt fassionable currently.) You can solve the init order though by fixing them in a function. //someClass g_foo; //was someClass & g_foo() { static someClass s_foo; return s_foo; } Then all you need to do is search an replace all of your refs to g_foo -> g_foo() Warning: May not help with shut down order. Your dependences still may bite there. But this has worked for me under quite a few compilers. The other thing I have done to fix this (required for a DLL issue), was to alloc static buffer the same size as my class, and inplace new them. This method gives you full control over you (de)construction whil still leaving the memory in global space. Hope this is helpful.
  3. [.net] C# 2D Node Editor?

    There is a few over things simmilar at One that caught my eye was NetMap Its more graphing than node design, but still may be usful. There was also one at CodeProject called TaskMon, but I cant find it now. It was a visual programming lang, but bits could have been used out of it I think. But yeah, I've been toying with the idea of writting my own for a while now because of a lack of stuff out there.
  4. Consoles vs PC

    Quote:Original post by Tiffany There is a huge time investment involved in devving for the PC because of hardware compatibility. With console development you don't have to worry about any of that, you basically know your capabilities from the get go. WHile this is true, there are no where near the comliance testing required for PC's. For a consol game to be released, it needs to be approved by the owning company, and they test it for all sorts of weird things (text boxes still fit in all 5-6-8 langs. etc) For a PC game to be released, It needs to be uploaded to the web.
  5. Making skeletal animation more efficient

    Fristly, con grats on a working skel anim system. Can you tell us a bit more about the test you've performed? 40-50% of the cpu dosnt mean much wihout a bit of context (at least to me). If it is the only thing your doing is anmating and skinning of one model and your not vsynced, then yes it will take up most of your frame because its all your doing. Better might be to time the execution of the operations. Then work that out as a percentage of your dream frame rate. Also test variations of data. Number of bones, number of weights per vert. Chart your performance so you can know who thing you will be able to handle. My $0.02
  6. Curious: I wonder if this is where the idea for pre compiled headers came from.
  7. How do you program games without OOP?

    OOP is a mind set, not nessarly a compiler feature. Many game written in C were OOP, but expressed in a different form.
  8. could it be that your volumes are writting to the z buffer, thus clipping against eachother?
  9. CLI? I dont think you've describes a managed class. your CPP class should hae tings like __nogc or __gc for old style CLR. Or ref for new style. I you want to keep you cpp class un-tainted, then youll need to write a wrapper class. Google for wrapping un managed code and it should see you right.
  10. "Game Physics Engine Development"

    Have you looked at bullet. [link="" ] It's more than a tut, Its a Indi physics lib for learning and physics nuts.
  11. Fair enough. SqPlus is quite clean all thing considered. While I havn't looked into the required duplication, you could work some #include nastyness to do it for you. Perhaps.. [CODE] #define RETURN_TYPE void #include "dupCode.inl" #undef RETURN_TYPE #define RETURN_TYPE typename #include "dupCode.inl" #undef RETURN_TYPE [/CODE]
  12. try the functors and typelists from While I try to steer clear of template black magic (meta programing). Or have a look at what Lua Plus or squirrel plus do. (since they are template lib for exposing native code to script engines, that might be simmilar to what your doing. ;} ) They use a lot of specialisation. The format your trying to use looks a lot like squirrel plus.
  13. If you do a Lot of static initalisation, then some compilers do and do remove them depending on strange rules. What I would suggest would be a static function within you Mat3f to return your Idenity Matrix. Another way is to make all of your static's do their init in a start up fuction. Those are the only 2 ways I know of forcing the init to happen.
  14. Can I assume that your trying to do this in a single state flow diag. If so, that would be your problem. IMO you need 2 types. One for the battle, one for the entitys in said battle. The Battle one does set up, and any eviro elements you may wish to put in. EI time limit, random stage bonuses such as respawn of bad guy, alter attributes of combatinats due to events. The other is a looping SM that handels wait time, action display, action warm up, the action, action cool down, with side forays in to damaged states. but thats my $0.02 Armand
  15. Sphere trees are another option that you might like to have a look at. Are you using this for real time, Or once off render shots? If its not real time, then you can pull a few more tricks from your POV. EG, Do a looses frustrum cull (brute force), and tree the result set.