Search:

Type: Posts; User: Dogged

Search: Search took 0.01 seconds.

  1. I'll make that change to isPointOnLineSeg,...

    I'll make that change to isPointOnLineSeg, thanks.

    That function didn't work but I decided to make my own replacement.



    // test to see if the point coords are in between the start of the...
  2. How embarrassing that I misspelled calculate...

    How embarrassing that I misspelled calculate twice, opps! Anyway, thanks for reading my code oogabooga. I did notice the missing return false line and added it about a day ago and using a cout...
  3. oogabooga, you confused me!!! My class...

    oogabooga, you confused me!!!

    My class hierarchy is meant to be like this


    GameObject
    |

    Sprite
  4. Actually, I have some more news. I was looking at...

    Actually, I have some more news. I was looking at what grumpy was saying and decided I should look into the inner loop of this function.


    void Worm::WormMove(float elapsedTime)
    {
    int...
  5. Cool, that for the info. I'll make sure to never...

    Cool, that for the info. I'll make sure to never do that again. (I don't want to break the U|\|1\/3r$3 ;))

    Now I played around with the elapsedTime in the function that calls the update of all the...
  6. Errrrrr...... im not sure about the internals...

    Errrrrr...... im not sure about the internals of deque but isn't the objects in _body copied into temp (ie they are now seperate objects) so that the destructor is destroying the objects in _body...
  7. When I had my body in a vector, it broke every...

    When I had my body in a vector, it broke every time it's actual size increased. This creates a new array inside the container so I thought that maybe copying of the segments might be breaking the...
  8. @iMalc - haha, yea I had that thought pop into my...

    @iMalc - haha, yea I had that thought pop into my head. But it would have to be a bit more controlled ;)

    Here is WormBody.h and "my" game loop class

    11855
    11856
    11854
  9. Well, what is meant to happen is that the segment...

    Well, what is meant to happen is that the segment moves in the direction the it is facing and the amount of time passed. After that, it should check if it has passed a messages (which says that it...
  10. I tried what you said grumpy with no luck. Still...

    I tried what you said grumpy with no luck. Still it was worth a shot eh!

    https://www.youtube.com/watch?v=p2v40yEM3G4

    Here is a video of the worm breaking up. As you can see it doesn't happen...
  11. Thanks for the reply. Yes, having a segment...

    Thanks for the reply.

    Yes, having a segment update itself is what I thought of at first but that would require a segment to know about the other segment to send the message so instead the head...
  12. Trouble fixing a critical bug in my WormMove algorithm!

    For those smart coders out there I have a problem which is pushing me to the extent of my knowledge and I need some guidance.

    I Am trying to code a multi-sprite object for a game which is loosely ...
  13. Replies
    3
    Views
    799

    I forgot the pointers like you said and it worked...

    I forgot the pointers like you said and it worked like a treat, thanks!

    @rags_to_riches Noted, I have been slightly changing functions around without changing the name.

    Thanks for the help!
  14. Replies
    3
    Views
    799

    What is happening with this code??

    I have this function that is meant to draw the highscores using a class called fileHandler which manages the highscore.txt file.

    For some reason which I cannot see right now, when I step through...
  15. Replies
    8
    Views
    1,102

    Thanks for that, figuring out that would have...

    Thanks for that, figuring out that would have taken me quite a while to nut out myself.
  16. Replies
    8
    Views
    1,102

    I am not sure what to do. What can I do to...

    I am not sure what to do. What can I do to initialize anything without using a NULL pointer?
    Should I just create a new sprite class pointer for the spriteAddress
  17. Replies
    8
    Views
    1,102

    Hi again, this function is causing me errors at...

    Hi again, this function is causing me errors at runtime now.


    bool sprite::checkSpritePos(std::list<sprite*> spriteList, int xpos, int ypos, sprite **spriteAddress)
    {
    std::list<sprite...
  18. Replies
    8
    Views
    1,102

    Thank you, it was so easy to overlook the two...

    Thank you, it was so easy to overlook the two asterixes.

    I have constructed this function this way as it is an overloaded function depending on if I want to return the sprite or not.
  19. Replies
    8
    Views
    1,102

    problem with classes in a list

    Hi I'm new to this forum so if anything I do is a problem I'm quite sorry.

    I am programming a game at the moment to consolidate my c++ skills, improve and have something to extend when I decide...
Results 1 to 19 of 19