Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

174 Neutral

About dustin10

  • Rank

Personal Information

  • Interests
  1. You can use the "tag" property of the UIButton class to identify the buttons. You can set it in Interface Builder. If you hook up the "touch up inside" event of all the buttons to the same IBAction then you can do something like this: - (IBAction)buttonClicked:(id)sender { UIButton *button = (UIButton*)sender; // maybe have an NSArray of Card objects that maps the tag to the index in the array Card *card = [cardsMap objectAtIndex:button.tag]; // now card is the one that was pressed }
  2. dustin10

    [web] PHP

    Just a guess, but it sounds like you are using "#" as the href attribute for the a tag and then using javascript to popup the larger image. Try putting "return false;" at the end of your onclick function. That way it wont actually try to find the anchor.
  3. dustin10

    [DX10] loading/compiling effects

    If you don't precompile them then look at the D3DXCompileFrom* functions.
  4. Is the position vector at the upper left corner of the sprite or in the middle of the sprite?
  5. dustin10

    player move movement

    Does your Player.Move function take the coordinates of the point to move to or the distance the player should move in the x,y directions?
  6. You could have a PhysicsComponent that takes care of all of the physics related attributes of an entity. (position, velocity, etc.)
  7. Quote:Original post by Kylotan Why is this in web development? There's nothing web specific in your post so I wonder whether there's some hidden information we need to answer your question properly. Secondly, who is calling these public functions, and what language is this? The target audience and their expectations and experience shape the sort of features you want to expose. Generally I would steer away from any run-time inspection of types. When you start doing that you have to decide what to do when the type is wrong, which often results in setting flags or error values which can too easily be ignored by calling code. (Unless you have exceptions, which changes things, but you've not specified the language.) It looks like ActionScript to me and I agree with you.
  8. MATCH .. AGAINST To use the MATCH .. AGAINST I believe your table must be MyISAM and you have to have a FULLTEXT index on the column you are searching. If you are using InnoDB then the easiest way is to do a LIKE query with the % wildcard on either side of your search string. i.e. SELECT * FROM table WHERE column LIKE '%Video Games%' Obviously this only gives results that contain the exact characters you are looking for. The MATCH .. AGAINST will order the results by relevancy by default.
  9. dustin10

    testing an executable jar file

    Google for System.setOut() and System.setErr(). You should find plenty of tutorials.
  10. dustin10

    Simple X File Question

    It looks like you are providing your triangles in a clockwise order. Try counter-clockwise.
  11. dustin10

    Texturing a terrain

    You could just divide up your terrain into discrete chunks and render each one separately using the texture for that 8x8 chunk.
  12. Thanks for the quick replies. I see your point about the switching. Any advice on a possible solution? Right now my Entity class only has an AttachComponent method. Should I make a ReplaceComponent<T> where it finds the component specified and then removes it and replaces it with the new one? This is the first time I have tried a component-based entity implementation. Sorry if I am a little naive.
  13. I am working on my component-based entity system still and I have made good progess. I have my Entity class set up so I can call FindInterface<T> on the entity object and get a boost::shared_ptr<T> from that call. That all works great. My component system is basically as follows. I have an IComponent interface that all components inherit from. I have an ISystem interface which all of the systems that monitor the components inherit from. More specifically, I have a RenderSystem object which creates components of type IRenderComponent (where IRenderComponent inherits from IComponent, and RenderSystem inherits from ISystem). I want my RenderSystem object to be able to create different types of IRenderComponent implementations with a single call to the CreateComponent method . So, if I have a SpriteComponent and a MeshComponent that both inherit from IRenderComponent, I would like to be able to use the RenderSystem object to create either of these instead of creating a SpriteSystem and a MeshSystem. I was thinking maybe the CreateComponent method could be templated. Something like RenderSystem->CreateComponent<MeshComponent>(), but I'm not really sure how that would work. I was also thinking maybe of having a std::map of a string to a function pointer so that i could pass CreateComponent a string and it would call the function that mapped to the string passed in. Does anyone have any other ideas or any experience with this? Edit: I meant to post this in Game Programming. Can a mod move it?
  14. Did you call ID3DX10Sprite->Begin() before you started drawing and then call ID3DX10Sprite->Flush() and ID3DX10Sprite->End() after? Did you set the matTransform of the D3DX10_SPRITE structs? Did you set the view transform and projection transform of the ID3DX10Sprite? Is the HRESULT of the call to DrawSpritesImmediate() S_OK?
  15. dustin10

    How to output odd numbers in java?

    public void printOdds( int num1, int num2 ) { int min = Math.min( num1, num2 ); int max = Math.max( num1, num2 ); for ( int i = min; i <= max; ++i ) { if ( i % 2 == 1 ) { System.out.println( i ); }
  • 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!