line wars!

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
joelyboy94
Posts: 67
Joined: October 11th, 2012, 7:34 pm

line wars!

Post by joelyboy94 » December 8th, 2012, 4:38 pm

Hey guys,

just finished lesson 19 and thought I'd show you guys my work, it's a simple 2 player game where the aim is to not go outside the box, not hit your line, or the other player's line.

player 1 controls - up, down, left right.
player 2 controls - w,a,s,d.

when someone wins, their colour is displayed in the corner :)

IMPORTANT - you must right click on chili framework and go to properties - v110 if you are using visual studio 2012 and v100 if you are using 2010.
Attachments
tron_mp_download.zip
(42.57 KiB) Downloaded 280 times
Last edited by joelyboy94 on December 17th, 2012, 9:34 pm, edited 3 times in total.

poschi
Posts: 9
Joined: November 28th, 2012, 1:08 am
Location: Germany

Re: line wars!

Post by poschi » December 8th, 2012, 5:20 pm

Have you changed your VC++ directory for your include files in the project? :roll:
Because it is not linking to the standard directory, and I get a error if I try to compile it.(Have to change the include diretories).
Last edited by poschi on December 8th, 2012, 5:22 pm, edited 1 time in total.

User avatar
joelyboy94
Posts: 67
Joined: October 11th, 2012, 7:34 pm

Re: line wars!

Post by joelyboy94 » December 8th, 2012, 5:21 pm

umm don't think so, is it not working?

poschi
Posts: 9
Joined: November 28th, 2012, 1:08 am
Location: Germany

Re: line wars!

Post by poschi » December 8th, 2012, 5:48 pm

By the way, is there a reason for using __ as variables?
Just asking because you should not do that. This kind of variables are actually reserved.

See also:
http://stackoverflow.com/questions/2287 ... identifier
First answer.


Anyway, good job, works like a charm :mrgreen:

User avatar
joelyboy94
Posts: 67
Joined: October 11th, 2012, 7:34 pm

Re: line wars!

Post by joelyboy94 » December 8th, 2012, 6:51 pm

I used the underscores to help me distinguish the parameter variables from the actual variables, but ok, didn't realise that, thanks for pointing it out :)

Also, didn't realise instead of using an overly convoluted if statement in the end of the boundary check function I could use the predefined min and max functions :lol:

and thanks, means alot!

Clodi
Posts: 175
Joined: November 18th, 2012, 7:47 pm

Re: line wars!

Post by Clodi » December 8th, 2012, 10:43 pm

it doesn't work. it doesn't compile.

Poschi, how did you fix the problem?

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

Re: line wars!

Post by LuX » December 8th, 2012, 11:17 pm

Cool game, it's like tron. Or actually it IS tron : -P

The problem should be fixed if you change the toolset from the project settings v110 -> v100. That's the thing to look at first if the program doesn't link properly.
ʕ •ᴥ•ʔ

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

Re: line wars!

Post by chili » December 9th, 2012, 10:05 am

Nice work, I'm always glad to see people sharing their work. Good code organization and style (except for the underscore thing). I like that you use an Enum (they don't get enough love IMO).

HOWEVER, minus 1 billion chili points because you DIDN'T CLEAN YOUR SOLUTION! :evil:

It is huge and it will kill all of our collective bandwidthses. Unacceptable. Redo.
Chili

User avatar
joelyboy94
Posts: 67
Joined: October 11th, 2012, 7:34 pm

Re: line wars!

Post by joelyboy94 » December 9th, 2012, 3:10 pm

It only vaguely resembles tron :P

and thanks Chili; sorry about the cleaning, i've done it now :)

cameron
Posts: 794
Joined: June 26th, 2012, 5:38 pm
Location: USA

Re: line wars!

Post by cameron » December 13th, 2012, 1:32 am

Still doesn't compile for me.
Computer too slow? Consider running a VM on your toaster.

Post Reply