News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Bridging ReplDump + R5E for cool multiplayer replays of (live) races

Started by Cas, March 15, 2023, 07:15:24 AM

Previous topic - Next topic

Cas

Yes, the only way to be 100% sure that all Painter's Algorithms will do the same is to only use triangles, but this is highly inefficient and most of the time, it's not necessary to get to this extreme. In general, you can use higher polygons as long as they are convex and I would add, the "rounder" they are, that is, the more regular, the more likely everything will be OK. If the "centre of mass" of your polygon is far from its "centre of volume" (that is, the centre of the envelop polygon with the smallest number of sides that can contain the polygon in question), then it's better to split it.

In any case, you can always test your model against Stunts and against my engine and see how it behaves.
Earth is my country. Science is my religion.

Cas

Small update... The rotation problem has been fixed. I asked Duplode for some guidance and while he was helping me analyse the data, I found the correct combination by brute force. Now that I look at it, I should've known. It looks a lot neater now.

Now I'm working on getting many cars together racing in parallel
Earth is my country. Science is my religion.

Cas

And.... success!  Look at the picture from a moment in Purple Sunset Enduro  8)

Now I'm going to make it easier to handle, so that we can rewind and all that easily. No wheels, I know... but there are priorities.... Like being able to follow a car or place cameras
Earth is my country. Science is my religion.

Duplode


KyLiE

It's great that you're working on this again!  I remember when you first got it working, I said that at the very least, it would make an excellent 3D track viewer.  Looks like you've realised the next logical step.  I'm looking forward to seeing it in action!

llm

Wow, great Stuff

Do you think it could be possible to export all that information to created a Blender movie from replays?

Daniel3D

I guess you should be able to import the replay dump data into blender and use it as animation resource.
Maybe even better into unreal5 engine.
Make a photorealistic replay video...
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

It's possible, but we would need lots of work on adapting some details. For example, Blender cannot render lines. They would have to be replaced by thin solid tubes. Spheres would have to be represented as polyhedra that could approximate them and the same goes for wheels. Grills would have to be made by creating textures with transparency and then applying them to thin plates.
Earth is my country. Science is my religion.

Cas

Another update. As you guys saw, I managed to make my engine bridge system output all frames to images and then I make a video out of them with ffmpeg. I also added the ability to insert fixed cameras at time frames and have the engine follow the sequence and I added a pseudo-F3 view that allows you to switch cars. That view is not perfect because I haven't made the correct calculations to rotate with the car and follow it smoothly, but with some work, I can make an true F2 camera and a much better pseudo F3 (which rotates with the car about the vertical axis, but not about the other two, so the car would move).

I am facing a few difficulties to move forward. The main problem is that, from the old times when I began working on the engine, I left the horizon rendering for later because it appeared less important. Now I need to solve it. The issue is this: I can rotate all the world and it looks good, but the horizon (green and light blue parts of the screen), I really don't know well how to calculate it, so I'm basically just painting the lower part of the screen in green and the higher part in light blue no matter what. I have to find a solution for this, or the camera won't pitch or bank.
Earth is my country. Science is my religion.

Ch4oZ

Hello everyone, i recently joined this forum and saw what you guys achieved, which is quite impressive imo.
I am currently doing experiments with the memory of a dosbox container running stunts with the intent of creating something similar: having the unmodified game run in the background while rendering on top of it with a custom engine taking the track elements, cars and camera positions from the game memory.
This is the list of features i am seeking to implement:
  • a native game with cars handling faithful to the original
  • high resolution rendering
  • custom game assets to replace the original ones
  • free camera placement

Note that i didn't mention hardware accelerated rendering because i like to craft my own pixels so i am trying to realize an 8-bit palettized software renderer for this purpose :D

I don't have a working proof of concept yet, at the moment i am mostly experimenting with dosbox and cheat engine. If you have suggestions on other analysis tools that you're using I'd gratefully take note (or maybe they're mentioned in other threads that i still have to read?)

dreadnaut

Hello @Ch4oZ, your idea sounds very interesting and promising!

The game engine would run unmodified in DOSBox, and your project would be an external "display" for the game?

Ch4oZ

#26
Update: i just noticed someone already succeeded tampering with the game memory in dosbox in this topic. I'm taking notes of all relevant pointers they found.

@dreadnaut yes and no. I can run a dosbox machine with no video output and so my window would be the only interface for the user. I am undecided about replacing the game menus or reusing them at the moment (need to experiment first)

Cas

Hi, Ch4oZ!  That's a very nice project :)  How will you do about the player input?  Is it possible to get the new window to channel the input to DOSBox?

The thing is, even if graphics are changed, the functioning would be the same, so say the menus are changed, they would have to be all located in the same order and such so that Stunts responds to the same keys and takes you to the same place. This, unless you simulate player inputs functionally to get to the different parts of the program. On the other hand, the DOSBox instance could be dedicated to the game execution and all menu system be in the outside, but then you'd have to tweak the memory to load tracks, replays, etc.
Earth is my country. Science is my religion.