News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

The Ascended ASM game creation thread

Started by Lonewolff, April 09, 2018, 02:21:23 PM

Previous topic - Next topic

Lonewolff

Thanks man, might be worth a look at  :t

Just finished optimising the hell out of my matrix routines. I am quite pleased with the results.


20000000 iterations

XMMatrixIdentity
        DirectXMath 578 ms
        C++ 125 ms
ASM 109 ms
XMMatrixPerspectiveFovLH
        DirectXMath 3000 ms
        C++ 2172 ms
ASM 1594 ms
XMMatrixLookAtLH
        DirectXMath 9343 ms
C++ 2781 ms
ASM 1641 ms
XMMatrixTranspose
        DirectXMath 0.719s
        C++ 0.125s
ASM 0.125s


So, I am killing Microsoft's own implementation and this is just using normal FPU commands.

jj2007

You could probably get a big boost with SIMD instructions.

As a side note, some older BASIC dialects had matrix commands. GfaBasic, for example, has about 20 of them: MAT ADD, MAT CPY, MAT INV, MAT MUL, and so on. I have never used them, but I wonder whether they could be interesting for game development. For more recent versions, see Operations on Arrays.

Lonewolff

Yeah, I plan on looking into SIMD.

I thought it would better to learn the basic FPU operations first. Pretty confident with the basic FPU use now.  :t

Lonewolff

Another demo file (rotating cube) 8)



My matrix library is done and bug free.

Next will be a directional light to give the scene some more feel to it.





Siekmanski

Creative coders use backward thinking techniques as a strategy.


Lonewolff

That was a mission and a half  :icon_eek:

Let there be light!



zedd151

Looks rather cubic.  :P

I noticed the smoothing of the edges, though.

Why is it that such cubes (not only yours) have a seemingly unnatural and exaggerated perspective?  Could be my eyesight as well.   :eusa_boohoo:

Lonewolff

Yep, I smoothed the edges of the cube to bring out the lighting.

The camera is a 0, 2, -2 and the cube is rotating. Probably looks exaggerated being a 3D perspective camera.

zedd151

Is it a predefined algorithm  for the perspective?  Or something that you have control over?

Lonewolff

Somewhat predefined. You have control over field of view, aspect, near plane, and far plane.

zedd151

Okay, thanks. I have no clue when it comes to 3D rendering. I'll leave that to the graphics pros like you and siekmanski. And felipe is trying hard to be like you guys btw. Gotta admire his spirit and "can do" attitude.

felipe

Quote from: zedd151 on April 30, 2018, 10:22:32 AM
And felipe is trying hard to be like you guys btw

:biggrin: Unfortunately i have been very misunderstanding... I really don't want to imitate nobody here. You have to know that this libraries are widespread to anybody...well, maybe not so much friendly with asm programmers, but Siekmanski helped with that a lot!  :idea:

felipe

QuoteSorry. I didn't mean that you were trying to imitate, rather you are trying hard to be a successful graphics programmer but are having a hard time with it.

Larry

No, zedd151, sorry. I'm not trying that and i'm not having a hard time with it neither. :idea: Just think on me as a discrete programmer with a lot of interests than don't have the time neither the intentions of been tied to any project.  :t