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...
Type: Posts; User: Dogged
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...
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...
oogabooga, you confused me!!!
My class hierarchy is meant to be like this
GameObject
|
Sprite
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...
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...
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...
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...
@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
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...
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...
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...
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 ...
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!
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...
Thanks for that, figuring out that would have taken me quite a while to nut out myself.
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
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...
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.
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...