Author Topic: Descent 68k/X3D  (Read 26835 times)

0 Members and 1 Guest are viewing this topic.

Offline catastropher

  • LV2 Member (Next: 40)
  • **
  • Posts: 30
  • Rating: +11/-0
    • View Profile
Re: Descent 68k/X3D
« Reply #15 on: April 09, 2015, 07:26:27 am »
I just love it! :D
Thank you!!! This is the most ambitious project I've ever taken on (with a codebase around ~10,000 lines), but somehow it seems to work :P

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: Descent 68k/X3D
« Reply #16 on: April 09, 2015, 09:29:48 am »
This is by far one of the coolest things I've ever seen on the 68k series. Question: do you use tigcc or gcc4ti for programming this?
I am Bach.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Descent 68k/X3D
« Reply #17 on: April 09, 2015, 10:51:21 am »
10,000 lines !? O.O dang, and I thought nKaruga was big with 6658 lines of actual code (not including images).

Offline catastropher

  • LV2 Member (Next: 40)
  • **
  • Posts: 30
  • Rating: +11/-0
    • View Profile
Re: Descent 68k/X3D
« Reply #18 on: April 11, 2015, 11:59:16 pm »
This is by far one of the coolest things I've ever seen on the 68k series. Question: do you use tigcc or gcc4ti for programming this?
:D I am currently using TIGCC... should I be using GCC4TI?

10,000 lines !? O.O dang, and I thought nKaruga was big with 6658 lines of actual code (not including images).
Of course, I'm including the number of lines for the level converter, among other things ;)

Anyway, here is the latest version of X3D (with the light bridge!) :w00t: The file size is currently enormous because it's compiled with -O3 (I needed the speed for my school project). I will work on optimizing it in the future, though. The current version has a number of bugs but hopefully it won't cause any crashes. That being said, make sure you (a) have a lot of memory free and(b) you put level01 in the same folder as X3D or your calc will crash really fast!

Btw, I will be making this into a full game engine. Is there anyone who is interested in making some games with it? If so, I have several really cool ideas planned... and several optimizations to make it faaaast :) I am nervous to release the source the code (even though it's publicly available on my github: https://github.com/catastropher/X3D-68k ;)) simply because a lot of it was written rather quickly (read: written badly) and it's going to change drastically soon. Still, if you'd like to take a look, feel free!

Also yes, I undefed printf because I didn't have time to remove all the debug statements before UASIS...

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: Descent 68k/X3D
« Reply #19 on: April 12, 2015, 02:08:24 am »
This is really impressive. I'm a bit confused, though: If it's based on descent, why are the screenshots focused on walking around? The Descent I remember had zero-G flying everywhere!

In any case, great job on the engine. It might actually give me a reason to use my recently acquired TI-89.

Offline catastropher

  • LV2 Member (Next: 40)
  • **
  • Posts: 30
  • Rating: +11/-0
    • View Profile
Re: Descent 68k/X3D
« Reply #20 on: April 12, 2015, 02:14:48 am »
This is really impressive. I'm a bit confused, though: If it's based on descent, why are the screenshots focused on walking around? The Descent I remember had zero-G flying everywhere!
So originally I started out by wanting to just create Descent, but now my goal is to create a general 3D engine that would be able to run other games and, perhaps one day, Descent. The levels of Descent are very complex, however; my engine can render a level, but it does so at <1 FPS. The gravity was added so I had a working demo for my class project.

In any case, great job on the engine. It might actually give me a reason to use my recently acquired TI-89.
Thanks! :D With any luck we can revive the 68k community ;)

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: Descent 68k/X3D
« Reply #21 on: April 12, 2015, 06:32:20 am »
Just starred the source. Can't wait to see more!
I am Bach.

Offline catastropher

  • LV2 Member (Next: 40)
  • **
  • Posts: 30
  • Rating: +11/-0
    • View Profile
Re: Descent 68k/X3D
« Reply #22 on: April 13, 2015, 09:33:12 pm »
Just starred the source. Can't wait to see more!
Thanks! I have followers! :D

So both 2D and 3D clipping are O(n^2) algorithms. When you take into account that you have to do it for each face of a cube (and there are many visible cubes!) this becomes O(n^3). Before, I was using a hybrid 2D/3D polygon clipper, but now I'm doing it the way portal rendering is supposed to be done (all in 3D). This means I have gotten rid of a O(n^3) from my rendering function and X3D renders 2-3 FPS faster! :D

