Source uploaded

15 views
Skip to first unread message

Scott Graham

unread,
Aug 6, 2008, 10:54:39 PM8/6/08
to fl...@googlegroups.com
Hi all,

I clearly haven't had any time to work on Fluix in a long time now.
Sad, but so it goes.

I've just uploaded the latest source and unit tests I had to the
"Files" section of the google group. I believe everything is there,
but if something seems to be missing let me know and I'll see if I can
find it.

If anyone wants to continue work on the code to update it to current
and future versions of XNA or add other features, I'll give you
whatever admin rights to this group to update/upload things and take
over as you see fit. I'll try to answer any questions people have, but
it's been a while since I looked at the code.

scott

Julien Hamaide

unread,
Aug 7, 2008, 1:24:14 AM8/7/08
to fl...@googlegroups.com
I'm interested. I'm working on gameswf for a while, and I know Flash pretty well.

Julien

Scott Graham

unread,
Aug 7, 2008, 1:32:53 AM8/7/08
to Charles Sanglimsuwan, fl...@googlegroups.com
> Thanks for the update. I had a quick question, maybe you can answer it. I
> noticed that after integrating Fluix into my game, the framerate became very
> sluggish. I did a bit of profiling, and found this particular line of code
> to be the culprit:
>
> mInputHandler.ReadData();
>
> This is in the Draw() function in MovieInstance.cs. If I commented this
> out, performance went back up.
>
> Obviously, this function is needed or else I can't read the next frame in
> the Flash file. Can you think of workarounds for this?

If you look at DefaultInputHandler.cs in the source archive, you can
see what's happening in that ReadData. Perhaps you can make your own
version that does less, or does things differently, but basically,
it's just asking XNA for input, if I remember correctly.

scott

Julien Hamaide

unread,
Aug 7, 2008, 1:50:30 AM8/7/08
to Fluix
FluixExtract.exe and trianglew.exe sources are missing.

Julien

Arnaud Jamin

unread,
Aug 7, 2008, 2:08:56 AM8/7/08
to fl...@googlegroups.com, Charles Sanglimsuwan
I'm not sure if it helps because i didn't look at the last release, but here is a fix on an non official version of Fluix when it was ported to xna2 :
 
There was a memory issue because of a little change :) in Fluix2 :
 
try
{
mVertexBuffer.SetData<VertexPositionChunk>(mVertices, 0, mVertexAddPoint);
}
catch
{
   mVertexBuffer = new VertexBuffer(mDevice, typeof(VertexPositionChunk), mVertices.Length, BufferUsage.None);
   mVertexBuffer.SetData<VertexPositionChunk>(mVertices, 0, mVertexAddPoint);
}
 
Recreating the vertexBuffer every draw is not really efficient.
I found that the issue was because of this :
http://msdn.microsoft.com/en-us/library/bb464139.aspx
 
They preconise to use DrawUserPrimitives instead.
So during the drawing I replaced this:
 
mDevice.DrawPrimitives(PrimitiveType.TriangleList, mBatchesData[b], (mBatchesData[b + 1] - mBatchesData[b]) / 3);
By this :
 
mDevice.DrawUserPrimitives(PrimitiveType.TriangleList, mVertices, mBatchesData[b], (mBatchesData[b + 1] - mBatchesData[b]) / 3);
 
It seems to work fine. The memory is almnost constant at 30Mo.
Wonder why not making the version 2 public. 
--
Arnaud Jamin

Scott Graham

unread,
Aug 9, 2008, 4:32:27 PM8/9/08
to fl...@googlegroups.com
On Wed, Aug 6, 2008 at 10:50 PM, Julien Hamaide
<julien....@gmail.com> wrote:
>
> FluixExtract.exe and trianglew.exe sources are missing.

Oops, forgot about those.

To be honest, those are the real reason I didn't release to pipeline
source originally, the extract is a bit of a pain. FluixExtract is
written in perl (thanks to the perl SWF::File being very useful), but
I converted it to an exe using a commercial tool, which sucks for
other people trying to deploy. Perhaps there's a free tool that does
the same these days?

triangle is Jonathan Shewchuk's
(http://www.cs.cmu.edu/~quake/triangle.html). I don't think I changed
the code at all. trianglew is just set to have a /SUBSYSTEM of windows
so that no console window pops up when it's called from FluixExtract.

The source zip went over the 10M limit when those were included, so
I've uploaded those missing thinsg as fluix-aux-source.zip.

Enjoy!

scott

Chris 'coldacid' Charabaruk

unread,
Aug 18, 2008, 7:41:10 PM8/18/08
to Fluix
ActivePerl is free, and while it doesn't come with SWF::File it should
be installable via the PPM tool. I shudder to think of any serious
programmer who doesn't have a distribution of Perl on their computer,
even if they are running Windows! It'd be great if ActivePerl came
with a compiler, but since it adds .pl to PATHEXEC, at least Perl
scripts can still be run from Command Prompt like executables or batch
files.

On Aug 9, 4:32 pm, "Scott Graham" <sgra...@gmail.com> wrote:
> On Wed, Aug 6, 2008 at 10:50 PM, Julien Hamaide
>
Reply all
Reply to author
Forward
0 new messages