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 Please!!!!
Index -> Programming, Turing -> Turing Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
programmer1337




PostPosted: Wed Dec 07, 2011 8:10 pm   Post subject: Re: I Need Help Please!!!!

it isnt rocketscience, and if you think we arent helping you enough go to the submissions or tutorials look for a simple pong game, it should get you to what you need to do
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Dec 07, 2011 8:12 pm   Post subject: RE:I Need Help Please!!!!

Dreadnought has a good layout for the game loop. Start filling it out
code:

<variables and stuff here>

loop
  < clear screen > - cls
  < change positions of objects > - need to keep track of current position (x,y) and properties (velocity; you can work with it as velocity_x, velocity_y [b]or[/b] speed + angle; whatever math is easier is up to you)
  < draw objects at their new positions > - Draw.Oval(...
  < time delay to regulate framerate > - delay(some_value) is an easy start, Time.DelaySinceLast makes it smoother, but you can figure that one out later, when you have time
end loop
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Mark0213




PostPosted: Wed Dec 07, 2011 8:15 pm   Post subject: RE:I Need Help Please!!!!

Thanks,
loops
string
integers
delays
cls
setscreen graphics
drawfilloval
drawfillbox
moving a single ball going in one path
alternate colours
Mark0213




PostPosted: Wed Dec 07, 2011 8:16 pm   Post subject: RE:I Need Help Please!!!!

Tony, i would do it, but whats velocity x,y, and speed and angle?
Mark0213




PostPosted: Wed Dec 07, 2011 8:18 pm   Post subject: RE:I Need Help Please!!!!

Where would i find submissions again, sorry
mirhagk




PostPosted: Wed Dec 07, 2011 8:19 pm   Post subject: RE:I Need Help Please!!!!

well what do those words mean?

EDIT: also mark, note that you can edit your last post. This is preferable to posting several replies in a row
Mark0213




PostPosted: Wed Dec 07, 2011 8:30 pm   Post subject: RE:I Need Help Please!!!!

OMG this is soo hardd, im trying my best! i just need to understand how ... forget this, i give up i cant make a whole bunch of balls move at the same time, i have to face that im garbage at turing and i'll never figure it out
Tony




PostPosted: Wed Dec 07, 2011 8:31 pm   Post subject: Re: RE:I Need Help Please!!!!

Mark0213 @ Wed Dec 07, 2011 8:16 pm wrote:
Tony, i would do it, but whats velocity x,y, and speed and angle?

as in, definitions?
Velocity -- speed and direction of motion.
Speed -- change in position, over time.
Angle -- direction in which an object is moving, typically measured in degrees or radians.

Edit: start with getting one ball to move. Second one would be similar. If you do it right (arrays), then you get the Third (and all other) ball for free.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sponsor
Sponsor
Sponsor
sponsor
Mark0213




PostPosted: Wed Dec 07, 2011 8:40 pm   Post subject: RE:I Need Help Please!!!!

No as in codes. Tony i was working on your program right? but when i used the first "ball" thing, and made several other copies it only made one of them move, what am i supposed to do with this?
Tony




PostPosted: Wed Dec 07, 2011 8:53 pm   Post subject: RE:I Need Help Please!!!!

ops, I made a mistake (edited my previous post now). Velocity is speed + direction. "change in speed or direction, over time." describes acceleration.

e.g.
code:

var velocity_x : int := 5

here we describe velocity just along the x axis.

If the ball is at position X, then the next X position would be X + velocity_x. 0 -> 5 -> 10 -> 15 -> ...

Don't worry about other balls for now. It will just confuse you. Focus on just one.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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 2 of 2  [ 25 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: