PDA

View Full Version : Need help with top-view game + off-screen activity



__FLATLINE__
May 8th, 2008, 11:27 AM
'Sup dudes!

I'm building a top-view game where you control a space fighter kinda-thing and you fight against other fighters. You can move in any direction and so do your enemies (similar to the classic Asteroids game except with smart enemies). Your fighter is very manuverable so you can also fly in reverse, and even "strafe" left and right.

Anyways, what I'm trying to do now, is actually EXPAND the game world beyond the visible game field. What I mean is, that the actual game world would be few times larger than what you currently see on the screen.
You'll have a mini-map on the corner of the screen that tells you where you are relatively to the game-world, and when you move, your "dot" on the map will also move in relevance to the world. Enemies will also appear on that "mini-radar"-thingy.

If anyone ever played "Operation Inner Space" or "Star Control" they'd know what I mean.

So, anyone got some good suggestions on how to implement this? Sample code would be awsome too.

Thanks!

bluemagica
May 8th, 2008, 12:18 PM
What you need here can be achieved using "VCAM" or "Scrolling background" trick, you can find tutorials for both quite easily, the first one is more programming oriented and hard to implement, the second is pretty easy and gets the job done...the choice is yours.

__FLATLINE__
May 8th, 2008, 12:46 PM
The VCAM idea seems really good in this case, thanks.
I found some ready-made code for it over here (http://dark-mikey.deviantart.com/art/Flash-V-Cam-AS3-76240365). Just copy and paste the symbol to anywhere you want and do what you want with it.

I'll try to implement it in my project next week and see how it goes.
When the game will be done I'll post it here first :)

Thanks again for the help. I just love this site :D.

ArmoredSandwich
May 8th, 2008, 05:53 PM
Hmmm, I guess you are not using some kind of bitmap rendering technique eh? :(

__FLATLINE__
May 8th, 2008, 07:14 PM
huh? what the hell is that? :puzzled:

therobot
May 9th, 2008, 01:44 AM
oh boy

__FLATLINE__
May 9th, 2008, 04:12 AM
oh boy

lol what? are you talking about the technique where you use bitmap fills instead of vector fills? come on dude, don't make me feel so stupid :rabbit:

therobot
May 9th, 2008, 11:35 AM
Sorry..


Bitmap rendering is really a matter of ditching movieClips and vector graphics and using bitmaps in their stead. There are (probably) more advantages to using bitmap rendering opposed to vector graphics, though just from my own personal experience, using movieclips and vectors will be easier to understand for the novice. Though using bitmaps only adds a slight layer of complexity, You'll probably still need a decent grasp of coding to get from start to finish.

Generally, using bitmaps instead of complex vector graphics will produce a higher frame rate in your flash games (of course, it depends on the type of game / animations you're developing). There's a pretty simple example of what i'm talking about: here. (http://aralbalkan.com/759)

Still, you should definitely look into using bitmaps in flash. There's already quite a few threads about it here on kirupa. Good luck!

__FLATLINE__
May 9th, 2008, 01:36 PM
Sorry..


Bitmap rendering is really a matter of ditching movieClips and vector graphics and using bitmaps in their stead. There are (probably) more advantages to using bitmap rendering opposed to vector graphics, though just from my own personal experience, using movieclips and vectors will be easier to understand for the novice. Though using bitmaps only adds a slight layer of complexity, You'll probably still need a decent grasp of coding to get from start to finish.

Generally, using bitmaps instead of complex vector graphics will produce a higher frame rate in your flash games (of course, it depends on the type of game / animations you're developing). There's a pretty simple example of what i'm talking about: here. (http://aralbalkan.com/759)

Still, you should definitely look into using bitmaps in flash. There's already quite a few threads about it here on kirupa. Good luck!

oh yeah I know that technique. sure, thanks for the advice, man. :)

ArmoredSandwich
May 10th, 2008, 07:08 PM
Bitmap rendering is awesome, once you really understand it you'll never look back. It shouldn't be too hard to set up, especially if you already use OOP.

Good luck indeed!

__FLATLINE__
May 11th, 2008, 06:39 PM
Bitmap rendering is awesome, once you really understand it you'll never look back. It shouldn't be too hard to set up, especially if you already use OOP.

Good luck indeed!

Why? What does OOP has to do with bitmap rendering? Don't you just put images instead of vectors? Or there's something more to it than I thought?