I can't figure out what is wrong

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
Craigspaz
Posts: 33
Joined: June 9th, 2012, 12:23 am

I can't figure out what is wrong

Post by Craigspaz » June 13th, 2012, 3:08 pm

It say's gameover when the face moves around the center of the screen and there is no poo near the face.
Attachments
Files that don't work correctly.zip
The game has some bugs that I can't fix.
(525.63 KiB) Downloaded 143 times
CraigSpaz

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: I can't figure out what is wrong

Post by LuX » June 13th, 2012, 3:26 pm

In your "UpdatePoo" function you have "for( int index = 0; index < NPOO; index++ )" which is used to check collision. The problem comes here: NPOO is the maximum amount of poos, and since you don't have a boolean to check which poos are actually visible, your program now checks collision with all poos, even the ones not visible.

To fix this simply change it to "for( int index = 0; index < nPoo; index++ )" in this case, nPoo being the amount of poos displayed, it will only check collision with all visible poo.

I know chili kinda f'd up this section with the names, you should use more unique names for all the variables. Something like "MAXPOO" and "CurPoo",... etc. But don't worry, you'll learn all this later.
ʕ •ᴥ•ʔ

Craigspaz
Posts: 33
Joined: June 9th, 2012, 12:23 am

Re: I can't figure out what is wrong

Post by Craigspaz » June 13th, 2012, 4:12 pm

Thank's.
CraigSpaz

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: I can't figure out what is wrong

Post by chili » June 14th, 2012, 12:09 am

I DID NOT FUCK UP! :evil:

I was... testing you. Yeah... yeah, that's the ticket... 8-)
Chili

ghilllie
Posts: 72
Joined: May 2nd, 2012, 3:25 am

Re: I can't figure out what is wrong

Post by ghilllie » June 14th, 2012, 7:56 am

chili wrote:I DID NOT FUCK UP! :evil:

I was... testing you. Yeah... yeah, that's the ticket... 8-)
come down bro! Hey, I am at pause of following your tuts I am currently modfying a "call of duty game" for AI zombies formerly "US-Eastern co-op, co-op Zombies modded"
so I might return with your tuts if I'm done with the game :-) I will be practicing my skills first in modding and come back to you later on :-) This is actually fun for me bro so let your student be excused for a couple of weeks :-)
Chili++ for President :)

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: I can't figure out what is wrong

Post by chili » June 14th, 2012, 11:59 am

Sounds kinda like the DayZ Arma II mod. Have fun bro. ;)
Chili

User avatar
magusofmirrors
Posts: 56
Joined: May 12th, 2012, 10:03 pm

Re: I can't figure out what is wrong

Post by magusofmirrors » June 14th, 2012, 8:26 pm

I think modding is quite fun too. I used to mod Starcraft 2 a lot. Have fun with your modding, but remember, the longer you put off game programming, the worse off you will be at it in the end. There is no pressure if this is just a hobby, but regardless, you still should have some fun!
The admins are coming!!!

Image

User avatar
npissoawsome
Posts: 114
Joined: June 8th, 2012, 3:01 pm

Re: I can't figure out what is wrong

Post by npissoawsome » June 14th, 2012, 8:56 pm

chili wrote:I DID NOT FUCK UP! :evil:

I was... testing you. Yeah... yeah, that's the ticket... 8-)
Oh my god, World at War, or Cod 4, I've made a zombie map before, and I'm working on 2 atm :)

Post Reply