Join us on Discord!
You can help CodeWalrus stay online by donating here.

[gLib][3d][z80][ez80] gLib a fast 3D asm/axiom library

Started by TheMachine02, January 19, 2015, 05:10:01 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

TheMachine02

Well it depends from the monster, and at least in VIII the attacks are kinda different. But in all case ther are like super hard to defeat  <_<

Dream of Omnimaga

Yeah I remember that 1 vs 1 battle with Cloud where I kept hitting the enemy and he would not go down, then I was dead. I hated running into that monster x.x (not as much as Marlboro, tho)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

TheMachine02

So I kinda optimized the sorting routine  :P  Should almost be overhead free now.



Next step is raster bugfix and optimization  :P

tr1p1ea

Looks good man!

Did you end up going with avg z still or something else?

TheMachine02

Yeah, still Z-average. It is the faster guess. (Altough I can pretty much change this easily). I figured that backface culling should get rid of most of the fighting issue. If you have a better idea ...  :P

Dream of Omnimaga

Pretty good now :D. Hopefully you can optimize it further :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

TheMachine02

Well seeing there is the clipping and backface culling  I need to implement, I am definitly not done optimizing and coding  :P. The pure sorting code will be hard to optimize further though.

Dream of Omnimaga

I hope that you can implement both clipping and sorting at the same time O.O
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

TheMachine02

Quote from: DJ Omnimaga on June 05, 2016, 08:18:55 PM
I hope that you can implement both clipping and sorting at the same time O.O

That shouldn't be an issue  :P

So on side note, I wrote a timer code, and I've been able to analyse a frame, for the chocobo model (341 vertices, 563 faces). The frame is composed as follow :

-vertices transform  -   890000 TStates
-sorting                     -   230000 TStates
-clear framebuff       -   530000 TStates
-triangle drawing      - 2300000 TStates

Which put the frame at around ~4000000 TStates, or about ~12fps. Impressive I guess !  :P

Dream of Omnimaga

Yeah 12 is very nice for a calculator. :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

TheMachine02

It also put the triangle filling routine at ~4000TStates (for small triangle size at least), or about 12000 Triangles/s  :w00t:

Dream of Omnimaga

By the way, how fast a Starwing space ship is? I forgot if that was attempted.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

TheMachine02

Wasn't tested, but given the model I found on the net (36 vertices, 52 faces), it is quite fast :


(512 frames for one turn)

EDIT : and yeah, it broke z-sorting too.

Snektron

Quote from: TheMachine02 on June 09, 2016, 10:12:47 AM
Quote from: DJ Omnimaga on June 05, 2016, 08:18:55 PM
I hope that you can implement both clipping and sorting at the same time O.O

That shouldn't be an issue  :P

So on side note, I wrote a timer code, and I've been able to analyse a frame, for the chocobo model (341 vertices, 563 faces). The frame is composed as follow :

-vertices transform  -   890000 TStates
-sorting                     -   230000 TStates
-clear framebuff       -   530000 TStates
-triangle drawing      - 2300000 TStates

Which put the frame at around ~4000000 TStates, or about ~12fps. Impressive I guess !  :P

530000 for a frame clear? o.o
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


TheMachine02

Yeah <_<. This is about 76800 bytes to clear at 7 TStates/bytes. (Actually it is more 540000TStates)

Powered by EzPortal