ForumsProgramming ForumSeparate movieclips, sight cones

4 3278
Misiur
offline
Misiur
9 posts
Nomad

Hi guys. So i've returned to AS3 after long time, and now i have trobules with some things. I' making simple game. You are moving with stick, and you are killing other sticks.

Actually it looks like here: >>Here<<

So i have trouble as You can see, with player and sight cone. In future i want to add changing weapons posiibility, but i don't know how to move gun perfectly as player.

The other thing is the cone. I don't know how to do it, but i want to do it like in these games: The Classroom series

Now in my game the cone is separated movieclip.

And with cone i have 2 separated troubles:

1. How to change color of cone if it's done in PS as a PNG image?
2. Should i add this cone to enemy character in separated frame? Or something?

Thanks for help, sorry for bad english.

  • 4 Replies
PixelSmash
offline
PixelSmash
566 posts
Nomad

Well, for your first problem... it's probably easier to use a vector-based cone, which you can make in Flash itself. Changing it's color shouldn't be too hard this way!

As for your second problem... I don't completely understand what you're asking. But, I think it's best to have a single MC frame, and use AS3 to show, add or change whatever you want. This should give you the most freedom of all the options.

Good luck, and don't hesitate to shout if you've got a problem!

Misiur
offline
Misiur
9 posts
Nomad

Thank You very much! However, i read about bitmaps and vectors. This article - http://aralbalkan.com/759 - show me that bitmaps aren't as overloading computer as vector does. So what will be better if there are few bad guys with cones (animated of course)?

PixelSmash
offline
PixelSmash
566 posts
Nomad

That's completely true. But -as far as I'm concerned- that only matters when you use a large amount of either one. Vector's need to be redrawn each time, while bitmaps don't need that.

If you won't use too many cones, you can easily go with vectors, or bitmaps - it doesn't matter much. Vectors allow a bit more freedom when it comes to changing color and shape, since no matter what you do with them they stay crisp and clean, while bitmaps can look weird if you resize them. Plus, you can use shape animations on vectors too, so overall they allow a lot more. But in the end the only thing that matters is what you want to use!

Misiur
offline
Misiur
9 posts
Nomad

Oh, as i saw in this example (on this page), it was kind of lines and curves forest ^^ I'll check both solutions. Thank You once more time!

Showing 1-4 of 4