Author Topic: [z80 ASM] Unnamed set of 3D routines  (Read 8891 times)

0 Members and 1 Guest are viewing this topic.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [z80 ASM] Unnamed set of 3D routines
« Reply #30 on: July 06, 2013, 06:28:50 am »
Yeah good idea ;D

And thanks :)

EDIT : I wrote a preview of what will surely be the "graphical pipeline" part of the engine :

Graphical pipeline organisation
-------------------------------

0°) Fill (alreadyProcessed) with -32768
1°) Retrieve element from stack
   a) object type : 1 byte
   b) rendering mode : 1 byte
   c) offset(s) : 2 bytes
2°) Test object type
   2.1°) OBJECT_DOT :
      a) Retrieve vertex from vertices table
      b) See if it has already been processed during the rendering process. If yes, retrieve coordinates and jump to f)
      c) Rotate
      d) Project
      e) Save coordinates
      f) Clip a square of 2*2 pixels at the calculated coordinates
   2.2°) OBJECT_LINK :
      a) Retrieve the first vertex from vertices table
      b) See if it has already been processed during the rendering process. If yes, retrieve coordinates and jump to f)
      c) Rotate
      d) Project
      e) Save coordinates
      f) Repeat a)b)c)d)e) for the second vertex
      g) Retrieve coordinates
      h) Draw a clipped line between the two calculated coordinates
   2.3°) OBJECT_TRI :
      a) Retrieve the first vertex from vertices table
      b) See if it has already been processed during the rendering process. If yes, retrieve coordinates and jump to f)
      c) Rotate
      d) Project
      e) Save coordinates
      f) Repeat a)b)c)d)e) for the two other vertices
      g) Retrieve coordinates
      h) Draw a clipped triangle with the three calculated coordinates
3°) If there is another object on the stack, jump to 1°)


What do you guys think of that ? Do you think of anything I could add ?
« Last Edit: July 06, 2013, 06:51:50 am by Matrefeytontias »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [z80 ASM] Unnamed set of 3D routines
« Reply #31 on: July 07, 2013, 02:40:23 am »
This looks really fast Matrefeytontias. Of course at such fast speed, if you're gonna make a game you might actually have to artificially reduce the framerate by only updating the LCD every two or three frame like the grayscale version of gbc4nspire, but I guess that with more complex stuff you might not really need to drop the speed yourself anyway. :P