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

Username:   Password: 
 RegisterRegister   
 I need help with my isu!!!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
sam21292




PostPosted: Sat Dec 29, 2007 3:44 pm   Post subject: I need help with my isu!!!

I am doing a car race, and i can animate my cars at different speeds, but i need more ideas. i want to know how to put different types of obstacles, how to control the cars, and do i have to create it all over again just to get the cars to move on the tracks that i want to add? i want some advice on these things, plz. Confused


isu.t
 Description:
there are comments to explain each step.

Download
 Filename:  isu.t
 Filesize:  12.07 KB
 Downloaded:  209 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
syntax_error




PostPosted: Sat Dec 29, 2007 5:17 pm   Post subject: Re: I need help with my isu!!!

if you are looking for help this is the wrong area to post it
go to turing help here
Euphoracle




PostPosted: Sat Dec 29, 2007 6:08 pm   Post subject: RE:I need help with my isu!!!

Sometimes I wonder how people can confuse the word SUBMISSION with the word HELP, let alone totally avoid the forum descriptions, which clearly define the purpose of either.
fishtastic




PostPosted: Sat Dec 29, 2007 8:51 pm   Post subject: Re: I need help with my isu!!!

sam21292 @ Sat Dec 29, 2007 2:44 pm wrote:
I am doing a car race, and i can animate my cars at different speeds, but i need more ideas. i want to know how to put different types of obstacles, how to control the cars, and do i have to create it all over again just to get the cars to move on the tracks that i want to add? i want some advice on these things, plz. Confused


nice background.
this is actually kinda good.

make it a typing game.
when ever the car goes on a obstacle, ask the user to input a letter using input.keydown
if you finish it fast you get a acceleration or something like that.

you have too much comment, only comment the confusing parts
i will dont comment my code even it is 1.5k lines long Rolling Eyes
sam21292




PostPosted: Sun Dec 30, 2007 10:14 am   Post subject: RE:I need help with my isu!!!

hey thanks man!
sam21292




PostPosted: Sun Dec 30, 2007 10:28 am   Post subject: RE:I need help with my isu!!!

fishtastic, can you teach me how to put typing while the program is running, because I put an if statement to comment on how many laps are left whenever the car goes through a for loop. I've posted my new program in the HELP section with a some changes, but I still can't get rid of that problem. And I need help with your suggestion because I can't seem to get it to work.
sam21292




PostPosted: Sun Dec 30, 2007 10:37 am   Post subject: Re: I need help with my isu!!!

I'll post my updated version. Please check to see if there is anything that I can improve on, and if there is anything that is not needed. I have a long if statement that doesn't work as well.


isu.t
 Description:

Download
 Filename:  isu.t
 Filesize:  12.67 KB
 Downloaded:  196 Time(s)

fishtastic




PostPosted: Sun Dec 30, 2007 2:14 pm   Post subject: Re: I need help with my isu!!!

sam21292 @ Sun Dec 30, 2007 9:37 am wrote:
I'll post my updated version. Please check to see if there is anything that I can improve on, and if there is anything that is not needed. I have a long if statement that doesn't work as well.



Ahh... process...
don't use process,
it is hard to control the speed of your program if you used process.

instead use something like
Turing:

% define stuff
loop
cls
% draw stuff
% calculate stuff
delay (5)
View.Update
end loop


this allow you to control when and how everything is drawn or calculated
then you can change the speed of your car by adjusting the frequency of the procedure being ran.

this tut by DanShadow explain how to get keys
and this also tells you why you should not used process

to get the time it took to press a key
use Time.Elapsed before and after key press so you can get the time difference.

those are just some big ideas,
if you still have question just look at the turing tutorial section. they cover everything.

good luck.
:-)
Sponsor
Sponsor
Sponsor
sponsor
sam21292




PostPosted: Sun Dec 30, 2007 5:27 pm   Post subject: RE:I need help with my isu!!!

Thanks, but if I use only the loop, then I will only get one type of speed. I need the speed of the car to be consistent, and the speed of the car should change in the obstacle, so shouldn't there be two types of speeds? In my program, there is a for loop that decides what speed the car will travel at, and in the for loop there is an if statement that decides the speed of the car when it hits an obstacle. Is there a way to modify the program so that it can change the speed of the car when it hits an obstacle without using delay? Anyways, I'll try to use what you suggested, but there is still one thing that I still can't fix, and that is to put fonts to show the progress of the user's. I was able to display the progress, but that only worked after I took out the View.UpdateArea. Should I use View.Update instead? Won't it slow down the animation?

After reading why process shouldn't be used, I figured out why my first animation was so corrupted. See, what happened was that I was able to get the three cars to move in processes, but when I animated them, the bottom two always distorted while they were moving. When the race starts, everything seemed fine, but then all of the sudden one car goes on the other cars track, which is completely seperate from it, and sometimes the other car comes down to it's track. And all of this happened for a split-second. It didn't even erase properly. Even this new program sometimes distorts, although not as much. Before I read the tut, I was thinking that something was wrong with the compiler. Surprised

I am thinking about using Input.Keydown to allow the user to make the car move, but when I try to put in a View.Update and a View.Set as offscreenonly, I don't see the car at all, but when I stop the program, I see the car where it was supposed to be. The problem is in this newer version of my program. What's wrong?

The arrow keys are to move, and that is all my car can do. It only moves at one speed, so the user can't pick a different speed for his/her car.



isut.t
 Description:

Download
 Filename:  isut.t
 Filesize:  14.61 KB
 Downloaded:  196 Time(s)

Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: