Jump to content

The Reversed Tracks (Not Mirrored) Group Project


Fluffy Cupcake
 Share

Recommended Posts

 the 'angle'-floats should be 1 at max, and -1 at minimum, any value inbetween would make your vehicle turn a certain amount of degrees.

 

Thanks for the confirmation. I also thought that those might be coded like this  ;)

Link to comment
Share on other sites

Fluffy Cupcake

So in comparison to a 360° angle, what would 0 be in this case, 180°? Or simply 0 = 0°, and 1 = 360°?

Link to comment
Share on other sites

origamiguy, on 31 Jan 2013 - 10:14, said:

Rotation's a funny one. It's a Quaternion, and I'm not too sure on how they work myself. Wikipedia is your friend.

-snip-

Not a quaternion. See my post on page 5.

Link to comment
Share on other sites

So in comparison to a 360° angle, what would 0 be in this case, 180°? Or simply 0 = 0°, and 1 = 360°?

 

Well, that's what gave me headaches, constantly figuring out how the anglesystem works with the floats. The important things are the first two floats after k_29. These define the horizontal angles, where the first float will turn you to the right (when changing the value to a greater number), and the second float will turn you to the left (when changing the value to a greater number). If both first two floats are 0, your vehicle is either placed 0°, 90°, 180° or 270° (depending on what track you play). Playing with these values just didn't help me any further, as I couldn't find a structure. For example, two different values for the same float gave me the same output.

 

Furthermore, to give you a list of the floats and their meaning:

 

 k_27
 0
 {
     k_28
     (float)-553.7314     //x-coördinate
     (float)-31.60692     //z-coördinate
     (float)-8.871219     //y-coördinate
     k_29
     (float)-0.507538     //horizontal angle (turn right)
     (float)-0.861629     //horizontal angle (turn left)
     (float)0             //vertical angle
     (float)0             //forgot this one
     (float)0             //angle sideways (can make your vehicle turn sideways) 
     (float)1             //change value to 0, and your vehicle will turn upside-down
 }

 

EDIT: I'll give the quaternions a try, but they are not too relevant in changing the startpos for this project.

Link to comment
Share on other sites

Fluffy Cupcake

(sorry, don't know how to add such code lines in a post)

A 
 tag exists, you should use it. 

Also, what origamiguy said.

Link to comment
Share on other sites

OHHHHHHHHHHHH DERP

 

First 3 floats for the rotation are an XYZ vector for "forward"
Second 3 floats are an XYZ vector for "up"

  • Like 1
Link to comment
Share on other sites

Rotation, you agonize me with your floats. Regardless, I have all startpositions (only for player's vehicle) reversed and placed the vehicle at the spot that would most likely become the new startposition. I may have to change the coördinates a bit later on, to line up exactly with the back row of opponents.

Link to comment
Share on other sites

Fluffy Cupcake

Alright, for checkpoints, I think this is how it is organized:

1-?? (0 comes after) 1 is the lap count trigger and the rest is for normal route

0, I believe is the last checkpoint to pass through in a lap before reaching 1 again.

everything after is alternate routes (like shortcuts and whatnot)

 

 

Edit: I tried a bunch of things, and I still don't know why I can't get reversing done properly.

Link to comment
Share on other sites

I'm getting somewhere with the .RRB files. I managed to set all startpositions aligned and on the correct place (even for AI's), as well as reversed:

Nr2NxFW.png

Ofcourse the AI path isn't reversed by simply reversing their startpositions. Thus when the race starts (at 'GO'), all AI's switch directions instantly to align with their path.

I've only done this for Royal Knights Raceway. My understanding of the .RRB files grows by the day. :)

Link to comment
Share on other sites

My understanding of the .RRB files grows by the day. :)

Wanna compare notes in PM?

 

I'm okay with that, but don't expect me to come with breaking news about the files. I'm still learning about them. Taking from your experience with the game, you can provide great help to me. :)

Link to comment
Share on other sites

I've not been working actively on this project the last few days (I am going to again!), but I'd like to know who is, at the moment, working (actively) on this project. I've seen the list of members working on this on the topic, but I haven't heard much of them. I'm not trying to get everyone back to work on this project, but just a status update would be nice on this.

Link to comment
Share on other sites

Fluffy Cupcake

Just updated the OP removing people from the list who haven't done anything, and I also put a section for people who were, but currently aren't working on it.

Link to comment
Share on other sites

Sorry, I would like to do anything more but first I don't know what and second I'm no good programmer :(

At the moment I can't do anything because I got lots of other things to do...

Link to comment
Share on other sites

RobExplorien

Switching directions and order of the checkpoints in the CPB file will result into getting stuck in the warp when using the power-up (at the modified track). I'm not sure what causes it yet.

Link to comment
Share on other sites

  • 4 weeks later...
RobExplorien

I managed to have King Kahuka's main path (the .RRB file necessary for the AI to start following its path) reversed on Royal Knights Raceway, meaning that he is, in fact, driving in reversed mode! Now I only need to have this reversed path aligned with the actual track (or, at least with the checkpoints), and then I'll post a video of it. Though, I still need to figure out how to set the AI's path direction reversed at the start, in order to have it generally aligned.

  • Like 2
Link to comment
Share on other sites

I managed to have King Kahuka's main path (the .RRB file necessary for the AI to start following its path) reversed on Royal Knights Raceway, meaning that he is, in fact, driving in reversed mode! Now I only need to have this reversed path aligned with the actual track (or, at least with the checkpoints), and then I'll post a video of it. Though, I still need to figure out how to set the AI's path direction reversed at the start, in order to have it generally aligned.

 

Woo, well done! I hope you figure it out, and look forward to the results :)

Link to comment
Share on other sites

RobExplorien

Just a video I quickly made, showing the reversed driving techniques of Baron von Barron. I think I figured out how to rotate the path direction at the start, so that he actually aligns with the track. Reversing his vehicle to match this rotated direction is another thing I'll have to work on, and therefore I though I'd post a video of where I'm at now with modding.

Having experienced the time consuming job of reversing one path file (about 1,5 hours in total), I'm not likely to go through this all over again. Maybe, if I gather the knowledge, I could build a simple tool that allows for reversing all waypoints in the .RRB files. Simply reversing all code lines would mess up the structure of the nodes, so if there already exists a program that can reverse code lines in a way to maintain a certain structure, that'd be great!

 

 

EDIT:

Alright, the AI is a bit more aligned with the track. However, there is still much to be done about this path, and I'm not too sure how to deal with these issues.

 

http://www.youtube.com/watch?v=6FMdTEVbCyA

Link to comment
Share on other sites

RobExplorien

Also, what tags are for video embedding? I tried 'media' and 'video', but they both do not work for this.

 

 

Ah, that explains. I put them like this:

URL

It does work with spoilertags like this, so that's why I wondered why it didn't work.

  • Like 1
Link to comment
Share on other sites

RobExplorien

I feel like I'm posting a little too much on the same page here in this topic. Anyway, here are the reversed startpositions for the player-controlled vehicle on all tracks (with the exception of Test Track).

It is PatchIt! 1.0.3 compatible, but can also be implemented without this program. This version actually serves for development purposes, to let other developers of this 'mod to be' have access to the changes made in the LEGO.JAM for this project.

 

LEGO RevRacers, version Alpha 1.0:

https://ore.rockraidersunited.org/legacy/LEGO%20RevProject_672137.zip

 

Changelog

Alpha 1.0:

- Altered coördinates of the player's vehicle in the .SPB files for every 'raceable' track.

- Altered rotation (180 degrees twisted) of the player's vehicle in the .SPB files for every 'raceable' track.

 

 

PatchIt10Compatible.png

Link to comment
Share on other sites

  • 1 year later...

Went back to this, coded something together, reversed path files, result (a test for playability and potential purposes) can be downloaded:

http://oresome.rockraidersunited.com/download/158

 

Instructions: Remove all .RRB files from the RACEC0R0 folder in your decompiled LEGO.JAM (backing them up is optional). Cut/Copy downloaded .zip contents and paste the six included files in the RACEC0R0 folder. Compile and try out Royal Knights Raceway yourself if you are eager to.

 

Changes:

.CPB (checkpoint) file: Reversing order of checkpoints and their respective timing (as it is commented by default).

.RRB (AI path) file:

  1. Exchanged the starting (k_29)/finishing (k_2A) coördinates and their respective rotation floats (k_28/k_2B). Also altered the rotation for the 'reversed' effect.
  2. Altered the new starting coördinates.
  3. Reversed the entry order of all nodes to lay the foundation of a reversed path.
  4. Flipped relative positions of each node (first three values of a node) as to have the vehicle move in the new (reversed) direction.
  5. Flipped rotation of the vehicle model (sixth and seventh value of a node) as to have the vehicle face the new (reversed) direction it is going.
  6. Added extra nodes at the beginning of the path to match the new starting coördinates with the rest of the 'default' path.
  7. Compressed final nodes of the path.

Note that steps 1, 3, 4 and 5 were achieved via a custom made tool (I'd be stupid if I didn't).

 

Let me just say something before you jump to conclusions. The obvious solution is that we are better off with an actual .RRB Recorder to record our own reversed paths than altering the standard path files themselves (however, that recorder has some issues that prevent it from creating correct paths, so it is a waiting game). Reversing a pre-existing path is not hard, but then the issue arises of creating a new startposition and having the path extend to this new position (manually adding nodes, not preferred (steps 2 and 6)). Also, there are still some speed issues (the start (old finish) and finish (old start)), meaning the vehicle slows down when it reaches the finish (tried to fix that with step 7), and has an immediate acceleration at the start.

I haven't even talked about the checkpoint file, which is a whole different task. It is not perfect either in this test ('wrong way' still apears in some cases/directions, warps do funny things and keeping up with your position in race doesn't work well either). 

 

tl;dr: Wait for or create an .RRB Recorder to reverse paths. Checkpoint file needs more research for proper 'reversing'.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.