Computer Science Canada

Relative motion(pretty challenging)

Author:  AsianSensation [ Wed May 07, 2003 9:47 pm ]
Post subject:  Relative motion(pretty challenging)

I have been working on my final game, so far so good. However, there is one thing that's not working, the relative motion thing. Let me explain first, the game features 2 run windows, whatever a player do on one window, the other player should be able to see it if they are in range. So far, I can get the characters to see each other when they are moving.

The problem is that when firing the bazooka, I can't get the one player to see the projectile fired by the other player. Also, when one player is firing the weapons, the other player can't fire, so if there is anyway somebody could fix this problem for me, I would be very grateful.

If anyone needs to see the code, I will post it up later.

Author:  Catalyst [ Wed May 07, 2003 9:50 pm ]
Post subject: 

to be of any help id prob need to see the code

Author:  AsianSensation [ Wed May 07, 2003 10:05 pm ]
Post subject: 

Ok, here is the code, along with the pictures.

one note, for player one, which is Mario, WASD is used to move, and spacebar to shoot.

for player two, which is Peach, arrow keys are used to move, and 0 is used to shoot.

Author:  Asok [ Wed May 07, 2003 10:09 pm ]
Post subject: 

I haven't attempted anything like this before so I can't be much help, let me just say I think this is really cool and I'm looking forward to the finished one.

Author:  Catalyst [ Wed May 07, 2003 10:35 pm ]
Post subject: 

i agree it very cool Very Happy
i browsed your code and saw you never drew the bazooka in the other window

Author:  AsianSensation [ Wed May 07, 2003 10:44 pm ]
Post subject: 

I try to draw it, but I can never get it to work, that's why I didn't include that part. I am hoping someone could help me with that part.

Author:  Catalyst [ Wed May 07, 2003 10:51 pm ]
Post subject: 

when i looked at it i also tried drawing it but it never came....

Author:  Tony [ Wed May 07, 2003 11:03 pm ]
Post subject: 

awesome idea 8)

as for not being able to fire both bazookas at same time...

the problem is that "charging" the bazooka is inside a loop and that prevents any other controls untill projectile is fired... have you tried moving while one player is charging his bazooka? well you cant Confused

the solution as I see it is to charge bazooka one point at a time. Keep a flag that says that bazooka is charging and by house much... and when you press the fire key, it charges bazooka one more point then returns to check for other controls such as movement... I suppose this will also allow you to charge your weapon and run around at same time 8)

Author:  Homer_simpson [ Wed May 07, 2003 11:03 pm ]
Post subject: 

If it's one thing i suck at(other than the other thing's i suck at... Rolling Eyes ) it's reading other people's code... i can barely even understand my own after 5 mins...
but i looked at yer program... i tried drawing the bazooka2 effect manually it doesn't draw for some so very odd reason... =/
and ONE MORE THING (AYAAAA.... as the chinese always say...) when i change the active window it seems to mess up the whole program... it's like frozen and you cant do nothing but to restart da program =(

Author:  hello [ Thu May 08, 2003 10:26 am ]
Post subject:  ok Meng ur messed up

meng why are u making fun of other people that need help
just because we are not as good in turing as u
does not mean u can just make fun of us
u were once that bad too
u cannot be better without practice and help form others
meng why do u take away our need for help
jeeezzz
u have no respect for those below u

Author:  hello [ Thu May 08, 2003 10:26 am ]
Post subject:  I forgive u

Meng i forgive u...

Author:  DaRkVyRuZ [ Thu May 08, 2003 10:33 am ]
Post subject: 

anyone mind puttin the code on a page??
cuz i cant download the file with the schools security settings T_T
and by the look of the replies... it seems cool...
so if anyone got time.. pls help me out...
Very Happy

Author:  Prince [ Thu May 08, 2003 10:35 am ]
Post subject: 

riigghhhh Confused Confused... wtf r u talkin about now?

Author:  Tony [ Thu May 08, 2003 10:37 am ]
Post subject: 

your school is pumped on drugs if they're installing a security to now allow you to download files...

Plz dont post source in the reply, it takes up huge amounts of bandwidth as the code esensially gets downloaded per every view

Author:  Prince [ Thu May 08, 2003 10:38 am ]
Post subject: 

our skool must b on drugs then cus we're locked out of jus about errythin... stupid milliken Evil or Very Mad

Author:  DaRkVyRuZ [ Thu May 08, 2003 10:41 am ]
Post subject: 

ehhh
i am from milliken tooo....
some idiot got some stoopid virus and now
none of the school's computer can download any files...
how sad.. curse those idiot who go to p0rn site and get some
a55hole virus

Author:  Tony [ Thu May 08, 2003 10:42 am ]
Post subject: 

my school is awesome... we got P4s and the only thing we cant do is install stuff... though I can always ask my teacher to log in as admin and install w/e I want...

what's even cooler is that I got my personal computer in school (well... about only 3 other people can access it... mostly mine)... freshly formated with full rights. I'm not sure of its specs though... 1.something Ghz with 213 MB RAM (thats right... 213)

Author:  Homer_simpson [ Thu May 08, 2003 10:59 am ]
Post subject: 

At least you dont have uniform and dont get suspended for lil things...

Author:  Homer_simpson [ Thu May 08, 2003 11:14 am ]
Post subject: 

hehe i can install whateva i want without logging in as an admin....

Author:  Tony [ Thu May 08, 2003 12:06 pm ]
Post subject: 

i do have uniform Confused And my principal and vice principals yell at me cuz my shirt is untucked... grr... it's soo uncoumfortable with that shirt up my ass Evil or Very Mad Whoever thinks that you look good when your shirt is tucked should be beaten. They dont know what they're talking about Rolling Eyes

Author:  AsianSensation [ Thu May 08, 2003 3:41 pm ]
Post subject: 

I know what these people are talking about, Vincent Massey also disabled download in all of our computers, and you know what? they even limited our printing abilities, each student only get $5.00 in printing money, and whenever they print something, it costs 5 cents, that is so gay, especially since I'm so lazy, and I never write, so I am on the verge of running out of money.

Btw, could people please try to help me on the game, we are kinda getting off topic here.

Author:  Asok [ Thu May 08, 2003 4:42 pm ]
Post subject: 

see these restrictions are exactly why I bypass network security Very Happy

more pr0n for me! Laughing

Author:  Homer_simpson [ Thu May 08, 2003 6:26 pm ]
Post subject: 

wow that does suck....=/
we haveto pay 10 cent per print but no restrictions and if u know the address to room printers u can print for free...

Author:  AsianSensation [ Thu May 08, 2003 9:00 pm ]
Post subject: 

Ok, nevermind people, I fixed it on my own, it turned out to be just adding some Input.KeyDown in various places and I could move and fire at the same time.

That Frame per Second thing that I "borrowed" from the Turing game really helped, it slows down the game when it gets to fast, and speed it up(relatively) when it gets too slow. I suggest people use that for any real time game.

Homer, the reason that the game froze when you switch active window manually is because i didn't set the other window to receive input, I think I should do that, but it's not really that important now, now I have to work on some new weapons, so please people, feel free to give me some suggestions.

Author:  Tony [ Thu May 08, 2003 10:35 pm ]
Post subject: 

what I think you should do is make the 3rd window in the middle of the screen. Its the one that will be active and take input...

now in this 3rd window you can have general information for both players... like scores, controls, some other GUI info...


: