Jump to content
IGNORED

Fight for Life engine


phoboz

Recommended Posts

1 hour ago, ArneCRosenfeldt said:

Such a different world. I cannot read 68k assembly very well. I spend more time with MIPS ( for a test ) and then reading the JRISC manual

It's just assembly for another CPU, you learn assembly on one CPU, and then it's not to difficult to learn/understand another. I learned x86 assembly first (long ago) However, I greatly prefer to be able to use C when possible.

(Because if you are not careful assembly code easily turns into spaghetti code)

 

Was MIPS assembly the first assembly language you learned?

It's also a RISC CPU, so you may have a good starting point for gpu assembly.

 

I think I read that you use the MiSTER FPGA core, you may be better of to start by using an emulator. At some point you must get unto real hardware, especially as 3D does not work properly on any emulator (I would not even think about 3D in the MiSTER core)

 

A Skunkboard might be the most obtainable option, as the transfer tool works both in Windows, and Linux.

The gamedrive transfer tool is a Windows only application (maybe it could work in wine?)

 

However, I think you need to get to work now, with a little bit of less talking :)

 

You will get quite far by looking at the examples in the jaguar-sdk:

https://github.com/cubanismo/jaguar-sdk

 

This might be a good staring example (as I think it work in most emulators?)

https://github.com/cubanismo/jaguar-sdk/tree/master/jaguar/source/jagmand

 

If you want to dive directly into game programming (skip understanding the low level stuff for now) I can recommend to check out the Removers' library.

https://github.com/theRemovers/rmvlib

 

There is also another path to check out JagStudio:

 

Edited by phoboz
  • Like 1
Link to comment
Share on other sites

On 1/22/2022 at 4:59 AM, phoboz said:

I have explored the engine of the Atari 3D demo, and it has its shortcomings. 

 

1. Has anyone managed to compile Fight for Life from sources using a modern toolchain?

 

2. Next would of course be to understand it. Has anyone started to dig into the code yet? What I have seen so far that it's all assembly. The main file (pong2000) is several 1000s of lines long. Very hard to get an overview how to use the 3D engine.

 

3. The final step would of course be to extract the 3D engine so it could be used as a generic 3D engine in other projects.

 

(4). The game also seems to use some other nice features, such as the FM synth for music. There were discussions in the past if this would be to heavy on the bus, but if it worked in Fight for Life it should be possible to use in other performance demanding games as well.

 

So even if Fight for Life was not the most enjoyable game on the Jaguar, the code may hold the keys for future (more enjoyable) 3D games to be developed.

 

I've never heard of anyone being able to compile it. That would be fun, just to at very least experiment with it like Checkered Flag. Then there are the ancient tools and not so friendly for ancient hardware modern day tools that complicate matters more. I was able to import some of the model animation files into some 3D programs but that was like 10 years ago.

 

As far as whomever owns whatever remains of Fight for Life as it is (to whatever extent that may be) considering the source code has been sold and whored out on CDs for 20+ years to the general public, I'm not sure how much it matters unless you go using the same name, characters, etc. (which you wouldn't do) and even then, very unlikely you'll even get that far, let alone compile anything worthwhile. It would be like taking the incredibly flawed Checkered Flag engine and trying to make something useful from it.

 

From a technical standpoint, I was always quite impressed with how well FFL ran on the Jaguar. Not so much the gameplay but that had more to do with timing and over inflating an already bloated idea for such limited hardware.

 

The 3D wireframe globe demo included with the Jag dev kit is surely the ground basis of what ultimately became Phear and most likely shifted over into purely GPU. If you're going to experiment with 3D code, why not start with the basics and learn/build something that meets the needs of what you're wanting to achieve anyways? Either way, sounds like a nightmare but kudos to you if you actually do manage to pull any 3D goodies off <-- words of encouragement ;)

  • Thanks 1
Link to comment
Share on other sites

4 hours ago, phoboz said:

It's just assembly for another CPU, you learn assembly on one CPU, and then it's not to difficult to learn/understand another. I learned x86 assembly first (long ago) However, I greatly prefer to be able to use C when possible.

(Because if you are not careful assembly code easily turns into spaghetti code)

 

Was MIPS assembly the first assembly language you learned?

 

No, 6502, but long ago. Then x86 . Then looked into ARM. MIPS at some point stops being RISC with all those additional complex commands. But you have this clear layout of source and target. And everything has the same width. With 68k you have to remember the d and a registers. Then there is this .l thing . Can it appear everywhere, or is it like JRICS only on Load and Store. You see, it is only strange when people use 68k to explain how Tom works. With Doom there is C code for that. *(*FF020)= something. I have to reread those lines.

 

I know I have to work now. I work on some TypeScript physics simulation. So, good bye Jag.
Have you seen how the C64 documents their demos:
https://www.linusakesson.net/scene/lunatico/misc.php
https://www.linusakesson.net/scene/safevsp/index.php
https://kodiak64.com/blog/vertical-parallax-on-commodore-64
There is also a great article where someone pushes around sprites every scanline to draw filled vectors, but I cannot find it now. From the top of my head: The position the sprite for the start of the filling and go from back to front to overdraw. The front sprite has its bit set to be behind the background . And there is this:

Or GBA: https://www.coranac.com/tonc/text/mode7.htm
https://www.pouet.net/prod.php?which=86884
>I did this because I wanted to prove if it was possible to fill the screen with sprites written in H-Blank at 60FPS. And it worked! I think this is the fastest way to draw flat polygons on the GBA.
 

 

 

Community help for OpenLara:

 

  • Confused 2
Link to comment
Share on other sites

22 minutes ago, ArneCRosenfeldt said:

I know I have to work now. I work on some TypeScript physics simulation. So, good bye Jag

I am sad that you say goodbye to us so soon, I would have hoped to see something more tangible first. I hope you feel the motivation some day to return to this fascinating world? Good bye for now, and good luck with your work...

Edited by phoboz
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...