Progress Thread - New demo - Cobra Mk III (18-May-08)
Moderator: qarnos
I've added a "look at" routine for the matrices - it's now possible to track an object as it moves around.
You can try it out for yourself here. The cobra starts off behind the camera. When you go into object control mode (press ENTER) the camera will start tracking the cobra. If you switch back to camera mode, the camera will assume it's previous orientation.
Screenshot - first half with stars on, second half with stars off:
You can try it out for yourself here. The cobra starts off behind the camera. When you go into object control mode (press ENTER) the camera will start tracking the cobra. If you switch back to camera mode, the camera will assume it's previous orientation.
Screenshot - first half with stars on, second half with stars off:
"I don't know why a refrigerator is now involved, but put that aside for now". - Jim e on unitedti.org
avatar courtesy of driesguldolf.
avatar courtesy of driesguldolf.
Partially because I'm lazy, and partially because there's still a lot work to do even just to display a point.CoBB wrote:This looks a lot more professional already than many old PC games.
How come stars cause such a performance hit?qarnos wrote:Screenshot - first half with stars on, second half with stars off
There are 120 stars in the demo - 15 "raw points" mirrored across all three axis' to produce the full 120. That comes up to about 57,000 T-states for each frame.
The actual star code is also pretty badly written - It was done as a hack to allow you to get a better idea of your orientation. The main point I can think of is that the culling code tests each star against every plane, regardless of whether one of the earlier tests failed. I should really fix that. I'd estimate I'm wasting ~150 T-states per star on average. That adds up pretty quickly.
"I don't know why a refrigerator is now involved, but put that aside for now". - Jim e on unitedti.org
avatar courtesy of driesguldolf.
avatar courtesy of driesguldolf.
- driesguldolf
- Extreme Poster
- Posts: 395
- Joined: Thu 17 May, 2007 4:49 pm
- Location: $4080
- Contact:
Nice. I've tried interlacing in the past but when I tried to modify fastcopy to update the lines horizontally I failed horribly then failed again trying to rewrite an lcd upate routine (but I couldn't make it independent of the lcd wait thingie).qarnos wrote:*interesting explanation*
This is encouraging me to try that again.
I've just had my first success running the library as a flash library. All it did was load the identity matrix, but it worked
The loading code is pretty small - the program has to look-up the application using _FindApp and then set the ROM page by outputting to port 6. It's about 40 bytes of "boilerplate" code in total, which gives you access to the whole library
The only problem will be calling shell routines - it can be done but requires disabling interrupts, paging the shell in, calling the routine, then paging back.
I have a free weekend this week, so I might be able to put out an early alpha version of the actual library, which will at least let you have a play around with it and import simple (no depth-sorting) models.
If you're wondering why I am going the flash-library route - the latest version DEMOCUBE had code running up to $BFD0
The loading code is pretty small - the program has to look-up the application using _FindApp and then set the ROM page by outputting to port 6. It's about 40 bytes of "boilerplate" code in total, which gives you access to the whole library
The only problem will be calling shell routines - it can be done but requires disabling interrupts, paging the shell in, calling the routine, then paging back.
I have a free weekend this week, so I might be able to put out an early alpha version of the actual library, which will at least let you have a play around with it and import simple (no depth-sorting) models.
If you're wondering why I am going the flash-library route - the latest version DEMOCUBE had code running up to $BFD0
"I don't know why a refrigerator is now involved, but put that aside for now". - Jim e on unitedti.org
avatar courtesy of driesguldolf.
avatar courtesy of driesguldolf.
OK - I have a mostly functional pre-alpha-preview-beta version of the library functioning. You can download it here
Here's a basic rundown of the contents of the file:
bin/aether.8xk - the engine
bin/aldemo.8xp - the cobra demo
src/aether.inc - include file for the engine
src/aldemo.asm - the source for the demo
tools - stuff used to assemble stuff
makedemo.bat - an assembly batch file. Usage is makedemo filename[.ext]. The source must be in the src directory and the output will be placed in bin.
doc - really crappy not quite up-to date documentation.
models/obj - wavefront .obj files of several elite ships.
models/asm - compiled versions of the models
models/makeall.bat - batch file to create the .asm models from the .obj files.
The only thing worth mentioning is tools/import.exe. This is a really bad barely functional object converter (obj to asm). Input and output are through stdin and stdout, so to run it you would type:
import < input.obj > output.asm
It has one switch, -r, which causes it to produce polygon normals in the other direction - so if your object looks inside out, use this.
import will only use backface culling for visible surface determination, so no complex models can be created. Also, the faces are assigned whatever dither pattern the imported feels like - there is no way you can control this.
Also, it wont work on most .obj files because it doesn't parse them properly. It should work on files produced by Wings3D, so if you have problems, download Wings3D, import your model, then export it
All of this is still work in progress, so a lot of things will change. This release is just for anyone who wants to try and tinker with it a bit.
The engine uses appBackUpScreen for it's variables for now - until I can find somewhere more appropriate - so don't touch it.
Here's the demo running the "Boa" model.
Here's a basic rundown of the contents of the file:
bin/aether.8xk - the engine
bin/aldemo.8xp - the cobra demo
src/aether.inc - include file for the engine
src/aldemo.asm - the source for the demo
tools - stuff used to assemble stuff
makedemo.bat - an assembly batch file. Usage is makedemo filename[.ext]. The source must be in the src directory and the output will be placed in bin.
doc - really crappy not quite up-to date documentation.
models/obj - wavefront .obj files of several elite ships.
models/asm - compiled versions of the models
models/makeall.bat - batch file to create the .asm models from the .obj files.
The only thing worth mentioning is tools/import.exe. This is a really bad barely functional object converter (obj to asm). Input and output are through stdin and stdout, so to run it you would type:
import < input.obj > output.asm
It has one switch, -r, which causes it to produce polygon normals in the other direction - so if your object looks inside out, use this.
import will only use backface culling for visible surface determination, so no complex models can be created. Also, the faces are assigned whatever dither pattern the imported feels like - there is no way you can control this.
Also, it wont work on most .obj files because it doesn't parse them properly. It should work on files produced by Wings3D, so if you have problems, download Wings3D, import your model, then export it
All of this is still work in progress, so a lot of things will change. This release is just for anyone who wants to try and tinker with it a bit.
The engine uses appBackUpScreen for it's variables for now - until I can find somewhere more appropriate - so don't touch it.
Here's the demo running the "Boa" model.
"I don't know why a refrigerator is now involved, but put that aside for now". - Jim e on unitedti.org
avatar courtesy of driesguldolf.
avatar courtesy of driesguldolf.
- GuillaumeH
- Regular Member
- Posts: 143
- Joined: Fri 17 Dec, 2004 8:30 pm
- Contact:
- elfprince13
- Sir Posts-A-Lot
- Posts: 234
- Joined: Sun 11 Dec, 2005 2:21 am
- Contact:
Re: Progress Thread - New demo - Cobra Mk III (18-May-08)
out of curiosity, how many poly's was the Cobra model? I'm kind of tempted to try and export some of my models for the Torque Game Engine to here, just to test.
Re: Progress Thread - New demo - Cobra Mk III (18-May-08)
Sorry I haven't been around lately. I've been working on some neural network stuff which has been eating all my time. (NNet's are fun )elfprince13 wrote:out of curiosity, how many poly's was the Cobra model? I'm kind of tempted to try and export some of my models for the Torque Game Engine to here, just to test.
The cobra model (compiled version found in the models/asm directory) contains 26 vertices and 19 faces.
I created a sphere with 114 vertices and 128 faces and it ran surprisingly fast. I can't remember exactly, but I think it was 10-15 fps on my SE calc.
I need to dig up this stuff and start working again.
"I don't know why a refrigerator is now involved, but put that aside for now". - Jim e on unitedti.org
avatar courtesy of driesguldolf.
avatar courtesy of driesguldolf.
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
Re: Progress Thread - New demo - Cobra Mk III (18-May-08)
I'm glad to see you're still around and thinking of this project. What are your next plans?
Re: Progress Thread - New demo - Cobra Mk III (18-May-08)
Ummm... well, I guess the first step is to try and figure out where I was up tobenryves wrote:I'm glad to see you're still around and thinking of this project. What are your next plans?
I know the documentation and conversion tools still need a lot of work. The API also needs a bit of fleshing out. The bones are all there, but I need some more high-level stuff. In the state it is currently in I would be surprised if anyone other than myself could piece together enough of it to get a usable program.
So I guess I have some work to do.
"I don't know why a refrigerator is now involved, but put that aside for now". - Jim e on unitedti.org
avatar courtesy of driesguldolf.
avatar courtesy of driesguldolf.
Re: Progress Thread - New demo - Cobra Mk III (18-May-08)
I've been trying to get back into this project again, and after spending 15 minutes figuring out how to get the thing to assemble ( ), I decided to take a video of it running on my 84+.
If you haven't seen it running on a 15mhz calc before, it is actually quite smooth - averaging around 30fps.
http://www.youtube.com/watch?v=5LzzKc9X2Ms
If you haven't seen it running on a 15mhz calc before, it is actually quite smooth - averaging around 30fps.
http://www.youtube.com/watch?v=5LzzKc9X2Ms
"I don't know why a refrigerator is now involved, but put that aside for now". - Jim e on unitedti.org
avatar courtesy of driesguldolf.
avatar courtesy of driesguldolf.
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
Re: Progress Thread - New demo - Cobra Mk III (18-May-08)
Wow, nice to see you're getting back into the project. Very smooth video, too.