A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Logic behind top-down prospective view?

  1. #1
    Senior Member
    Join Date
    Feb 2004
    Posts
    312

    Logic behind top-down prospective view?

    Anyone know of a good article for gta2 style prospective view. The logic behind it ect?

  2. #2
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    surely a real perspective model might work but for example paralax scrolling is almost the same and way easier to pull off.
    http://en.wikipedia.org/wiki/Parallax_scrolling

    you build your level as in 3d space (x,y,z) but each vertex or object coordinate in your world gets multipled based on its z- value in some way. Thats how I did it a long time ago in Flash mx:
    http://www.renderhjs.net/renderhjs/r...t/race_engine/

    a problem however might arise when you want to texture map trapeze shapes. 2(+1) Methods come to my mind:
    a.) rasterization: just like a scanline renderer slice up the wall texture into multiple slices and scale each slice differently so that piled up they shape a trapeze.

    b.) triangulate: slice the trapeze shape into at least 2 trianlges (the more the better) and texture map each triangle affine
    http://en.wikipedia.org/wiki/Texture_mapping
    its basicly this:

    and the reason why more trianle slices result into a better representation

    c.) in Flash CS4 and Flash Player 10 you have the ability to simply rotate X,Y,Z any movieClip or sprite with Actionscript. But I doubt this is a propper solution as not so many have Flash CS4 or the FP10 installed.

    anyway I think this might be a start

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center