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

Username:   Password: 
 RegisterRegister   
 updated version of my FIRST GAME!!!
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
vagyb




PostPosted: Sat Jul 10, 2004 8:03 am   Post subject: updated version of my FIRST GAME!!!

i dont have a name for it yet, but i finally updated it again. this is my first "complex" game ever on turin so cut some slack lol Smile


Final Game.zip
 Description:

Download
 Filename:  Final Game.zip
 Filesize:  41.71 KB
 Downloaded:  238 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sat Jul 10, 2004 1:42 pm   Post subject: (No subject)

nice, it's much more interesting now, but the meteors seem to be moving too fast (even on my computer) and I die within 10 seconds Laughing I think you should make it just a bit easier to keep user interested, not frustrated with the game Wink

such as slow down the meteor movement just a bit and/or make less of them.

an ideal solution would be to drop down those values, but then slowly increase them as the game progresses
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Delos




PostPosted: Sat Jul 10, 2004 3:42 pm   Post subject: (No subject)

1)
Ditto tony

2)
Instead of your 'getKey' procedure, it would be far easier to use an Input.Pause() routine.

3)
wallclock...ummm why!
Time.Elapsed() works very well. And you can use the same sort of idea...set a var to Time.Elapsed()'s value as the game begins, and then check that against the Time.Elapsed() return value when the game ends...

4)
"% end loop"
That had better not be an in-code comment...coz' if it is...wow...that'd be just a tiny bit depressing.

5)
You can declare more than 1 variable on a single line:
code:

var num1 : int
var num2 : int
var num3 : int

can be written as
code:

var num1, num2, num3 : int

or even as
code:

var nums : array 1..3 of int


6)
Looking at your code and use of variables, you should really consider using types.

Confused?
Good.

Read these...will show you much interesting stuff:

Arrays by tony
Arrays by Dodge
Records and Types by Dodge
And while you're at it...
High Scores List by Dan
the_short1




PostPosted: Sat Jul 10, 2004 5:59 pm   Post subject: (No subject)

good for a first program..


here is a couple code saving tips:

code:

var boulderWidth : int
boulderWidth := Pic.Width (boulderPic)
 if boulder1X + boulderWidth <= 0 then
        boulder1X := maxx
        randint (boulder1Y, 1, maxy) %makes the placement of the astroids random after the first time they come
    else


instead of making variables for each boulder size... u can do this..

code:

if boulder1X + Pic.Width(boulderPic) <= 0 then %% notice the difference?
        boulder1X := maxx
        randint (boulder1Y, 1, maxy) %makes the placement of the astroids random after the first time they come
    else



saves tons of lines of code.. cuz then u dont have all those variables..
and makes it cleaner/.

also... look into arrays as mentioned.. i wish i learned them earlier... my teacher would not teach me (until near end of year) .. and i ended up having to learn them myself.. but if i knew them earlier it woulda saved tons of time..


also... if u have a variable .. to save time..
instead of
code:

var boulderPic : int
boulderPic := Pic.FileNew ("boulder.bmp")

u can go
code:

var boulderpic : int := Pic.FileNew ("boulder.bmp")

u can make a variable have a value on the same line!

even works like this..

var b1,b2,b3 : int := 1

now b1,b2, and b3 all equal 1

but u even used non-default fonts! thats WICKED... very good for a first program.. looks like u did the research (turing reference) to get what u wanted done!

Font.Draw ("Created by: Vagharshak Bakhshyan", 100, 200,Font.New ("sherif:16), 40) %%% u can include the font.new in the same line isntead of making var font1 : int


(see other thread i gave u 7 bits)

hope that helps u to enjoy coding better /and make it easier..
./. keep producing the good stuff
blackwhite




PostPosted: Tue Jul 13, 2004 4:30 pm   Post subject: (No subject)

my score: 15 Smile yeah, it is a bit difficult
vagyb




PostPosted: Fri Jul 23, 2004 6:38 am   Post subject: (No subject)

oh alrite thx alot for the reply guys, the problem is that if i do it on my computer its pretty slow hehe.

and tony i thought bout making it slower, then increasing speed. i have to get a bit more experience before i do that.

for now i'm practicing creating macro's, but once i'm done with that i'll get back to turing.
Tony




PostPosted: Fri Jul 23, 2004 5:38 pm   Post subject: (No subject)

vagyb : for the increased speed, reduce the delay with a simple time related function, such as
code:

loop
put "*"..
delay(100 - round(Time.Elapsed/100))
end loop


though the acceleration is quite rapid, but that's just for the example's sake. Adjust the function as needed.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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  [ 7 Posts ]
Jump to:   


Style:  
Search: