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 4 Guests are viewing this topic.

Dream of Omnimaga

12 FPS is quite good considering how complex that model is :D
  • 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 finally got appv reading from the archive working. Actually it didn't add too much overhead (about 250000 TStates per frame). Pretty sure I can reduce the actual number of read from the model, with pipeline optimization.
And yeah, 12fps is really good, but I guess some carefull optimization could improve it. I am more on implementing stuff though  :P Optimization will come later  ;)

Dream of Omnimaga

Glad to see it now supports archived appvars. Otherwise it can be a bit annoying if we have to unarchive/archive stuff back and forth. I could understand if you couldn't support that for speed reasons, though.
  • 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, I just need to limit read from model and the speed impact is more than limited, thanks to the linear adress. (Don't need page swapping like on old z80). There is added wait-states indeed, but it isn't too bad. Thee chocobo model still run at about ~12fps even if the appv is archived.

Dream of Omnimaga

  • 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

I've been playing with light and I though this screen look so cool that I've should post it  :P It is only a black background combined with ambient lightning and a light coming from the top.
Few things under the hood, small opts (removed about ~100000TStates). On side note, I think I may be able to move the backface culling test in the world space, allowing to not transform the vertex which should be backface culled. That come at a little cost of 3 bytes supplemntary data per polygons, but that isn't too bad. Proper pipeline implementation is still being writed, so didn't start to implement it. Few bugs fixes here and here too, and few new functions. (Still have to get a proper vector/quaternion/matrix library implementation though, as only a few functions are implemented).
So yeah, next clipping  <_<



Have your little download to play with too  ;) (even if there isn't much to do...)

Dream of Omnimaga

This looks even cooler on a black background 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

I worked a bit on the converter so converting model to 8xv appv aren't as messy as there were, and so I converted the tomberry model to lighning+backface culling. Result look nice I guess, although lightning look  bit weird, but that is because of the model (low lighted color from begining and really blocky model).



Some stuff under the hood too, as always, some cliping functions have been implemented.

Dream of Omnimaga

Looks nice :)

Btw can this engine be used in a C game?
  • 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

In the current state, nope. It will need wrapper around function to work proprely since most of the function take input as registers. This is feasible though (but require some works).

Dream of Omnimaga

Ah sorry to hear. Maybe something to consider in the future, since most CE devs program in C or hybrid BASIC (for hybrid BASIC someone could write a lib that uses real() like xLIBC but if you have GLIB installed it lets them use it to draw polygon-based images or something.)
  • 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

C library was planned at the begining, I've just concentrate on getting things work  :P. As for hybrid basic, why not ? I doubt it will be feasible in term of speed ... depends on what you'll do outside of the library (and usually, it will be physic (hard), model handling (hard in basic), ressource loading/matrix setup).

Dream of Omnimaga

For hybrid BASIC I think the main use would be drawing of static models and perhaps some slow animations of simple models. For example, if someone wants to display enemies in an RPG battle.
  • 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 in that case I guess we don't need to many commands, and that may be possible. Futhermore, it could be used with sprite by grosged to handle correctly the 8bpp mode and text/sprite. I'll try then  :P

EDIT : did you really think I won't put epic screenshot before I leave for holidays ? Well, you are wrong !



>3400 polygons, with bfc  :P And I know some colors are off. Blame blender for that, I need to fix the model <_<


Powered by EzPortal