The shoutbox is currently out of service. Join us on Discord instead.
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 3 Guests are viewing this topic.

DJ Omnimaga

Yeah I was curious about that. I know that solidFRAME has sorting but his models seems to have more details so I was curious about if the slowdown would be severe.

TheMachine02

I actually run my engine at 320x240 resolution ... I am not sure if solidFrame run at this resolution or not actually. That is why they look more detailed. (Or solidframe just draw triangle with 2x2 pixel size, dunno). tr1p1ea if if you can enlight us on this point you are welcome  ;)

Also, about z-sorting, well doing it right is kinda hard, especially with a library implementation. Two though : spatial coherency might be used (that is, from a frame to an other frame, not much change in the sorted list, so insertion sort might be great here). And the second one is it *might* be a good idea to get backface culling running before trying to sorting polygons ... data structure need to be quite robust also. So, many problem, many solution, but not enough time (for now) to implement them  :P

Quote from: DJ Omnimaga on June 02, 2016, 09:55:51 pm
The Prime uses some sort of list of coordinates IIRC. 1 rectangle for example is something like ((0,0),(0,10),(10,10),(10,0)) or maybe it was with brackets.

Also that last model is running at quite good speeds considering how complex it is for calculators. :) Is that Lara Croft?


It is indeed a lara croft model from the legend game (kinda scale down). Seeing the format, I guess that could be done. Just some C and you are good.

DJ Omnimaga

I think solidFRAME still runs at 160*120, scaled up or in 8bpp mode, for compatibility with the CSE version, but I could be wrong.

TheMachine02

Quote from: DJ Omnimaga on June 03, 2016, 04:18:00 pm
I think solidFRAME still runs at 160*120, scaled up or in 8bpp mode, for compatibility with the CSE version, but I could be wrong.


That could be, indeed.

Sooooo have a badly optimized crappy z-sorting algorithm (and I am serious here  :P)


(512 frames for one turn)
Z-sorting :                                                                                               without :
   
(512 frames for one turn)

(256 frames for one turn, only 3000 poly cause I reached the 65536 bytes limit  O.O)

So there is no backface culling, and algo is pretty crappy, but I guess that spacial coherency payed : there is an inital overhead (more or less big, lara model get a biiiig overhead), but once this is passed, the thing that take time is actually calculating the Z key for all the polygon. Look good though.

DJ Omnimaga

The first ones are quite impressive, speed-wise :D. The Lara Croft one got pretty slow, though O.O (but it's pretty intensive in polygons so that's expected)

TheMachine02

Yeah that is because there is more overhead trying to process the triangle than actually drawing it  :P

But, yeah, other got nearly 0 overhead, because the list doesn't change much between frame.

DJ Omnimaga

So I will ask again like I did on Omni: Would this engine be useable for very simple maps? (eg plain-colored walls with no texture and hardly any details) It would definitively be cool to see some sort of simple game using this engine for both very simple models and simple maps) (the character could just be made of cubic shapes like in Minecraft)

tr1p1ea

Yes solidFRAME draws half-res ... the models look good at 320x240, nice work!

DJ Omnimaga

Would drawing at lower resolution with doubled pixels improve the speed, by the way?

TheMachine02

Quote from: DJ Omnimaga on June 04, 2016, 04:45:53 am
Would drawing at lower resolution with doubled pixels improve the speed, by the way?


Well less drawing would mean more performance ... but then on small triangle you aren't limited by drawing, but by overhead (which is quite huge right now). So, I don't know. Maybe, I'll said.

Quote from: DJ Omnimaga on June 03, 2016, 09:07:06 pm
Would this engine be useable for very simple maps?


In the current state, no. There is no cliping going around, and thing are pretty much messy.  :P  However, once it will be more clean, I'll guess something like X3D would be doable.


EDIT : btw tr1p1ea, what Z index are you using for sorting ? right now, I use average of 3 vertices z coordinate after the transform, but it raise some issue with a simple cube :



EDIT2 : beware of the crime hour ....


DJ Omnimaga

Haha I remember that little guy from Final Fantasy VII in battles (assuming it's him?). Looks quite nice. :)

For maps, maybe @catastropher could help if he's still around?

TheMachine02

Well he appears in many FF actually ... :P

Well I guess designing a simple map isn't *so* hard, I'll take a try one day...

DJ Omnimaga

Yeah I know, but FFVII semeed to be the only one I remembered exactly him from. :P IIRC he was in older ones too but I forgot which, plus I don't think he always did his death attacks the same way in older ones.


TheMachine02

Yeah, many monsters changed attack between ff. I do think he appears in V,VI,VII, VIII, IX, X,XIII.

DJ Omnimaga

True, but I think starting in FFVII he always did the same attack for the next games, right? (slowly move towards party then instakill everyone)

Powered by EzPortal