Advertisement Jump to content
Sign in to follow this  
xSKOTTIEx

where does it go?

This topic is 4938 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i have a pure virtual base class for entities, called cObject, with basic methods: update( float timeDelta ); render(); setPosition( int x, int y ); ////etc i derive off of this class for sprites, animations, particle systems.. all renderable objects. the only problem is.... the particle system one doesnt work. i add them to objectLists that old cObjects. and if i write to my log file every time cParticle::render() is called... i check the log and its not there. so when i add this particle to the list and i call objectList->render() (Which just calls render for all of the objects ) it doesnt seem to be called the cParticle's render method. any clues why?

Share this post


Link to post
Share on other sites
Advertisement
have you debugged the code at all? This will tell you exactly what is going on, when a function is getting called, and where it's getting called from. It's pretty much impossible to tell you what's going on without seeing any code, so either post your code here or use your debugger assuming you have one. Debugging is your friend and will be able to tell you what's going wrong better then anyone.

Share this post


Link to post
Share on other sites
Can you paste your particle class (the definition should be enough), maybe you haven't overwritten the render function.

Share this post


Link to post
Share on other sites
actually i did overload the render method, but i found the problem. i have an isActive() method that tells the object list if the sprite should be deleted or not. my logic for this was flawed with the cParticle class (i was doing it based on particle count, not lifetime ) but now it works fine. thanks anyway.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net 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!