Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Avoid Racers
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
r.m_spy




PostPosted: Fri Nov 30, 2007 2:12 pm   Post subject: Avoid Racers

best game ever made


avoid_racers.t
 Description:
r.m_spy's "avoid racers" game

Download
 Filename:  avoid_racers.t
 Filesize:  41.78 KB
 Downloaded:  209 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Saad




PostPosted: Fri Nov 30, 2007 2:22 pm   Post subject: RE:Avoid Racers

First thing is that don't post a 1300 line long code instead attach it.

There is soo many bad things with this code, the major one being a poor use of procedures and loops , there is alot of redundant code.

Variables are named really poorly, also it seems like CentreFont was stolen from someone else's code.
Carey




PostPosted: Fri Nov 30, 2007 2:26 pm   Post subject: RE:Avoid Racers

Try using code tags next time. Also try using "offscreenonly" to reduce the flickering. Also please look around before you declare it the "best game ever made". cause it's really not. look in the sticky "Best of ......." for the best programs.


sorry if im being too harsh, its how I feel.

Edit: Crap. Beaten to the post
r.m_spy




PostPosted: Fri Nov 30, 2007 4:13 pm   Post subject: Re: Avoid Racers

I will consider your thoughs next time I post a game. I'm sorry for any inconvinience I may have caused. thank you for your support
darkangel




PostPosted: Fri Nov 30, 2007 5:21 pm   Post subject: Re: Avoid Racers

GAH!!! the code ..... it burns the eyes
Wolf_Destiny




PostPosted: Sun Dec 02, 2007 7:53 pm   Post subject: Re: Avoid Racers

So basically, I agree with just about every post above this one. Use code tags, attach ridiculous code, a lot of redundant code, and looking at it does kinda burn the eyes.

Biggest thing: Use procedures to save code, not make more! They aren't just pretty boundaries for your code, they're there to make your code smaller, and easier to read (aka NOT 1300 lines)
For instance this block:
code:
if x=1 then
drawfillbox(v,100,v+10,110,brightblue)
elsif x=2 then
drawfillbox(v,120,v+10,110,brightblue)
elsif x=3 then
drawfillbox(v,120,v+10,130,brightblue)
elsif x=4 then
drawfillbox(v,100,v+10,90,brightblue)
elsif x=5 then
drawfillbox(v,80,v+10,90,brightblue)
end if

Is found on lines: 50, 121, 417, and 483
Why is that?? The same block of code should not be in so many places!!

Second biggest: Your variable names shouldn't be one letter long! It's one thing to have:
code:
for a : 1..10
put a
end for

But if you put:
code:
for a : 1..10
put b(a)-c
end for

There's a bit of a problem. I have no idea what the heck those variables mean except for a. And I'm too lazy to sort through your code, it should be more apparent!
IE
code:
for a : 1..10
put player_health (a) - damage
end for


Beyond Biggest Problem: Blatant Plagiarism
You know that block of code that you copy and pasted? Yeah, it's really obvious. It doesn't match your style of coding, at all. It's Stolen
r.m_spy @ Fri Nov 30, 2007 2:12 pm wrote:
procedure CentreFont (s : string, x, y, f, clr : int)
var w : int := Font.Width (s, f)
Font.Draw (s, x - w div 2, y, f, clr)
end CentreFont

In fact so is this line:
code:
var announceFont : int := Font.New ("Sanserif:50:bold")

Seriously it was very easy to spot, the variable names are much different than yours. Compare: "CenterFont" and "announceFont" with "on","sc","v","life","gameo"and"k"
I'm not trying to criticize you, well I am, but constructively. If you handed that in, I'd be pretty surprised if your teacher didn't notice, and zero you. Besides that, if you copy code you'll be screwed come exam time. Seriously, I've got a First-Year University Java exam coming up. All on paper so that you can't cheat, and you can't consult the help docs.
On a slight side note read this: http://compsci.ca/blog/ways-to-spot-plagiarized-code/

~Wolf_Destiny

P.S. Sorry, but your variable k especially bothers me. Why the hell is that your character array? Use something better, like "chars" or something.
P.P.S. Before it gets pointed out by someone else (which it would have eventually, because people seem to delight in pointing this out[take me for example])
Really minor issue, but use "Rand.Int" instead of "randint". The use is a little different, but I'll let you look it up instead of giving you a code snippet, cause that's how you learn.
P.P.P.S. Since 2:12 on Friday, you posted five programs. Why couldn't you just post them all together? As attachments, you know, one thread kinda thing. Instead of five. Unless of course you're just posting programs as you make them. But really you should be posting your best, not uploading your every file.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: