James... Thanks so much for the advice. I need certainly to look at ALL
aspects as I am so new to developing. I could break my needs down into the
following;
a) certainly need a hand with mathematical coding for the automatic path the
ball sprite takes.(i have been searching everywhere for info on
vectors/mathematics but without much luck). The ball will start to move when
a player requests the game to start.
b) to learn how to code to allow the ball to turn 100 degrees whenever a
player requires it to do so and for the ball to slow its pace during the
turn.
C) to code for boundary collision.... where if a player does not turn the
ball sprite before a border sprite is reached then the ball will slow and
stop.
d) introduce a second ball sprite and code for collision management between
the two.
I think this wiould be sufficient to get me going, to create a start and
then to add other ideas later.eg. the red curves as seen will change radii
slightly every few seconds automatically.
The game would be played at a single workstation between 2 people and later
hopefully over the web. I know exactly what I want in this game. the hard
part is bringing it all together.
thanks
Phil
From: James Newton <[EMAIL PROTECTED]>
Reply-To: Lingo programming discussion list <[email protected]>
To: Lingo-L <[email protected]>
Subject: Re: <lingo-l> Is Director/Lingo capable?
Date: Thu, 24 Nov 2005 17:04:06 +0000
On 24/11/05 12:01 pm, "PHILIP LUCAS" <[EMAIL PROTECTED]> wrote:
>> a black ball (object1) ... once set in motion will travel towards a
curve
>> (object2) at a constant angle to the curve of say 50 degrees.
>>
>> Once it reaches and passes that curve it looks for the next curve to
pass it
>> also at 50 degrees and so on to another curve.
>>
>> At any given stage a player has the option to switch say 100 degrees
and
>> head this time accross the screen to the left.
>>
>> Is there anyone who can assist with the coding of this or advise which
way
>> to best approach this task ? I can send you a bmp to explain the above.
Philip's Word document is now available at:
<http://www.openspark.com/~share/plucas/spriteassis.doc>
Philip, what exactly are you asking for? Do you need help with:
* the mathematics of determining which straight-line path will
form a given angle with a given curve from a given point?
* drawing an arbitrary curve on the screen?
* detecting user input?
* creating a multiuser network?
* moving a sprite along a given path using Lingo?
* working out where to start?
* ...?
The secret to solving a complex problem like this is to break it down into
a
series of smaller problems that you already know how to solve. You then
look for (or ask for) ways to fill the gaps in your knowledge.
If you are new to Lingo, then perhaps you should start by simply using code
to move a sprite. Here's a very simple behavior:
-- MOVE SPRITE --
property pSprite
property pMoveX
property pMoveY
on beginSprite(me)
-- Create a property to refer to the sprite the behavior is attached to
pSprite = sprite(me.spriteNum)
-- Create two property to indicate how much the sprite is to move along
-- the x- and the y-axes
pMoveX = 7
pMoveY = 3
end beginSprite
on enterFrame(me)
-- Move the sprite to a new position (loc) before the next update
pSprite.loc = pSprite.loc + [pMoveX, pMoveY]
end enterFrame
-- ----- ----- --
1. In your movie, create a black ball sprite in channel 1
2. Copy the code above
3. Right-click or Ctrl-click on the black ball sprite and
choose Script in the contextual menu which appears
4. The script window will open. Select all the text in
it and paste in the code above in its place
5. Launch your movie.
Result: The sprite should move down and to the left.
Next step: work out how to tell the sprite to move in a different
direction.
Hint: you can change the value of sprite(1).pMoveX from the Message window
sprite(1).pMoveX = -11
Does this get you started?
Cheers,
James
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L
is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]