Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About TechnoCore

  • Rank
  1. TechnoCore

    Getting A Foot In

    In this industry, one of the problems is that everyone wants to be a game-designer at some level. Everyone has ideas, and visions of what the current game should look like. There is no shortage of ideas. The hard part is to sift through tons of bad ones. There is no short-cut to actually become a game designer. Just skill and luck. The ones i know of have almost always either been the ones starting the company/project, or people who got in as something else- like QA, game programmer, and worked their way up to a game designer role as they gathered experience. So if i were you I would either get a project of your own going. That would probably take a lot of time (years)... or go the long inside route starting as something else. I can guarantee you that nobody will ever hire someone as a game designer without a previous track-record. I know I wouldn't ;) /TC
  2. TechnoCore

    Spacegame. With pirates!

    Nice game :) Really nice inventory and feel in shipcontrol What language was it programmed in?
  3. Hi! I'm working on a project in LUA, containing a directory structure with thousands of files. I want to add this file-structure into a vs project. How do i create a NON-C++ project in VS, from a directory tree? There doesn't seem like there is a way to do it? Is there no "add directory" functionality in this VS2005? I can't find any. I tried to "add existing file" one by one until i discovered that it actually COPIED each file into the project path into project dir. I've been programming on this project eclipse for a while, but it drives me insane. (its slow, and i hate the search functions, plus it lacks all the shortcut keystrokes i have hardwired in my brain from years with visual studio :) any help is appreciated! /Thanks!
  4. TechnoCore

    Free Memory Leak Checker (C++)

    Quote:Original post by Evil Steve "Kosher" meaning "normal" or "standard" singleton. A normal singleton constructs itself the first time it's referenced, E.g.: *** Source Snippet Removed ***Or similarly, with dynamic allocation. In this case, the singleton is created and destroyed explicitly - the key point is that it's not constructed the first time it's used. Singletons are usually considered a sign of bad design, since they're really just globals in disguise. See Promit's Journal for some relevant links. Thanks for the clarification... you had me reading for a couple of hours there ;)
  5. TechnoCore

    Free Memory Leak Checker (C++)

    Quote:Original post by Antheus Quote:It uses a singleton for the memory manager (I know, I'm sorry to all the singleton haters out there), but I belive it's perfectly justified in this case. Fortunately for you, it's not a kosher singleton, since it uses explicit and not lazy construction. So I guess you're off the hook, and the class is merely a global. Still, at quick glance, you might as well replace the class with namespace, and not lose anything at all. What does 'Kosher Singleton' mean, and why is it bad? /Curious
  6. TechnoCore

    Populating a bit-field

    Thanks a lot, worked like a charm :) /TC
  7. Hi! I want to store this class bit field into a file, and read it up again as an int. How do i get the address of the bitfield, I mean it has no name... Can i name it somehow? I dont really want to put it inside another struct as it is used all ower the project already. Further more I'm using VS2005, how can i somehow control that the bitfield really become packed into an int? Thanks! /TC typedef unsigned int U32; class CMicroTile : public CBasicMicroTile { public: CMicroTile(); // Public Members /**< 0-31 Bits total: */ U32 m_nNode_1 : 4; /**< 0-3 Closest size 1 macro node --> for small units */ U32 m_nNode_3 : 4; /**< 4-7 Closest size 3 macro node --> for medium sized units*/ U32 m_nNode_5 : 4; /**< 8-11 Closest size 5 macro node --> for large units */ U32 m_bitPassable : 3; /**< 12-14 Distance to unpassable ground 0 = unpassable, 7 = 7 or longer */ U32 m_bitOccupied : 1; /**< 15 Temporary occupied bit used in pathing and collision */ U32 m_bitCovered : 3; /**< 16-18 Bit deciding the amount of LOS the tile blocks 7 == Completly blocked*/ U32 m_nObstructionCount : 2; /**< 19-20 Obstruction count used to build passability */ U32 m_nTerrainObstruction : 1; /**< 21 Obstructive terrain 1 = yes, 0 = no */ U32 m_bitMovement : 2; /**< 22-23 Speed penalty for movement 0-25%-50%-75% */ U32 : 8; /**< 24-31 Padding (unnamed fields are used for padding */ }; </code>
  8. TechnoCore

    Runtime function name?

    Thanks all for the in-depth answers! I did it in an easy way for now, using callback-registration to accept an extra parameter to hold the function name, like Zahlman said. It works for the moment :) I will try grabbing the instruction pointer and using the .map later, it sounds really interesting :D Thank you -TC
  9. Is there any way I can get hold of the name of a function in C++? I need this for debug purposes. The task system in my game has a lot of callback-functions, and would really like to be able to print out in which callback I'm inside at the moment. I know i can use the __FUNCTION__ macro from inside a function. But that does not work if I'm outside it. /TC
  10. TechnoCore

    Static monsters?

    No, it would be fine! Its all up to how you define the gameplay. If attacking and killing a monster gives you keys for doors and items you give the player a reason to attack them. If he does no kill off enough monster trough out the game, he will not get the right tools to venture further. To make fights more interesting, make it so that the player character cannot flee from a monster while in a fight unless he is successful in an escape dice roll. Some monsters you maybe cannot escape from at all and so on. Let items add to escape skill and let monsters get more nasty and harder to flee from the deeper you get. I think its an excellent idea to design the game without monster movement. You will have a MUCH higher chance at actually completing a playable game if you keep it simple. -TC
  11. TechnoCore

    Virtual Copy Constructor

    Quote:Original post by kauna This line of code looks hazardous. CNpSerializable is a virtual class right? I don't see a way that you can turn a data from string into a CNpSerializable unless you already know what kind of derived class you are expecting. I understand now what you are trying to accomplish, but I think that this isn't the way. Ahh sorry... I removed some stuff on the fly to make it more readable. I hade a container class inside the map.. which only held a void* member var inside it. Didn't want to show you that ugly, did i ;) ..but you caught me. Quote:Original post by kauna This line here, why don't you make it part of the "CDamage" to collect the required information from the "mBlueprintData" or "pCompNode" ? CDamage knows what it needs. Yes I see what you mean. I'll try and implement it like that. I did it this way for simple data-types first, like int's and floats... i.e GetValue<int>( mBlueprintData, pCompNode, "MinRange", m_nMinRange ); GetValue<float>( mBlueprintData, pCompNode, "Size", m_fSize ); With the more complex types like CDamage i ran into trubles :) Thanks!
  12. TechnoCore

    Virtual Copy Constructor

    Thank you Kauna! The copy-function is just what i need for half of my cases... though in the other cases i don't see how the operator can copy the data, since CNpSerializable does not know of it. Anyhow, i didn't show you any code before because there is so much code. Anyhow, here's some of it: In this "ripped" version of the component, all it contains is a member-variable of type CDamage. CDamage : public CNpSerializable. class CCmpWeapon : public ICmpWeapon { public: CCmpWeapon(); virtual ~CCmpWeapon(); // Virtual IComponent methods virtual bool Init(CObjectId, TiXmlNode*, CComponentBlueprintData* ); private: CBpWeapon* mBlueprintData; CDamage m_Damage; }; At the init of a component we use GetData(..) to get "Damage" data for this component. bool CCmpWeapon::Init(CObjectId oId, TiXmlNode* pCompNode, CComponentBlueprintData* pBlueprintData ) { mBlueprintData = static_cast<CBpWeapon*>(pBlueprintData); GetData( mBlueprintData, pCompNode, "Damage", m_Damage ); } Here is the getdata function in the blueprint. It reads an xml-node and tries to store the value through a serialize function in its data type, if no node was found, it reads from the blueprint where the generic component data is stored. bool IComponent::GetData( CComponentBlueprintData* pBlueprint, TiXmlNode* pNode, const char* szId, CNpSerializable& value ) { if( pNode ) { // If we have an xml-node, try and read it TiXmlNode* pThisNode = pNode->FirstChild( szId ); if( pThisNode ) { return value.SerializeLoad( pThisNode ); } } // Otherwise get value from the blueprint return ( pBlueprint && pBlueprint->GetData(szId, value )); } And here is the GetData in the blueprint. It is here my problem comes. bool CComponentBlueprintData::GetData( const char *szTag, CNpSerializable& Value) { CNpSerializable* data; // m_pData is a map with CNpSerializables if( m_pData->Get( szTag, data ) ) { // Here i dont know the size of the data that inherits from // CNpSerializable: Value // Since Value is a direct reference to a member variable, // I cannot use "Clone()" which u described // earlier. // And CNpSerializable does not know of the // "Data& operator=(const Data& D)" which u // described, right? // So this wont work eh? Value = data; return true; } return false; } I could solve this by sending in the size, and using void* pointers, but that feels ugly.
  13. TechnoCore

    Virtual Copy Constructor

    Its for my game. My game-objects are built up from several components. Each component contains different data, like int's, floats or maybe whole classes. I have a "blueprint" class, a kind of template for each component, from which i can instantiate a a specific component. Each blueprint reads data from an XML, using a serialize function and pushes it down into a map. When i want to instantiate an component, i ask the map in the blueprint for a copy of each data i need, and place it in the component. Its now I need to copy the data! Sometimes the data in the component is in the form of a pointer to a class (then i think the clone function you gave me would work just fine) at other times its not in the form of a pointer to data, but as a member variable... then i would need some kind of copy function. Thanks :)
  14. How can i make a virtual copy constructor? If i have an abstract base class like this: (i use it for serialize data) class Base { public: virtual bool Load( TiXmlNode* pNode ) = 0; virtual void Copy( const Base &rhs ) = 0; }; And another inherits from it... class Data: public Base { bool Load( TiXmlNode* pNode ) = 0; void Copy( const Base &rhs ) = 0; } But when i overload Copy in the Data class... i get it in the form of Base... Which complicates things. I would like it to be something like this: class Data: public Base { bool Load( TiXmlNode* pNode ) = 0; void Copy( const Data &rhs ) = 0; } ...err which is impossible... since i store all data in a map, och type Base* ...what should i do?
  15. The routine that creates the dense (original) graph cannot auto-generate nodes that far apart. That routine does several tests to make sure a character can walk across the landscape without getting stuck on a slope or an obsticle of some kind between two of its node points. It would be to hard to rewrite it to work for longer distances. It would be best if it could just reduce the original graph, for a far search and the do smaller searches in the dense graph as characters pass nodes. :) /T
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!