updated version of my FIRST GAME!!!
Author |
Message |
vagyb
|
Posted: 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
Description: |
|
![](http://compsci.ca/v3/pafiledb/images/icons/clip.gif) Download |
Filename: |
Final Game.zip |
Filesize: |
41.71 KB |
Downloaded: |
246 Time(s) |
|
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: 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 I think you should make it just a bit easier to keep user interested, not frustrated with the game
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
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
Delos
![](http://www.members.shaw.ca/rfolz/delos_avatar.gif)
|
Posted: 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
|
|
|
|
|
![](images/spacer.gif) |
the_short1
|
Posted: 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
|
|
|
|
|
![](images/spacer.gif) |
blackwhite
![](http://content.neopets.com/guilds/n/e/neo_xplorer_logo.jpg)
|
Posted: Tue Jul 13, 2004 4:30 pm Post subject: (No subject) |
|
|
my score: 15 yeah, it is a bit difficult
|
|
|
|
|
![](images/spacer.gif) |
vagyb
|
Posted: 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.
|
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: 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.
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
|
|