realbasic-games
[Top] [All Lists]

Re: Game engine test

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Game engine test
From: Mike Woodworth <mike at divergentmedia dot com>
Date: Sat, 25 Mar 2006 13:07:34 -0500
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <20060317180027 dot 96F56117533D at lists dot realsoftware dot com> <4424B89C dot 2010408 at optusnet dot com dot au> <8268A93C-A492-41B9-A867-091978805AC2 at miensoftware dot com> <12B1852E-DE58-4871-A997-E7D44E40CBF4 at mindspring dot com> <BF4347D4-DEA4-4533-87BE-BEB12B106D91 at miensoftware dot com> <5FA27ACF-802D-4210-80DA-7E31FF0AAF60 at chaoticbox dot com> <F6EC35A8-63A1-4315-817F-B434D976A1BF at divergentmedia dot com> <CD676989-0D92-418F-87FA-9FDEF3FA2197 at chaoticbox dot com>

On Mar 25, 2006, at 5:19 AM, Frank Condello wrote:

On 25-Mar-06, at 4:07 AM, Mike Woodworth wrote:

On Mar 25, 2006, at 4:04 AM, Frank Condello wrote:

On 25-Mar-06, at 1:53 AM, Lo Saeteurn wrote:

I have three memoryblocks: one for the current frame, another for the next frame, and another for the interpolatedFrame. The math is simple: interpolatedFrame=currentFrame+(nextFrame- currentFrame)*percentTweening

I'm not using RB's trimesh, I'm modifying the points and normals directly via the API. Would RB's trimesh run faster?

It should be much faster to use the bulk multiply/add methods of the VectorList class in combination with RB's Trimesh class. A big bottleneck with manipulating memoryblocks in RB code is the accessor methods themselves. There were a few discussions in the past here on the Games NUG about making a "Vector Plugin" to speed up these types of memoryblock manipulations. Joe went ahead and added some of what was discussed to Rb3D but I'd still like to see an implementation that works on memoryblocks - or nice fast pointer math in RB itself!

i have a vector class that wraps vDSP calls on the mac. i'm trying to finsh up a few small things on the vImage side... but I can prolly get the vDSP math stuff up on my website this weekend.

Looking forward to seeing it :) but I wonder how useful that'll be for us 3D folks. I'll admit I'm not up to speed with the Accelerate framework (pun intended) but padding out 3D vectors to 16 byte boundaries is usually more of a headache than doing the scalar math yourself. That's not to say there aren't other areas were this would be handy...


i donno, we'll have to see. i admit, ive done very little with rb3d, so you may be right. but i've found vdsp to be drastically faster than math in a loop, and not that much harder to work with (besides the need to restructure you loop logic sometimes).

perhaps, you can send me a sample of this math done as scalar operations, and i'll port it to my class? then we can see if there's any advantage. (my guess is there will be - this veclib stuff has a certain startup cost, because it uses much more memory than the alternative, but for code that gets executed continuously, the speed gains can be quite amazing.

mike
--
Mike Woodworth
mike at divergentmedia dot com


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>