A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: Wolfenstine 3D in flash

  1. #1
    Unregistered User dnalogic's Avatar
    Join Date
    Feb 2001
    Location
    UK
    Posts
    146
    I am convinced that is possible to create a type of wolfenstine 3D with 'textured' walls in flash 5....


    Wallsurfaces as trapeziums
    --------------------------------
    In wolfenstine 3D the viewpoint always stays at the same height, and as such no matter where you are every wall surface is effectively a trapezium. Assuming that you only use 1 texture through out your game (and it has y-axis/horizontal symmetry), you only need a limited number of (pre-rendered) trapeziums.


    How many trapeziums do you need to pre-render?
    ---------------------------------------------------------
    All types of x-scaled, and y-scaled, and horizontal flipped trapeziums can be ignored (which is an awful lot of them) - because these transformations are available in Flash 5. This leaves you only with trapeziums that have different ratios between the opposite sides to deal with - I'm sure 50 of these would be more than enough.


    Providing that the pre-rendered trapeziums were vector graphics rather than bitmaps then they wouldn't take up much space at all.
    All the other bits of the game (people/dogs) is standard sprite scaling techniques that flash can do no problem, and that there are plenty of excellent examples of on this board.




    Bit of a hack, but I will give it a go in a couple of weeks time.

    Anyone got any suggestions/comments?




    Regards,
    Dean Alexandrou

  2. #2
    Senior Member Olorin's Avatar
    Join Date
    Aug 2000
    Posts
    1,151
    Should be possible... Are you going to do smooth rotations, or 90 degrees rotations like in some games ?

    Olorin

  3. #3
    Unregistered User dnalogic's Avatar
    Join Date
    Feb 2001
    Location
    UK
    Posts
    146
    Well might aswell go the whole hog and go for smooth rotations and bump mapping...

    ...joke about the bump mapping (obviously!! :-), but I will definately try smooth non-right-angle rotations - otherwise it wouldn't seem that 3d.

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Posts
    911
    I did something like this before...pretty much exactly how you described. I was going to make a 3d maze out of it but lost interest quickly. You can see it here (use arrow keys to move). If it runs slow its because of a footer in the thread because the movie runs pretty fast.

    The "polygon" script is so simple that Flash could handle tons of them without worrying about speed. However, the scaling of the walls slows things down quite a bit. To get as much speed as possible I clip the trapezoids against the left and right edges of the movie. Also if any of the panels are behind you or off to the side they are not rendered. Just recently I had started implementing a hidden surface removal routine but I dont like working in Flash anymore so I quit pretty quickly.

    The only reason I posted was just to tell you that you should have no problem doing it. The only thing to worry about is the size and number of panels on the screen. You do not even need four coordinates to define a wall since the trapezoid is reflected over your center...you only need two points. Things you should implement: clipping, hidden surface removal, and a collision detection script to keep the player from getting too close to the walls since that is when they scale really big.

    Good luck.

  5. #5
    Unregistered User dnalogic's Avatar
    Join Date
    Feb 2001
    Location
    UK
    Posts
    146
    Genius!. Excellent. So presumably those walls could be textured without any changes to the code?

    -I suppose you also have one somewhere with curved surfaces, shadows, depth-shading, and bump-mapping!? :-)




    ----

    I also considered doing it another way - similar to the way that wolfenstine actually does it - with scan lines. You would not use an x-scale at all, just a y-scale on a strip of vertical lines. There would also be no sorting of surfaces. The only problem is how do I plot a sprite that is half behind a corner? Also the number of lines may be too much for flash.

    What do you think?


    Regards,
    Dean Alexandrou

  6. #6
    Banned By GMF Wannabe Gambini's Avatar
    Join Date
    Oct 2000
    Posts
    976
    Ahab - would you at all be releasing the fla for your 3d walk about? It's very interesting and I would love to study it.


  7. #7
    yosunism grand yosunist
    Join Date
    Jul 2000
    Posts
    72
    hey, check out
    http://www.3dgroove.com/games.htm
    click on tank wars (the same game can also be found @ shockwave.com)

    tank wars employs the idea of using texture effects via .swf-based "3d"

    so guess it's possible... at least via director. i'm not sure what the disparity between flash and director are. the director version apparently speeds things up by forcing some sort of activex/plugin download. that can probably be induced via flash thru external javascripts

    neway, it'll be cool to check out a wolf3d in flash. back in 94 or 95, it was like my #1 3d game until duke came out... =P


  8. #8
    Unregistered User dnalogic's Avatar
    Join Date
    Feb 2001
    Location
    UK
    Posts
    146
    That looks quite interesting, but i'm not sure how I could incorporate it into flash.

  9. #9
    Hey,

    Im working on something similar.
    I tried the raycasting method that wolfenstine uses
    but it was way too slow
    see http://www.artifactinteractive.com.au/dev/raycast.html

    Im trying a few different methods now - will post soon!
    check this for a play with texture mapping
    http://www.artifactinteractive.com.au/dev/maze.html

    dd

  10. #10
    Senior Member Olorin's Avatar
    Join Date
    Aug 2000
    Posts
    1,151
    daviddoul, your last example isn't really 3d. What appears to be walking forewards in your maze is just zooming in on all the walls. This gives the effect that walking towards a wall makes the room smaller.


    I'm working on placing 3d objects inside my 3d world. :

    http://www.onetwofree.nl/games/test8.html

    It's it's still buggy and unrealistic.

    Olorin



  11. #11
    DJ_SFinKz
    Join Date
    Jan 2001
    Posts
    249
    Good luck and when you finish this game email me!!
    I can't w8

  12. #12
    olorin,
    yea - its just a zoom - I wasnt concerned with perspective stuff - just playing with texture effects. Although for something as simple a square room a zoom creates an acceptable illusion.

    Your world is looking interesting - Im guessing youve done the rotating objects as a pre rendered rotation and you set clip frames based on player location?? If your doing it with polygons then youve got it really fast!

    dd

  13. #13
    Senior Member Olorin's Avatar
    Join Date
    Aug 2000
    Posts
    1,151
    yeah, your room does look pretty cool david

    I'm using simple shape tween animations for the cubes. Why go through all the trouble of making it real while this is much simpler and faster.

    Olorin

  14. #14

    2 yosuNIC

    Wow!!! Your "tanks" is cool, but I don't understend how to shoot.

  15. #15
    Senior Member
    Join Date
    Feb 2001
    Location
    England
    Posts
    114
    Wow

    There are some quite interesting methods and ideas flying around in this thread. I’m experimenting with 3d flash at the moment.. I can make 3d wire frame but I can’t make solid or rendered faces which is pretty much the main thing wanted for a game, other wise it would be impossible to understand what’s going on. Good luck with your game dnalogic, I look forward to playing it, if you can make it that is.

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