Author |
Message |
allenh98
|
Posted: Wed May 30, 2007 9:30 pm Post subject: Procedures dont get run |
|
|
First of all, my teacher says that he has a program to seach for the % of matches on an Internet page. So does that mean if I post my script here for help, that he will bust me for cheating?
If as the enemy comes near me, and I shoot a missle, only the missile moves, everything else stops. Is there anyway to have two for-loops running at the same time so that my background, my plane, and the enemy are still moving? If i use a process for shooting, everything else still moves but processes screw up my program and my missiles move faster and faster each time.
If there is anyway to safely post script, I will give more details. Thanks in advance for your help.
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
CodeMonkey2000
|
Posted: Wed May 30, 2007 9:51 pm Post subject: RE:Procedures dont get run |
|
|
Just incooperate the two for loops into one main loop. BTW, I've never heard of teachers doing that. I think he's bluffing. If you are that paranoid, just put your name on the code so your teacher knows it's you and you will have proof for it.
|
|
|
|
|
|
aramadia
|
Posted: Wed May 30, 2007 9:54 pm Post subject: RE:Procedures dont get run |
|
|
Please do not run two for-loops. Stick to a simple single-threaded model since you are using Turing which is not exactly a capable language. What you need is a primary "game loop" which is the main for loop. Then in the main loop, execute commands to move a missile for one frame : this should only move the missile by a pixel or two (don't use another loop here).
For the code, it is highly unlikely that google will index your code if you attach it rather than directly copying it.
|
|
|
|
|
|
allenh98
|
Posted: Wed May 30, 2007 10:09 pm Post subject: RE:Procedures dont get run |
|
|
So I should only have one main loop (loop A)? Because what I'm seeing is that if I have another loop (loop B) running, loop A will stop running and wait for loop B to finish, the loop A will continue. Is this right?
|
|
|
|
|
|
aramadia
|
Posted: Wed May 30, 2007 10:13 pm Post subject: RE:Procedures dont get run |
|
|
Yep. So have one loop - called lets say the game loop. Any other loops should be relatively small cuz the game loop wont be able to run when another loop is running.
|
|
|
|
|
|
allenh98
|
Posted: Wed May 30, 2007 11:39 pm Post subject: Re: Procedures dont get run |
|
|
What happens now is that once the user presses space once, the missile just stops there. If I want it to keep moving, I would have to loop it with an increasing variable for my X for it to move >>>>>>>>>>>>. Is there a way to do this without stoping the rest of the program?
Description: |
|
Download |
Filename: |
Escape1 no moving background.t |
Filesize: |
5.59 KB |
Downloaded: |
99 Time(s) |
|
|
|
|
|
|
carGUY17
|
Posted: Thu May 31, 2007 10:28 pm Post subject: Re: Procedures dont get run |
|
|
Hey u want some help take a look at my grand theft auto game that i posted this should help you out alot
|
|
|
|
|
|
DifinityRJ
|
Posted: Fri Jun 01, 2007 7:15 am Post subject: Re: Procedures dont get run |
|
|
Hey, Give me the pictures and I will trouble shoot this program for you, and tell you what you need to do. I won't do it for you, just because you will learn more this way.
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
|