-
02-26-2004, 05:56 PM
#281
Yes we can
to andré: too bad,that would rock badly,hope mm speeds up the next flash player a bit more
(by the way: i´m working together with a c++ coder who creates a standalone wrapper which accelerates swfs using the 3d card/open gl,might be a good project for that )
Last edited by tomsamson; 04-04-2004 at 11:26 AM.
-
02-28-2004, 05:03 AM
#282
AndreMichelle, have you considered trying Flasm? It is simply wonderful. With it I have been able to make a 3D engine I'm working on experience a 360% performance boost. Just a suggestion...
-
02-28-2004, 05:12 AM
#283
doesnt flasm just decompile it or something
-
02-28-2004, 05:29 AM
#284
It both decompiles and compiles. Actually, I should say that it assembles and disassembles. I'd love to explain, but the author of Flasm has already done a better job of it than I probably could if I tried. The jist of it is that you can make optimizations to the low-level, Assembly-like commands that the Flash Player executes. Basically, you can optimize your scripts into a form that is impossible for the Flash compiler to produce.
-
03-01-2004, 04:05 AM
#285
z_mapping vs. Flash Player 7
Hi folx,
this one's got nothing to do with the recent posts, it's just a small but very helpful hint I got from Strille. I was wondering why all z_mapping codes (e.g. those of Strille and BlinkOK) won't work if "Publishing Preferences" is set to "Flash Player 7" (I'm using Flash MX 2004 Professional). Seems as if FP7 has a "major" problem with the z_mapping code - all older players worked fine.
But things are far more easier than I thought: Strille (thanx a lot to him... ) gave me the reason and a solution too: FP7 cannot add to undefined variables - they have to be set to zero first. That means adding the following line to the 6th frame (before _root.onEnterFrame = main):
xPos = yPos = rotation = lean = skyOffset = fr = speed = 0;
to the source code (here I'm talking about Strille's codex, http://www.strille.net/works/misc/z.../z_mapping.html).
Works perfectly!
Thanx again to Strille and BlinkOK who replied immediately to my mails - you helped me a lot!
Sorry if this information was already evident for some of you - I spent two days of searching the boards for a problem solution...
Flash on,
Lindyz
-
03-01-2004, 04:11 AM
#286
If it says, "Please insert topic" or somthing like that. That means that you pushed the new topic button. BTW, is there anywhere i can find this engine, links are down.
-
03-07-2004, 04:23 AM
#287
error 404!!!!!
i can't access your page...
i wanna see!!!
but i really can't access your page...
and i really wanna see...
wala lang...
-
03-07-2004, 07:38 AM
#288
Untitled-1.fla
The original version by PercyPea seems to be gone. You can still view my version though (the url a couple of posts ago was wrong):
Flash MX "Constant Z Mapping" Example
(I've edited it so it I should now work in MX 2004 correctly)
-
03-23-2004, 07:17 AM
#289
Thanx for the nice engine,I try to attach it in AS2.0,but when i finished it i saw there was some bugs,i just almost copy and paste the codes from z_mapping.I try to fix it but i failed after two days.I posted it here,hope some good guys can help me.
Thanx in advance.
The importance code is MapView3D.as:
PHP Code:
import iiley.mode.View3D;
import iiley.mode.IUnit3D;
/**
* @author iiley
*/
class iiley.mode.MapView3D extends View3D{
private var mainMC:MovieClip;
private var strips:Array;
private var width:Number;
private var topH:Number = 1; // top strip height
private var bottomH:Number = 8; // bottom strip height
private var groundScale:Number = 10; // the "height" above the ground
private var totalHeight:Number = 205; // the minimum total height of all strips
public function MapView3D(camera:IUnit3D, mainMC:MovieClip,
width:Number,
topH:Number, bottomH:Number, groundScale:Number,totalHeight:Number){
super(camera);
this.mainMC = mainMC;
this.strips = new Array();
this.width= width;
this.topH = topH;
this.bottomH = bottomH;
this.groundScale = groundScale;
this.totalHeight = totalHeight;
}
public function init():Void{
clearStrips();
var averageH:Number = (topH + bottomH)/2; // average strip height
var maskY:Number = 0;
for (var a:Number=1; a <= totalHeight; a++) {
var strip:MovieClip = mainMC.attachMovie("strip", a, a*2); // create strip
strip._y = 220;
strip.mask = mainMC.attachMovie("mask", "m"+a, a*2+1);
var scale:Number = Math.pow(a / (totalHeight / averageH), 1.5); // exponential function to make strips exponentially smaller near horizon
var height:Number = Math.round(topH + (bottomH - topH) * scale); // current strip height
strip.mask._height = height + 1; // add 1 to strip height in order to prevent gaps when scale the flash movie
strip.mask._width = width; // set mask width to something a bit larger than the movie width (because of leaning)
maskY += height;
strip._xscale = strip._yscale = (maskY/totalHeight)*totalHeight * groundScale;
strip.mask._y = maskY; // place strip egde to edge with the previous strip in y pos
strip.setMask(strip.mask);
strip._rotation = 0;// -(camera.getHeading()/Math.PI*180+90);
strip.m._y = 0;//-camera.getY();
strip.m._x = 0;//-camera.getX();
strips.push(strip); //add this strip to array
if (maskY+height*2 > totalHeight) { // exit when we have filled totalHeight with strips
//trace("a="+a+" masky="+maskY);
break;
}
}
}
public function update():Void{
var x:Number = camera.getX(); // define xPos as a local variable for faster access
var y:Number = camera.getY(); // define yPos as a local variable for faster access
var r:Number = -(camera.getHeading()/Math.PI*180+90); // define rotation as a local variable for speed
var s:MovieClip = mainMC; // define s_mc as a local variable for faster access
s.sky._x = 3*r % 512;
for (var n:Number = 0; n < strips.length; ++n) {
var rC:MovieClip = strips[n];
var mC:MovieClip = rC.m;
rC._rotation = r;
mC._y = -y;
mC._x = -x;
}
}
private function clearStrips():Void{
while(strips.length > 0){
var strip = strips.pop();
strip.mask.removeMovieClip();
strip.removeMovieClip();
}
}
}
and the files are here:
http://www.robochina.org/member/iiley/test3dcar.zip
-
03-23-2004, 10:08 PM
#290
You can see the demo runs here:
http://www.robochina.org/member/iiley/test3dcar.html
You can easily see the bugs -- the several strips at bottom views wrongly.
-
03-24-2004, 02:53 AM
#291
ism
did you see Lindyz's post? if his suggestion does not work then mabey you could email/pm him.
Graphics Attract, Motion Engages, Gameplay Addicts
XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro
-
03-24-2004, 03:15 AM
#292
Thanks for your reply BlinkOk.
I had seen Lindyz's post before i post,and i know what his post meaning,he pointed the undefined variables problem(thanx him).
The bug in my testing is the different problem i think.I cannot find the bug's cause, so i post here hope some advanced ASer can give me some tips,however i am in thinking and testing to look for the solution too,when i find it i will post here(But i dont when).
Last edited by iiley0; 03-24-2004 at 03:17 AM.
-
03-24-2004, 09:49 AM
#293
I'm feeling supersonic
You'll kick yourself - you really will. Looks like a video mem/display problem - if you'll forgive the subtle pun. Set quality to low and those strips will magically appear.
-
03-25-2004, 06:52 AM
#294
Oh,god,it works well when i set quality to low.
Thank you kdsh7.
-
03-30-2004, 06:15 PM
#295
hi,
need some feed back about : http://www.k-yoo.com/yokiyoki/
it's a bit laggy on mid config, in other words it's better to have a good computer
there is a lot of work in order to optimise that
main programming ezekyel@k-yoo.com
design & graphic programming al@k-yoo.com
a big thank to BlinkOk and AM for their help
i would like to be able to put some houses and I still have a problem with that
:
PHP Code:
var i = -ry * 200 /( 100 + 2 * ry );
this._x = rx / 100 * ( ( 100 + i ) * 4 );
this._y = i
in this code we just can't change the z value of the object (setted at 0) anyone knows how to get rid of that ?
Last edited by ghettopacman; 03-30-2004 at 06:22 PM.
-
04-12-2004, 06:48 PM
#296
buildings
How do i put a building in this engine that you can drive around and see all the sides?
Time Consuming Productions Presents
www.maxbag.net
(in the works)
-
04-12-2004, 06:50 PM
#297
Yes we can
basically you have to draw (or render and export) the building in a full rotation around own axis animation,then you place it into the scenary with script and tell it which frame to display based on the player´s position to it
-
04-12-2004, 08:34 PM
#298
coding
What coding would i have to use to do that though?
Time Consuming Productions Presents
www.maxbag.net
(in the works)
-
04-12-2004, 11:41 PM
#299
Amiga freak
-
04-13-2004, 06:30 PM
#300
well...ironclaw...amazing !!! make a wish !
(i really master irony better than AS)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|