Re: graphics and maths formulae

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi,

The good news is Allegro has some spline functions which can
fairly easily create smooth projection paths.
There is an example program in Allegro which allows the user
to create a number of dots on the screen and when the user
presses esc or space or something, a larger dot travels through
all the points you clicked on using a smooth path.

The bad news is I haven't wrapped those functions in euAllegro,
and don't know how difficult it would be.
If you wanted to use euAllegro you could probably talk me into
wrapping the functions.

Another option, (note that I have never done anything like this)
 ... but if they are going to use preset paths (like Galaga)
you could just create sequences with the (x,y) values of the
exact path.
Then use the current (x,y) value of each invader to create
the correct offset.
This obviously would only be useful for preset paths.

You might like to ask your question on the newsgroup:
comp.games.development.programming.misc, or
comp.games.development.programming.algorithms

For some more ideas.

Ray Smith




>hi,
>
>can any games programmers help me with my maths?  I want to start a project
>similar to space invaders.  The ships will congregate at the top of the
>screen and then fly in formation following several flight patterns to the
>bottom of the screen whilst shooting at the players ship.  At least thats
>how it works in my imagination!
>
>I've been studying code from demo progs such as twirling graphics etc, to
>get some idea of the direction i need to follow for the way i need to
>program the maths.  Is there anyway anyone knows how i can solve my
problems
>as i find it quite a mind bender figuring out the formulae for the
>mathematics to use as the (x,y) coordinates of the ships flying patterns.
>
>Should i just study my maths books harder or are there simpler easier
>methods that i have overlooked?
>
>thanks in advance!

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu