PDA

View Full Version : Game programming: 2D adventure/arcade/quest


Vitaly
07-07-2003, 10:41 AM
Hello everybody,
I've seen some Flash games and frankly speaking the majority are simple one stage "hit it" or "catch it" stuff.
One of the advanced games I saw was "Beanies". But that again was the replication of the speccy's Lemmings. Still the realization is exactly what I'm interested in.

Ok, now my questions:

1. How to make a hero move on stage and interact with barriers like heights, stones, wholes. Should it be based on hittest? or arrays? If it is hittest how to destroy a part of such barrier so that hero can move through it. If the ground is a slope it seems not to be working with hittest, because it considers an mc as a rectangle with all sides vertical or horizontal.

2. What is the best way to display hero's sprites? E.g. a hero jumps forward, should we just display a "jump" mc at current_x/current_y? What if there is a stone there and the hero should jump on it, should we use another "jump" mc specially created for such case?

3. How to fire missiles? I'm going to learn it from the "Classes and Objects" tutorial with the spaceship firing missiles. But a little hint wouldn't be superfluous.

4. How to make enemies move and damage hero on touch? Should it be some onEnterFrame set of functions, or setInterval? and then hittest?

5. How to enable hero move from one location to another?

Can anybody leave some links to games/tutes that are related to 2D adventures.
I would be very grateful.

Thanks in advance for your answers.

black
07-07-2003, 10:50 AM
Originally posted by Vitaly

Ok, now my questions:

1. How to make a hero move on stage and interact with barriers like heights, stones, wholes. Should it be based on hittest? or arrays? ...

2. What is the best way to display hero's sprites? ...

3. How to fire missiles? ...

4. How to make enemies move and damage hero on touch? ...

5. How to enable hero move from one location to another?


1 both can do

2 my opnion is mcs, convenient for using and managing.

3 check any articles explains key object.

4 read through some properties like _x, _y of flash help docs. hitTest will be useful for your "touch".

5 you could add a variable and test it before your hero goes, if true the hero can go otherwise it stops.


hope this inspires you a little~ :)