The next algorithmic change I'll be making will also be quite significant. A cube has 12 edges, each of which are shared between 2 faces. Currently, clipping happens on a per face basis. Since an edge is shared between two faces, it's actually getting clipped twice (but only drawn once)! So, my next optimization will be to do clipping on a per edge basis, which will the cut the number of clips needed in half! It actually goes further than this because the clipping information can be propagated between cubes (since they share a face) but more on that later... My ultimate goal is to achieve 15-20 fps so we'll see how feasible that is (with just 3D clipping it gets 9-12 fps) ;)

Offline rwill

  • LV2 Member (Next: 40)
  • **
  • Posts: 29
  • Rating: +3/-0
    • View Profile
Re: Descent 68k/X3D
« Reply #23 on: April 19, 2015, 12:25:32 pm »
Textures are always a big deal with calculator 3D engines, because they require a loooot of processing power. As far as I know, the only engine that's fast enough to provide textured polygons is nGL on the TI-Nspire because this calc has a lot of processing power actually.

Well "someone" ported Quake to the Nspire and it was kinda fast enough. When completely implementing from scratch for the Nspire, like taking the lack of floating point hardware support into account, the relatively excessive amount of memory and the somewhat modern ARM architecture one could even do faster than that. But this is the 68k board, the Motorola 68k CPU was released in 1979... see attachment.

Since it's a portal renderer, if the portal isn't visible, whatever's on the other side isn't either. [...] I wonder if there's a way to efficiently programmatically determine potential visible sets...

You can precalculate the PVS for a cube to generate an array of bit flags representing the other cubes visibilities for that cube. Quake did that and I did that in Delsgolf. For the cube you want to generate the PVS for you just generate planes with the cubes on the way to the target cube and clip the target cube by the planes. Clipped target cube == not visible. Details are somewhat delicate but explained all over the internet.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Descent 68k/X3D
« Reply #24 on: April 19, 2015, 02:19:25 pm »
That is just looking amazing :o

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline rwill

  • LV2 Member (Next: 40)
  • **
  • Posts: 29
  • Rating: +3/-0
    • View Profile
Re: Descent 68k/X3D
« Reply #25 on: May 14, 2015, 07:07:27 am »
I think I scared him :(

Offline catastropher

  • LV2 Member (Next: 40)
  • **
  • Posts: 30
  • Rating: +11/-0
    • View Profile
Re: Descent 68k/X3D
« Reply #26 on: May 14, 2015, 11:26:32 pm »
I think I scared him :(
Don't worry, you didn't scare me! haha I've just had some health issues that have prevented me from using my hands much this last month (arthritis and the like). I'll be back soon though! :)

Offline catastropher

  • LV2 Member (Next: 40)
  • **
  • Posts: 30
  • Rating: +11/-0
    • View Profile
Re: Descent 68k/X3D
« Reply #27 on: May 25, 2015, 05:27:24 pm »
I'm back to work on the project! Also, my friend Jason is working on it with me too! It may be a little while before there's anything to really show though because the engine is being rewritten. I'll post more when there's progress! :D

Offline catastropher

  • LV2 Member (Next: 40)
  • **
  • Posts: 30
  • Rating: +11/-0
    • View Profile
Re: Descent 68k/X3D
« Reply #28 on: June 03, 2015, 09:51:38 am »
I thought I'd give a bit of an update as to how the engine rewrite is coming. So far, everything has been going great! Right now, we're just getting the foundation built. In the meantime, I have devised several new optimizations for the renderer. I believe that once implemented, the engine will be able to push 25-30 fps! :D

So, what features will X3D support?
  • It's now a library so anyone can use it in their code!
  • Cross platform (currently builds for TIGCC/GCC4TI and GCC)
  • Levels constructed of convex interconnected prisms instead of cubes (so you could have e.g. an octagonal prism tunnel)
  • Three different types of portals - these will allow a portal gun and so many other neat features (will discuss later)
  • Vector graphics for textures i.e. line art (like the holo switch) drawn on walls
  • Moving objects (like e.g. robots in Descent)
  • Materials that can be attached to a face e.g. glass, which mean it's breakable
  • Doors
  • A simple scripting language?
  • Moving platforms
  • A simple physics engine for collision detection
  • Weapons

It's still in the early stages but this project has so much potential! Thanks for the continued support everyone! :)

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Descent 68k/X3D
« Reply #29 on: August 22, 2015, 08:36:25 pm »
 @catastropher Apparently this has developed beyond the scope of the 68k calculators now. That's pretty awesome. You should update the thread title to reflect that and give us an update! :thumbsup: