Author Topic: Glib : a 3D graphics axe library  (Read 79634 times)

0 Members and 1 Guest are viewing this topic.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #75 on: April 25, 2013, 10:54:36 pm »
Why would anyone but a developer want the source?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: GLIB a graphics axe 3d librairy
« Reply #76 on: April 26, 2013, 12:19:41 am »
Why would anyone but a developer want the source?

To steal it and release it as his own work on ticalc.org. :trollface:
« Last Edit: April 26, 2013, 12:19:52 am by DJ Omnimaga »
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #77 on: April 26, 2013, 12:52:56 am »
They would have to figure out how it works first, so they could modify it enough to make it look different.

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #78 on: April 26, 2013, 11:40:30 am »
Why would anyone but a developer want the source?

it was just to prevent not to download it  ;D
else, here the readme
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline Dapianokid

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 539
  • Rating: +46/-27
  • That one dude
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #79 on: April 26, 2013, 03:51:26 pm »
This is amazing. Somebody write a game already ;)
Keep trying.

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #80 on: April 28, 2013, 12:48:00 pm »
If someone want to make a game of it, just ask me if there is a problem, or something is not clear...  :)

And of course I will be happy if you credit me and the other developpers  :P .
« Last Edit: April 28, 2013, 12:48:17 pm by TheMachine02 »
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: GLIB a graphics axe 3d librairy
« Reply #81 on: April 28, 2013, 04:13:05 pm »
By seeing the source, it appears that what I can do is already done :/ so I can't really help.

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #82 on: April 29, 2013, 10:01:00 am »
I'm sure you can do something. Maybe speed up the GSort() command by changing the sort algorithm ?
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: GLIB a graphics axe 3d librairy
« Reply #83 on: April 29, 2013, 12:49:26 pm »
What does it do already ? Sorting a 2-bytes list ?

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #84 on: April 29, 2013, 06:10:06 pm »
Sorting large lists of vertices can take an annoying amount of time. You may have to experiment with different sorting algorithms to see what gives the best results.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #85 on: April 30, 2013, 08:50:48 am »
The Gsort() command create a 2 bytes list of distance, sort them and give a list of ID like :

{1000,2500,5000,100}  -> list created
{2,1,0,3}  -> list of ID

I'm currently using a O(n²) algorithm, so it's sure it can be optimized  :P

as side part, I work on portal and run some speed test, with a constant speed for clipping :

a large world (256 vertices with 16 portals,16 vertices by sector) are rendering at the speed of +-17 fps  (in wired mode)
so it's perfectly playable !!
I hope the clipping will not be too much slow, tough.

AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #86 on: April 30, 2013, 09:07:50 am »
Then, the sorter arranges from highest to lowest. Why do you create a second list? It seems like it would be more efficient in later steps to simply iterate over the list, as opposed to searching through a number list to find the priority.

A good option could be timsort, the sorting function implimented in python. It's one of the best available, and as a bonus, isn't implemented recursively. (IIRC Axe doesn't support recursion, and I blame no one for that) Edit: I'm fairly sure I'm crazy, and timsort probably IS recursive.

Although, it may be better to go with a different route, since these lists will never be longer than 30 or 40 elements. Any faster would probably kill the calc. If we assume this, big-O becomes far less important than the actual equation for the speed.
« Last Edit: April 30, 2013, 09:28:58 am by willrandship »

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: GLIB a graphics axe 3d librairy
« Reply #87 on: April 30, 2013, 09:16:24 am »
So in GSortID, you build a list of X^2+Y^2, and then sort it from greatest to lowest ?

Also, these speed tests are made at 15MHz obviously ?

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #88 on: April 30, 2013, 09:21:08 am »
yes that the goal of the GSort()

but, if I delete the cmd, add a GDrwSortArray() cmd, who include direcly the sorting algo with somethng like as willrandship say (if I well understand):
Code: [Select]
for(nb_poly)
CALCULATE DIST
end

for(nb_poly)
for(nb_poly)
find the greatest value in dist list and retrieve ID
end
draw The ID e poly
make the IDe dist value be 0
end


it will be more optimized. (save data)

BUT the algorithm still in O(n²) and optimizable  :P
« Last Edit: April 30, 2013, 09:22:02 am by TheMachine02 »
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #89 on: April 30, 2013, 09:26:42 am »
You don't need to draw during the sort. Just sort the list in-place as opposed to creating a new, still unsorted list.

Are there any assumptions we can make about the output list?
« Last Edit: April 30, 2013, 09:29:32 am by willrandship »