Search found 12 matches

by pupperoni
August 27th, 2017, 3:26 pm
Forum: Everything
Topic: Why is a sprite being created without a Draw function?
Replies: 26
Views: 8980

Re: Why is a sprite being created without a Draw function?

I suppose I was thinking of it backwards. I was thinking that the in_x basically reads and grabs the x, but really it's putting random numbers into the x.
by pupperoni
August 27th, 2017, 2:45 pm
Forum: Everything
Topic: Why is a sprite being created without a Draw function?
Replies: 26
Views: 8980

Re: Why is a sprite being created without a Draw function?

Well I'm trying to think of it in more "concrete" terms. Like if you're solving a problem in math class and you write 24 = x that's weird, but it's not necessarily different from x=24. And it just seems to make more sense to write in_x = x because in_x is the local variable that is created. But I'll...
by pupperoni
August 27th, 2017, 2:17 pm
Forum: Everything
Topic: Why is a sprite being created without a Draw function?
Replies: 26
Views: 8980

Re: Why is a sprite being created without a Draw function?

I...have no idea what I changed.... but I fixed it.

Extra lost but happy it works lmao.

The only change I see is:

Code: Select all

Bone::Bone(int in_x, int in_y)
{
	x = in_x; 
	y = in_y; 
}


is there really a big difference between x=in_x and in_x=x?
by pupperoni
August 27th, 2017, 1:55 pm
Forum: Everything
Topic: Why is a sprite being created without a Draw function?
Replies: 26
Views: 8980

Re: Why is a sprite being created without a Draw function?

I assume the constructor function sets the "x" variable. So first the rng generates a number (with the help of rd) between 0 and 788, which is then put into the in_x spot because of bone#(xDist(rng), yDist(rng)). That sets "x" to that random number, which is then called by bone#.Draw Every time I de...
by pupperoni
August 26th, 2017, 4:52 pm
Forum: Everything
Topic: Why is a sprite being created without a Draw function?
Replies: 26
Views: 8980

Re: Why is a sprite being created without a Draw function?

I am driving myself crazy. I watched through tutorial 12/homework 12, and I encapsulated my code. However, now the random generator is throwing numbers way too big. I went to the wiki page for 13 and downloaded the starting code to compare to what I have. game.h and game.cpp were exactly the same ex...
by pupperoni
August 17th, 2017, 12:56 am
Forum: Everything
Topic: Why is a sprite being created without a Draw function?
Replies: 26
Views: 8980

Re: Why is a sprite being created without a Draw function?

Alright, I had to upload a slightly older version but it is nonetheless fully functional. Here's the github link. I mean, it's 100% the poo game but with a dog but nonetheless...I learned to do it in 3 days and I'm proud. :D I physically counted/mapped the pixels for the dog + bone sprites, but I us...
by pupperoni
August 15th, 2017, 2:40 pm
Forum: Everything
Topic: Why is a sprite being created without a Draw function?
Replies: 26
Views: 8980

Re: Why is a sprite being created without a Draw function?

Thanks, your comment was correct! I had a couple other bugs with the collision but after about 7 hours I finally fixed them all lol (and got rid of unnecessary code) But now my dog game is a success! I wanted to upload it here but even with only the Engine and License folders and the .sln, it was 14...
by pupperoni
August 14th, 2017, 12:27 am
Forum: Everything
Topic: Why is a sprite being created without a Draw function?
Replies: 26
Views: 8980

Re: Why is a sprite being created without a Draw function?

If anyone one like to take a look, this is the current code. I have commented out both attempts at collision. The "IsColliding" code (the second commented section) results in bones being eaten if the dog is anywhere to the left of them. The "if (colliding)" code (first commented section) results in ...
by pupperoni
August 14th, 2017, 12:04 am
Forum: Everything
Topic: Why is a sprite being created without a Draw function?
Replies: 26
Views: 8980

Re: Why is a sprite being created without a Draw function?

Im not sure if it is the case as im a nooboid but by the looks and with a quick test you were calling your draw function twice each frame. so your 'if' statement called a draw then compose frame called the draw. getting rid of the compose frame calls didnt stop the ones in your if statement. pressi...
by pupperoni
August 12th, 2017, 4:18 am
Forum: Everything
Topic: Why is a sprite being created without a Draw function?
Replies: 26
Views: 8980

Re: Why is a sprite being created without a Draw function?

The code goes: define left if (left) { Draw the dog backwards } else { Draw the dog forwards } I'm not sure why you're suggesting there is a missing bracket, or it's simply too close to the "D" for you to distinguish. Once again, the issue was fixed, and I did not keep a zipped copy of the malfuncti...