Jump to content
IGNORED

Elite 3D graphics


Thomas Jentzsch

Recommended Posts

Wow, this is very impressive! Are you going to continue updating in this thread, or so we have to switch over to your blog?

Here, obviously. :)

 

I did some (mainly) speed optimizing over the last days. Nothing too dramatic, but for me as a programmer very satisfying. E.g. I managed to utilize the free kernel time to clear part of the double buffer for the next frame and gained 10-15% more fps from that alone. And I optimized my flexible task scheduler so that it now works very efficiently.

 

Also fixed some bugs (with a little help from good friends ;)). Now the binaries should run on real hardware without problems too. But I didn't switch to more accurate math yet.

 

Finally I added a few ships, with the Gecko being my current favourite for testing. It displays at ~16 fps NTSC and ~21 fps PAL (PAL has more free CPU time).

Gecko (NTSC).bin

Gecko (PAL50).bin

  • Like 1
Link to comment
Share on other sites

15 fps is the snes star fox frame rate!

Everthing up to 12 is very good. Assuming you will need much time to calculate the radar and the frame rate should decrease...

Yes, a decrease of frame rate sure will happen if this is turned into a full fledged game. It's not only the radar etc. but also the AI and resulting movements of the world around you which has to be calculated. But that shouldn't be too bad (just one transformation per object to position it relatively to the player's view port). And some background stars to illustrate the player's ship is moving are also missing. :)

 

Also there are still a few 3D calculation optimizations possible:

- skipping point transformations if they belong to an already known hidden polygon, you only need 3 transformed points to calculate the surface normal of a polygon).

- some kind of intelligent hidden surface detection based on previous frames, which would allow skipping a lot of point transformations. If e.g. the previous frame's surface normal of the polygon was off from visibility by 60° and the object was only rotated by less than 60°, then the polygon still has to be invisible.

- Or defining and transforming the surface normal of each polygon before doing its point transformations. (I think I will try this one first.)

 

Also the line drawing still has a little bit of optimizing potential, but I am running out of space in the only possible bank. And I still have to implement line clipping.

 

Personally, it's the best thing I ever saw on 2600 hardware, after interlacing chrono color. :)

Thanks. :)

Link to comment
Share on other sites

Two words: Battlezone Arcade!!! ;)

Bah, where's the 3rd dimension? ;) Something like NetWars sounds much closer.

 

Looks awesome, Thomas - you are truly innovative with the things you come up with. :)

Nothing really innovative, IMO. And not even my idea. It was just waiting to be done eventually.

Link to comment
Share on other sites

Decission time!

 

I am about to remove the perspective projection (right difficulty switch) inside the ship itself from the 3D calculations. While it is pretty nice looking for close objects, I think we could live without it too. The ship would simply be zoomed as a whole instead.

 

<technical rant>

The reason for this is, that this kind of projection makes it much more complicated to detect if a surface is visible or not. With perspective, you have to calc three (which means almost all if not all points of the polygon) points (X,Y and Z) and then the Z-value of the surface normal from those three points. Without perspective, I can use a predefined surface normal and calculate the Z-value from that one (if anyone knows how to do this with perspective projection, please tell me). This is obviously much faster.

 

And if a surface is invisible, its (remaining) points (as long as they do not belong to a visible surface too) do not have to be calculated. That way you can save calculations for of up to 50% of the points (maybe 25% on average here). Currently I am not even removing those points from calculations, because the polygons are usually pretty simple (~4 points on average) so the savings are very small (just ~1 point on average) and eaten up by the additional required logic.

 

I hope this all makes sense. :)

</technical rant>

 

So what do people think? Try experimenting with the Gecko posted above with or without this feature, also at varying distances to get an idea of the difference and let me know.

 

BTW: Does anyone how Elite does it? With or without this extra projection?

Link to comment
Share on other sites

BTW: Does anyone how Elite does it? With or without this extra projection?

Why don't you ask the guy who coauthored the original game:

 

http://www.iancgbell.clara.net/maths/index.htm

It's not THAT important. And I can look at the released source code any time.

Link to comment
Share on other sites

Excellent work Thomas. I have to admit I'm a little bummed. You've already implemented what I had hoped to achieve. Still, it's nice to see a clear demonstration that this technology is possible on the 2600. Hopefully we'll see some 3D vector games spawned from this engine.

Edited by TROGDOR
Link to comment
Share on other sites

I have to admit I'm a little bummed. You've already implemented what I had hoped to achieve.

You deserve the credits for having the idea. After reading your blog I got interested. Then nothing happened there for a while. And having some rare, free time over Christmas, I decided to have a look at the possibilities myself. Originally I only wanted to code some fast line drawing, but then I couldn't stop. :)

 

I hope you are not too disappointed. And if you want to do it yourself or cooperate with me, you are welcome.

 

Still, it's nice to see a clear demonstration that this technology is possible on the 2600. Hopefully we'll see some 3D vector games spawned from this engine.

That would be cool. Since I have no imminent plans to turn this into a full fledged games, I will share the finished engine code with anyone interested.

Link to comment
Share on other sites

It's no problem. I've moved on to another ambitious experiment. I'll be posting it soon, probably this weekend.

 

Since I have no imminent plans to turn this into a full fledged games, I will share the finished engine code with anyone interested.

 

I will likely take you up on that at some point. I've had a game in mind for quite some time that I was debating whether to implement in 2D or 3D. That's what started me on the Elite research.

Link to comment
Share on other sites

I am about to remove the perspective projection (right difficulty switch) inside the ship itself from the 3D calculations. While it is pretty nice looking for close objects, I think we could live without it too. The ship would simply be zoomed as a whole instead.

 

...

 

So what do people think? Try experimenting with the Gecko posted above with or without this feature, also at varying distances to get an idea of the difference and let me know.

 

BTW: Does anyone how Elite does it? With or without this extra projection?

 

To my eyes, the loss of perspective is acceptable. I don't notice the perspective until the ship is rather close to the point of view. In play, a ship that close to the POV doesn't stay in the field of view for long. If going to flat scaling gives enough cycles for a playable game, then I say play on.

 

After a brief play of Elite (PC version), it looks like it used perspective.

 

I didn't yet say how impressive your work is, did I? Well, it's very much so.

Link to comment
Share on other sites

BTW: Any opinion about my "decision" post above?

 

I didn't notice much visual difference between the two modes for the Gecko. I'd say remove it and reclaim the cycles and archive the more accurate perspective as a code thread.

Link to comment
Share on other sites

One for the show. :)

 

BTW: The original Elite definitely uses perspective projection. You can see it when looking back after launching from the Coriolis station. While you are close, it has eight corners and it turns into a square when moving away.

 

I turned perspective projection off for now, but it did not give me as much speed up as I had hoped for. So maybe I will eventually add it again.

Cobra MK3.bin

Cobra MK3 (PAL).bin

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...