View Full Version : 3D in Flash
Rossman
February 26th, 2005, 02:38 PM
So, uh, I have been reading Senocular's awesome 3D tutorials on this site, and I was wondering, has anyone actually seen this stuff implemented, either as a 3D game engine for Flash, or even just as an effect on a site?
Seems not too many people are doing that kind of thing, which is a shame, really.
alzor
February 26th, 2005, 03:44 PM
I have a first person engine, but it's unfinished and Im too bored to finish it. You might have seen it already in some other threads.
alzor
February 26th, 2005, 03:46 PM
...and there was nothing from senocular's tut's implemented in it, I worked on it when I had no internet so basically I wrote it from the ground up. If you want to write one of these things prepare to put a few months into it, and just use your head. There are some fairly simple solutions to creating first person stuff.
Rossman
February 26th, 2005, 03:49 PM
Yeah, I did see yours, actually. I was just wondering why there wasn't a bit more out there. Those tutorials really break it down...I might have to try some ;)
Marz
February 26th, 2005, 04:24 PM
Yeah, I did see yours, actually. I was just wondering why there wasn't a bit more out there. Those tutorials really break it down...I might have to try some ;)
It's due to the fact that 3D engines on Flash can be rather sluggish unless done correctly. Also, most people don't want to spend the time to learn trig and geometry to learn how to introduce angles and shapes into the flash world.
Rossman
February 26th, 2005, 06:31 PM
Yeah, I see that senocular was using raw math instead of lookup tables for speed. I will have to see what I can come up with. Thanks for the feedback!
nih
February 27th, 2005, 10:26 PM
I haven't seen senocular's tutorial, and by the sound of it it's a 'real' 3d engine, not what I'm about to link here which is a combination of Swift3D and good old flash scaling/rotation.
In any case, this is what I've been working on:
http://darken.spark.lithotech.co.nz/
I was a little surprised myself that this worked and it's still very rough around the edges. Just one example of what you can do within the limits of flash.
alzor
February 28th, 2005, 12:28 AM
yo nih... that's mighty cool man!
signifer123
February 28th, 2005, 09:40 AM
Wow nih thats insane
thats gotta be some insane math calculations
yuo need ot update the left hand column on your page
Rossman
February 28th, 2005, 11:35 AM
Interesting way to use pre-rendered objects...
nih
February 28th, 2005, 08:26 PM
Cheers ;)
It started out as insane math, none of which worked. I managed to get basic trig going but past that I was lost.
Kirupa's localToGlobal tutorial is your friend - no math required. There are empty objects in the final level of the groundplane that just report their global location back to the objects on the ground.
Rossman
February 28th, 2005, 09:41 PM
BTW dude, it doesn't get unplayably slow here until there are two or three houses and three or four trees on the screen, even running in High Quality mode.
nih
February 28th, 2005, 09:47 PM
What speed and type of processor are you using?
I've managed to optimise the heck out of it lately. You live and learn, such as:
Ok: three dozen offscreen objects because you're erring to caution and not removing them until their centerpoint is about 1000 pixels offscreen.
Bad: using getBounds() to remove them as soon as they're not visible. The more complex your object, the slower this goes. This was by far the slowest method.
Best: Use both techniques, but only do getBounds every 80 frames or so, and offset each object's counter for this so they don't all try to do it at once.
The goal is to get a reasonable amount of foliage and a single building playable on any processor. The buildings are too complex by far, so that's one thing to change. The pier is a better example of a simple yet nice-looking object.
Rossman
March 1st, 2005, 12:17 AM
I have a 2.4Ghz Prescott, 1GB RAM, and an ATi 9600XT. Which I guess helps ;)
dangerskew
March 1st, 2005, 12:21 AM
The best I could get with 3D Flash is a weird FPS(http://www.sheezyart.com/view/166881/), a flight simulator(http://www.sheezyart.com/view/231923/), a thing I'm not quite sure what it is(http://www.sheezyart.com/view/209960/), and a game where you shoot circles(http://www.sheezyart.com/view/150431/). I'm proud of them though.
Rossman
March 1st, 2005, 12:29 AM
Hey man your FPS is pretty good, and so is that last one. The other two didn't come up right for me...hopefully I can make something as cool one day ;)
Rossman
March 1st, 2005, 10:02 PM
Interesting, I see Senocular has a link on his news page linking to an open-source Flash 3D engine (http://www.informatika-nova.com/). Looks pretty cool.
alzor
March 1st, 2005, 11:10 PM
that 3d engine looks cool!
nih
March 2nd, 2005, 05:41 PM
The best I could get with 3D Flash is a weird FPS(http://www.sheezyart.com/view/166881/), a flight simulator(http://www.sheezyart.com/view/231923/), a thing I'm not quite sure what it is(http://www.sheezyart.com/view/209960/), and a game where you shoot circles(http://www.sheezyart.com/view/150431/). I'm proud of them though.
This is pretty impressive. :D
A lot of the 'quality' factor in a game doesn't have to be graphics, but rather fine-tuned gameplay and efforts to make it fun and a little bit immersive. I remember playing games from years back that had me enthralled despite their simple graphics.
nih
March 2nd, 2005, 05:46 PM
that 3d engine looks cool!
That first movie is a good example of what I mentioned in the post above this one. You can make simple stuff be really effective in terms of grabbing the viewers attention. Those are really neat.
dangerskew
March 2nd, 2005, 06:02 PM
This is pretty impressive. :D
A lot of the 'quality' factor in a game doesn't have to be graphics, but rather fine-tuned gameplay and efforts to make it fun and a little bit immersive. I remember playing games from years back that had me enthralled despite their simple graphics.
Thanks. It's based off senoculars tutorials, but I added things, like moving in the direction you're pointing if you're pointing up and tilting across the x-axis.
nih
March 3rd, 2005, 12:17 AM
Sorry for the tangent, but one thing I wanted to mention and get some feedback on was Mac performance.
We have some Dual 1.8Ghz G5s here. My Athlon 2600XP whups them all in the test movie I linked earlier - no amount of low quality will get the macs running more than 5-10 FPS. What gives? I thought Mac flash performance had improved over the last couple of years?
nih
March 5th, 2005, 12:33 AM
Seeing as I'm threadjacking, here's a new update. It's quite a good one in terms of bugfixes and eyecandy, but no new game-style features yet. This is still just an engine.
http://darken.spark.lithotech.co.nz/
Marz
March 8th, 2005, 02:44 PM
If you want to know Mac performance, save it in a Mac format and give me the link :)
nih
March 8th, 2005, 05:26 PM
If you want to know Mac performance, save it in a Mac format and give me the link :)
Might do that. I did find it was really poor on the G5s here. Maybe they don't correctly spread the load over both CPUs or something. The performance was in line with what I'd expect from a 1.8Ghz processor, but they're meant to have two of them.
Marz
March 8th, 2005, 06:38 PM
I've got a single-line g5 here at my friend's house. 1.8 ghz if you need me to test it.
nih
March 8th, 2005, 10:11 PM
I wouldn't make you go to any such trouble yet. ;) I'd be keen on a dual vs single comparison later on though.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.