It is currently Tue Sep 02, 2014 4:15 am Advanced search

3D with Flash?

Non-project-specific matters-- talk about art, music, writing, coding and the creative process.

3D with Flash?

Postby agj » Sat Apr 21, 2012 1:43 am

So, I'm getting into 3D with Flash. I'm well acquainted with AS3, but I've never touched 3D in my life. After doing some research, I chose Away3D 4 as the framework with the most potential (you're free to contradict me). So, here I am trying to figure out where to start with it.

I'd like it if someone could give me an idea of what sorts of challenges I should tackle first, so as not to get overwhelmed (but also not bored). The way I tend (and like) to learn technical stuff is by attempting to make some concrete thing, in this case a game, but since I know so little about 3D, I don't know what sort of design to think up before I figure out how to make it.

Two questions that popped up in my head:

- If I have the model of an environment, what do I do about collisions against it?
- Is there a visual way of laying out models in an environment, a map editor out there?

Advice is much appreciated!
User avatar
agj
 

Re: 3D with Flash?

Postby Ian Snyder » Sat Apr 21, 2012 4:13 am

Away3d would have been my recommendation. I used Papervision for Feign and got the impression by the end of it that Away3d would have been the better choice.

DOOM is to 3d as Pong is to 2d. It's a decent place to start if you've no previous experience, and it's easy enough to mess with the formula to come out with something unique.

Collision and such generally works the same in 3d as it does in 2d, but instead of checking line to line intersection you'd be checking line to plane intersection. Or you can optimize things by checking collision only for cubes, cylinders, etc. It depends on what you're trying to do. You might even be able to get away with essentially running 2d collision for certain games.

I'm not aware of any 3d map editor type tools for flash.
User avatar
Ian Snyder
 
Location: Kansas City, MO, US

Re: 3D with Flash?

Postby agj » Sat Apr 21, 2012 5:15 pm

Whoa, isn't Doom, like, considerably more complex than Pong, though? Actually, Doom came to mind and then I thought "better be Wolfenstein 3D, it's all in a single plane". I do think something along those lines is what I'm gonna do. Actually, it's gonna be a collab with GregWS.

So what I'm fuzzy about is what I do with the level model. Say I go with 2D collisions for simplicity's sake, since I'll probably skip jumping and whatnot. Will I need another representation of the level to check against, or can I get away with colliding against this visual model itself somehow?

So how was it with Feign? Other than Papervision, what did you use to make it?
User avatar
agj
 

Re: 3D with Flash?

Postby FuzzYspo0N » Sat Apr 21, 2012 5:20 pm

I'd suggest something 2d, in 3d. Like asteroids in 3d (there is no z component) . This let's you get to grips with controlling things first - and then you can try things like rotating the rocks in all 3 directions, rotation the ship to do a roll (as a dodge) and then add things like camera movement (to learn more about rotations). Rotations are one of the things MOST beginners don't get fully.
User avatar
FuzzYspo0N
 
Location: South Africa

Re: 3D with Flash?

Postby Ian Snyder » Sat Apr 21, 2012 9:12 pm

agj wrote:Whoa, isn't Doom, like, considerably more complex than Pong, though? Actually, Doom came to mind and then I thought "better be Wolfenstein 3D, it's all in a single plane". I do think something along those lines is what I'm gonna do. Actually, it's gonna be a collab with GregWS.


Whoops, I thought Wolfenstein and wrote Doom. But yeah, basically everything on a single plane, you got the idea. I need to actually research these things before I write them down. :\

Can't wait to see what you guys come up with!

So what I'm fuzzy about is what I do with the level model. Say I go with 2D collisions for simplicity's sake, since I'll probably skip jumping and whatnot. Will I need another representation of the level to check against, or can I get away with colliding against this visual model itself somehow?


How are you building the level? In Feign I used a 2D array as a tile map, so I just checked collision for walls/etc. against that.

I'm not exactly sure what you mean by colliding against the visual model itself. Like a 3d hitTest?

So how was it with Feign? Other than Papervision, what did you use to make it?


For the human models I used blender. I seem to remember that it has a way to export models to an .as file which papervision could read? I don't know if I'd recommend it unless you're trying to do more complicated things. There are probably better options out there. If you do end up using a modeling program, make sure that it exports to something away3d can use.

The texture is just a 2D image overlaid on the game that moves when the player turns.

The walls and such are basically Papervision's default cubes. Although I did have to modify them slightly because they were too slow originally (I didn't ever need to render their tops or bottoms, for example).

Apart from that, it's all actionscript. The non-euclidean stuff is just done by warping the player into a new room that resembles the old one in the right places.
User avatar
Ian Snyder
 
Location: Kansas City, MO, US

Re: 3D with Flash?

Postby agj » Sun Apr 22, 2012 10:09 pm

FuzzYspoON, you're right, making a 2d game sounds like a good way to get the basics.

Ian, that's good insight, thanks. I guess you didn't need anything more complex to design the levels than an array. Of course, in this case we'll be doing something with a loaded level model, so. And yeah, I meant like a '3D hittest'.
User avatar
agj
 

Re: 3D with Flash?

Postby tametick » Sun Apr 29, 2012 2:56 pm

I've just been thinking about the same things myself, but since I prefer to use haxe+nme and stage3d isn't supported by the native targets of nme I've ruled out away3d 4.

Since the extent of the 3d-ness I want is also basically just wolf3d-style, I was toying with the idea of just making a top-down game with flixel and facing/fps controls and then use the flixel display as the minimap and render the data in 3d separately.
tametick
 

Re: 3D with Flash?

Postby agj » Thu May 03, 2012 1:02 am

So essentially you'd be making a 2D game with a separate, purely visual 3D layer. Interesting way of thinking about it.
User avatar
agj
 

Re: 3D with Flash?

Postby tametick » Thu May 03, 2012 6:28 am

agj wrote:So essentially you'd be making a 2D game with a separate, purely visual 3D layer. Interesting way of thinking about it.


Right, mechanically wolf3d and doom are basically just 2d games anyway.

There was a video a while ago that was shot at id as they were making doom, the two things that caught me by surprise were that they were so few people working on such a seminal game (maybe 5 or 6 including the musician) and that romero was play testing it in 2d mode (basically what became doom's map).

Now I'm not at all sure that this is a good idea performance-wise or otherwise, but I already know how to make 2d games so I figure it's probably the easier way as I don't have to develop both the rendering engine and the game at the same time, I can work on each of them more or less on its own.

-Ido.
tametick
 


Return to Process

Who is online

Users browsing this forum: No registered users and 1 guest

cron