Author Topic: nGL - a fast (enough) 3D engine for the nspire  (Read 240620 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #120 on: March 09, 2014, 06:53:11 pm »
Wow, if it wasn't for the weird sky, someone could almost think it's the real game O.O

Offline Spenceboy98

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 547
  • Rating: +59/-2
    • View Profile
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #121 on: March 09, 2014, 06:56:08 pm »
Is there no .tns in the .tar.gz file? I can't seem to find it. :P
I like milk.

Offline Piguy-3.14

  • LV3 Member (Next: 100)
  • ***
  • Posts: 41
  • Rating: +1/-0
    • View Profile
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #122 on: March 09, 2014, 08:05:13 pm »
I feel stupid but you can download this right? I don't see a link anywhere... Update: never mind got it
« Last Edit: March 09, 2014, 08:08:26 pm by Piguy-3.14 »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #123 on: March 10, 2014, 02:24:45 am »
Yeah I just tried it and it's amazing. For some reasons, though, the speed on my calc is pretty much worse than in nCraft, although it's still much better considering there are textures and much deeper field of view. I am wondering if it could be because I am running an older hardware (revision B or C I think) or due to outdated Ndless version? I generally get between 2 and 8 FPS depending of how many blocks there are on the screen. My calc's AHB is setup to 66 MHz btw.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #124 on: March 10, 2014, 05:02:31 am »
Quote
Is there no .tns in the .tar.gz file? I can't seem to find it.
It is in there, somewhere.

Quote
Yeah I just tried it and it's amazing. For some reasons, though, the speed on my calc is pretty much worse than in nCraft, although it's still much better considering there are textures and much deeper field of view. I am wondering if it could be because I am running an older hardware (revision B or C I think) or due to outdated Ndless version? I generally get between 2 and 8 FPS depending of how many blocks there are on the screen. My calc's AHB is setup to 66 MHz btw.
That shouldn't be the case, it runs much faster than nCraft (though slower than nspire_emu, which says 16-18) on my calc (~10fps, never below 5)
The hardware revision shouldn't make any difference.

BTW: Could it be that you have to login now to download files?

Offline kevinkore3

  • LV3 Member (Next: 100)
  • ***
  • Posts: 57
  • Rating: +0/-0
    • View Profile
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #125 on: March 10, 2014, 06:04:08 pm »
It runs at about 10 fps laggily on my calc, 198mhz cpu and 66mhz ahb.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #126 on: March 10, 2014, 06:07:13 pm »
That's about the same for me, but I think 10fps are enough, so I'm not doing any searches for optimizations anymore.
Any suggestions for new features?

Offline kevinkore3

  • LV3 Member (Next: 100)
  • ***
  • Posts: 57
  • Rating: +0/-0
    • View Profile
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #127 on: March 10, 2014, 06:18:14 pm »
A random map generator with water and animals, and a deeper ground would be nice. I think it would be worth cutting a bit of the field of vision to make the ground deeper (like 10 blocks with ores) and have animals. There's also a bug where you can place a block where you are standing, and you can't move until you destroy it, and it gives you a glitchy image.


It runs at about 8fps at 132mhz and maybe around 12 at 198mhz, so it's probably worth overclocking the cpu to play(the ahb stays at 66mhz).
« Last Edit: March 10, 2014, 06:20:53 pm by kevinkore3 »

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #128 on: March 16, 2014, 09:45:30 am »
I found a bug in the ndless program startup code (no static and global vars initialized) so I had to debug it first before working on crafti.
The fix didn't make it into the newest ndless-sdk at time, so if you try to compile it yourself, it will crash. I included a version with textures disabled, if you want to use it. But it looks really ugly. And yes, it should work with ndless 3.6 out-of-the-box. I didn't test the current version, though.

New features in v0.7:
  • Faster! Perspective calculations now cached
  • Grass blocks
  • Sliding along walls: Before you just stopped moving completely
  • Not getting stuck in blocks anymore
  • Real world generation using perlin noise!
  • World has a maximum height of 40 blocks (and deeper ground)
  • Chunks are smaller (8x8x8)
  • Change the viewable distance using + and -
  • The block you currently selected is saved
  • Changed the sky color

The world generation is a lot slower than before, so while walking it will take some time. But once it's generated, you're able to walk without interruptions.
I also had to change the savefile format version, so older save files will not work with this version.



TODO:
  • Fix rare glitches
  • Frustrum culling
  • Make the version with textures disabled less ugly
  • Decrease clip plane further: You can see through blocks if you're really close
  • Show a text "Loading" when processing stuff
  • Inventory to quick select blocks
  • Mobs? I don't know which type and what they would have to do instead of annoying you
  • Transparent blocks: Could be slow
  • Any suggestions?

Offline nspireguy

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 158
  • Rating: +11/-6
    • View Profile
    • NspireGuy
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #129 on: March 16, 2014, 10:56:47 am »
can you interact w/ blocks yet???

ps.this is amazing!!!

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #130 on: March 16, 2014, 11:00:56 am »
This looks soooo cool :D Is it compatible with monochrome calcs ?

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #131 on: March 16, 2014, 11:06:28 am »
No, and as I don't have one, I wouldn't be able to test it. (other than nspire_emu)
It should be fairly trivial to make it compatible, if you rewrite nglDisplay to convert the screen buffer and switch the display controller from 4-bit into 8-bit mode.

Offline mdr1

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 303
  • Rating: +21/-2
    • View Profile
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #132 on: March 16, 2014, 11:12:46 am »
I like the new grass blocks! Great work!

You should maybe use a height of only 20 blocks because the world generation is really really slow.
Suggestion: not need to jump to climb on a simple block. It would enable to climb stairs without jumping.

The world generated may be too embossed.



Offline nspireguy

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 158
  • Rating: +11/-6
    • View Profile
    • NspireGuy
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #133 on: March 16, 2014, 11:25:34 am »
can you use blocks like a crafting table or furnace yet?????

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: nGL - a fast (enough) 3D engine for the nspire
« Reply #134 on: March 16, 2014, 11:57:48 am »
Quote
I like the new grass blocks! Great work!
I know I'm good at stealing minecraft's terrain.png.. But I'll have to change that sooner or later..

Quote
You should maybe use a height of only 20 blocks because the world generation is really really slow.
I know, but the height doesn't matter that much. It's more the smaller chunk size.
Quote
Suggestion: not need to jump to climb on a simple block. It would enable to climb stairs without jumping.
I find jumping better than just "glitching" on top of a block.

Quote
The world generated may be too embossed.
The generator has a maximum height of 0.7 times the world height.

Quote
can you use blocks like a crafting table or furnace yet??
No, what should they do? There is no inventory or items at all and all available blocks are accessible through "."
« Last Edit: March 16, 2014, 12:44:51 pm by Vogtinator »