Be a Supporter!

As3: Rendering Scrolling Levels?

  • 384 Views
  • 4 Replies
New Topic Respond to this Topic
ThePeasant
ThePeasant
  • Member since: Aug. 30, 2007
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
As3: Rendering Scrolling Levels? 2009-05-05 09:55:43 Reply

Hi,

So I'm getting near to the end of producing one of my games and I'm now getting to how to program in the graphical elements to the game. So here's the deal: The game is going to have very large scrolling levels. What is the best way to build and display these levels? Especially regarding tiled graphics and level graphics in general.

Here are the options as far as I see it:
1) create general areas in CS3 for objects and use a 'bitmap fill' to include the tiled graphics
2) create general areas in CS3 for objects and write a code to perform a 'vector tile fill' to include the tiled graphics
3) actually draw in every object and pattern which will exist within the level so that no rendering is required
4) convert all the level data to data code (somehow) and only render what should be on screen at any given moment

Which of these options is the best one to use? Or, is there a 5th (or 6th) which would be better?
Also, as kind of a side question, does anybody know what Flash does with objects which on not within the stage's bounds? Does it go through the motions of rendering it at all times even if it is not being displayed, or does it act as if what is not within the stage's bounds does not exist for display purposes?

ColdLogic
ColdLogic
  • Member since: Nov. 12, 2003
  • Offline.
Forum Stats
Member
Level 19
Blank Slate
Response to As3: Rendering Scrolling Levels? 2009-05-05 12:54:52 Reply

well i dont really know, but to be honest, if you shift everything in the whole level over 5 pixels, that calculation still has to go through no mater whats shown. So Id say your way better off to just manipulate near onscreen and onscreen stuff.

GustTheASGuy
GustTheASGuy
  • Member since: Nov. 2, 2005
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to As3: Rendering Scrolling Levels? 2009-05-06 03:52:06 Reply

Is it old-school all tiles? Then you can just copy the nearby tile bitmaps to the background image. Otherwise render the background to like 500x500 patches and then do the same with those.


BBS Signature
ThePeasant
ThePeasant
  • Member since: Aug. 30, 2007
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to As3: Rendering Scrolling Levels? 2009-05-07 09:59:44 Reply

At 5/6/09 03:52 AM, GustTheASGuy wrote: Is it old-school all tiles? Then you can just copy the nearby tile bitmaps to the background image. Otherwise render the background to like 500x500 patches and then do the same with those.

no, no tiles... "new-school" I guess. It will be like this, only a game (controls: WASD/N/M).

Even though I've had most of the project finished a couple months ago my partner still hasn't gotten much art done. I would like to know how to implement it though for when it IS done.

500x500 patches make sense. So I'll basically have 9 patches rendered at all times?

How should I render the background? Should I be using vector art tiles or bitmapFills? Right now it is just blank boxes. Should I leave it as is and either 'bitmapFill' or write a vectorFill class for all the boxes as needed? Or should I predesign the whole level (aka all the tiles) in the CS3 thingy with vector objects? Or should I convert all the levels into pure data and generate them on demand?

GustTheASGuy
GustTheASGuy
  • Member since: Nov. 2, 2005
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to As3: Rendering Scrolling Levels? 2009-05-07 10:42:14 Reply

At 5/7/09 09:59 AM, ThePeasant wrote: 500x500 patches make sense. So I'll basically have 9 patches rendered at all times?

Less, depending on the scroll. And you just copy them, not render.

How should I render the background? Should I be using vector art tiles or bitmapFills? Right now it is just blank boxes. Should I leave it as is and either 'bitmapFill' or write a vectorFill class for all the boxes as needed? Or should I predesign the whole level (aka all the tiles) in the CS3 thingy with vector objects? Or should I convert all the levels into pure data and generate them on demand?

It doesn't matter and you should render them to BitmapData blocks.


BBS Signature