GP2Lap Experiments
Re: GP2Lap Experiments
So it would be theoretically possible to make the 1998 BAR cars with individual liveries. When it comes to banking I think the only 2 tracks I have that use it are Indianapolis 2000, and the old Mexico City track. I know the drivers car would vibrate in there too and it would appear onscreen if you were going over bumps, do you know why this is?rremedio wrote: Wed Jun 10, 2026 5:15 pm Download Page
So I've been playing with trying to add new features to GP2Lap and I've been making good progress. Before I send them to the official GP2Lap repo (which make take time to review them, approve and release a new version with them) I'd like to make them available for you guys to test because there's only a limited amount of testing I can do myself to catch bugs and edge cases.
Before anyone asks: these won't work with x86GP2 because it doesn't use GP2Lap. Hatcher is aware of them and may adopt them in the future. I've been testing with several versions of DOSBox in both Windows and Linux (I highly recommend DOSBox Staging. It's super fast).
v1 features:
1. Per-car tyre automatic compound selection
In stock GP2 there are 4 tyre types (A-D, harder-softer) and the tyre used in a session is decided in the track file. All cars use the same type. This feature changes things a little bit. Once activated, the tyre type will be a mix of the track default + strategy.
GP2Lap will look into the pit strategy with more cars from the track file and if possible, use the default tyre for it. Then it will distribute softer tyres for strategies with more pits and harder tyres for strategies with less pitstops. It will try to reconcile edge cases always aiming for more variety but I haven't tested all the possibilities so if something crashes the game or GP2Lap choices look wrong, let me know so I can fix it.
This will also add a change to GP2Lap's At The Line so it displays the tyre selected for each car. You can turn this off.
There's also a second cfg so all cars use the softest compund in qualifying (D). When turned off, they will use the default tyre in qualifying (like they did for the Saturday qualy in post 92 90s)
Parameters in gp2lap.cfg:
PerCarTyreCompounds activates it2. Total JAM size extensionCode: Select all
[Tyres] PerCarTyreCompounds = 0 ; 0 = stock single compound; 1 = per-car compounds by pit strategy (experimental) - [b] SoftTyresInQuali = 1 ; (needs PerCarTyreCompounds=1) 1 = everyone runs D in qualifying; 0 = stock ShowTyreCompoundBadge = 1 ; (needs PerCarTyreCompounds=1) 1 = show (X) compound badge in the ATL; 0 = blind (no letters)
When you start a session there's a total image limit of around 2.84MB for all jams loaded (that's why some tracks work in practice and freeze the game in race. Race will load some extra jams). This allows you to set extra memory to that limitation, so now you can load those tracks in races and track makes can make tracks with more/bigger images for us to play. I've been testing this with DOSBox. It's default memory size is 16MB and it has to be enough for DOS, GP2 and GP2Lap, so if you extend the jam limit, 16MB won't be enough (extending by 2MB makes it fail under 16MB, so I've been testing with 32MB which gives it plenty of room. More than 1MB will only be necessary if someone actually makes a track using a lot more total image than any track available today, so until that happens I wouldn't use more than 1MB).
Parameters in gp2lap.cfg:3. Maximum track size extension (above 65kb)Code: Select all
JamTextureExtraMB = 0 ; 0 = stock (~2.84MB JAM texture limit); N = add N MB on TOP of stock (so 2 -> ~4.84MB) ; to load bigger/more team+circuit JAMs without the load-time freeze. Needs that much ; free RAM (raise DOSBox memsize if needed). (experimental)
Stock GP2 only loads tracks with 62kb at most. GP2Limit / Slot and Tyre editor extend this to 65kb. This feature allows you to extend it even more (up to 320kb). The only problem now is that the Track Editor can't build tracks bigger than 65kb. I've already submitted a change to the official repo to allow it to handle files up to 320kb. Hopefully it will be accepted soon.
Parameters in gp2lap.cfg:4. Track+pits length extension (above 1600 units / 7.8km)Code: Select all
[Track] ExtraTrackFileKB = 0 ; 0 = stock (~62KB track-data / 64KB file limit); N = allow N KB more, so bigger ; .dat files load instead of freezing. Relocates the read/data buffers at startup ; and raises the read cap. Needs a matching editor-produced (or inflated) file. (experimental)
Stock GP2 has a limit of 1600 track units (including the track + the pitlane), which is around 7.8km. If you make the track longer GP2 will crash. With this feature you can set an extra limit. My limited testing proved it works but there's a hard limit (not one I can extend) of the square world where the track must be (the Track Editor shows it in the option "show grid"). It's 2.49Km x 2.49Km so we will never be able to build Targa Florio or even a faithful Nordschleife. But hey we already have some impressive "Norschleifes", they may become even better.
Parameters in gp2lap.cfg:5. Shared pit speed limit between human and computer carsCode: Select all
[Track] ExtraTrackSegments = 0 ; 0 = stock (~1600 track+pit segments, ~7-8km); N = allow N MORE segments (so the ; track+pitlane budget becomes 1600+N). Relocates the segment buffer at startup. ; Lets you build longer circuits. Needs a little extra RAM. (experimental)
With GP2Edit we can set the pit speed limit for the player, but not for the ccs. This allows us to set the same limit for those. It won't work properly if you disabled the limit in GP2Edit, so keep it enabled (the value there doesn't matter, GP2Lap will override it). If you want to disable it, just set a big value like 350kph. At high speeds the ccs and the player will brake from very far, so be cautious. I haven't tested enough to know what tragedies this can create
Parameters in gp2lap.cfg:6. AI launch scalingCode: Select all
[Pit] PitSpeedKmh = 80 ; pit-lane speed limit in km/h, applied to BOTH the AI and the player so they ; match (stock is ~80 but the AI/player differ slightly). 0 = leave stock untouched.
When you use a low power carset (like F3, or 60s F1) the computer cars will be very slow at the race start and going out of slow corners. That's because GP2 scales its acceleration so it doesn't go too fast with normal 1994 engine power. This feature will disable that scaling up to the speed set by AILaunchFadeKmh making them accelerate normally.
Parameters in gp2lap.cfgCode: Select all
[AI] AILowHpLaunchFix = 0 ; 0 = stock. 1 = fix the "slow AI launch" artifact that appears when a carset's ; HP is edited well below stock (~550 PS and down): the AI accel scales linearly ; with HP at every speed, but the human is traction-limited at low speed, so low-HP ; AI cars launch / exit slow corners far too slowly. The fix fades the HP penalty in ; with speed (none at a standstill, full by AILaunchFadeKmh). No effect at stock HP. AILaunchFadeKmh = 128 ; crossover speed for the fade, in km/h (only used when AILowHpLaunchFix = 1). Below ; this the HP penalty is suppressed (cars launch at the reference level); above it the ; car's real HP applies. Higher = relief over a wider speed range. Tune by feel.
7. Banking improvement for computer cars
This is only visual. With this enabled, the cc will roll with banked corners, reducing their ugly effect. I could not remove all the other glitches caused by banking, especially with extremely banked corners. This doesn't require any changes to the tracks. If has a side effect of replicating the bug where the player's car rides banked verges that doesn't exist (making it look like it is floating) to the cc, but I think that's a minor problem compared to the ccs not rolling. The RCR jams don't roll yet (if ever), so it is recommended to extend the RCR distances in gp2lap.cfg.
Parameters in gp2lap.cfgCode: Select all
AIBankingRoll = 0 ; 0 = stock (cars sit level on banked track, "floating flat"). 1 = roll the drawn ; opponent car models (external/TV/replay) AND the cockpit view onto the per-segment ; banking (track cmd 0xAD) so cars lean with the surface. Self-disables on flat track.
8. The Season Override file
This adds another configuration file to GP2Lap (default name override.cfg). You will need that file for the following features. I've done this so gp2lap.cfg doesn't get too crowded and because the configurations it will host are very tied to the especific carset and kind of season you are simulating in game.
Parameters in gp2lap.cfgCode: Select all
[Season] SeasonOverrides = "override.cfg" ; file listing per-car overrides (e.g. car textures). ; Commented or missing file = disabled. Paths in it are ; relative to the GP2 directory. (experimental)
All the following features must be enabled in the season override files (it won't work if you add them to gp2lap.cfg). There is a [General] section in the file and there's a section for each team ([Team 1], [Team 2], etc).
9. Refuel and pitstop timing parameters
This allows you to disable refueling (cars will start with full fuel load and won't refuel during pitstops) and/or change the time it takes to refuel, change tyres or repair damage. The minimum pitstop time I could see in the game was 4.6 second because that's the time it takes for the "cleaning the helmet's visor" animation to complete.
Parameters in the override file:10. Per-team carshapesCode: Select all
[General] ;Pit stops (global; affects AI and player; omit a key to keep it stock) PitTyreChangeMs = 7000 ; tyre-change base time in ms (stock 7000) PitDamageRepairMs = 18000 ; damage-repair base time in ms (stock 18000) PitRefuelBaseMs = 2750 ; fixed per-stop refuel overhead in ms (stock 2750) PitRefuelCapMs = 20000 ; max refuel duration cap in ms (stock 20000) PitRefuelSpeed = 100 ; refuel speed, % of stock (200 = twice as fast) DisableRefuel = 0 ; 1 = cars start full and add no fuel (tyre stops still happen)
This allows you to set a carshape .dat file for each team. You can also chose nose 0 (low nose) and nose 1 (high).
11. Per-team physics
This allows you to set physics parameters for each team. At the moment they are the car mass and a downforce multiplier. Mass has the same effect as changing the player's car weight in GP2Edit. The downforce multiplier will be applied to the calculated downforce for each team (100 will have no effect, lower values give less downforce, higher values give more downforce). It is applied equally between the front and rear wings.
12. Per-car liveries
This allows you to set a .bmp file for each car instead of having both cars in a team using the same one.
13. Per-car cockpit colors
This allows you to set the cockpit colors for each car separatedly instead of both cars in a team using the same colors. The color order is the same as it appears in GP2Edit and here you are picking the first color of a "X shades" range
Example of a team config:Code: Select all
;========================================================================== ; override.cfg -- per-team / global overrides (pointed to by SeasonOverrides) ;========================================================================== ; Turn this on in gp2lap.cfg: ; SeasonOverrides = "override.cfg" ; A missing file, or a commented-out line, means that override stays stock. ; Lines starting with ';' or '#' are comments. Keys are case-insensitive and ; may appear in any order within their section; anything you leave out is left ; stock. Paths are relative to the GP2 folder; '\' or '/' both work. ; ; The file is organised into INI-style sections: ; ; [General] global settings (pit/refuel; more over time) ; [Team N] everything about team slot N (N = 1..14, the team ORDER -- the ; same order the teams appear in the exe). You never type car ; numbers: GP2Lap resolves a team's two drivers itself. ; ; Per-team keys: ; car1 / car2 = path\to.bmp livery for the team's 1st / 2nd driver ; cp1 / cp2 = a,b,c cockpit colours (three palette indices 0-255) ; shape = path\to.dat car shape (.dat object) ; nose = 0 | 1 0 = low nose, 1 = high nose ; mass = <kg> chassis weight in kg (stock ~595) ; downforce = <pct> downforce as % of stock (100 = stock, 1-200) ; ; car1/cp1 = the team's first driver slot, car2/cp2 = the second. If a team has ; only one driver (a slot is disabled in the exe), the key for the missing slot ; is simply ignored (a note is logged) -- so for a 1-driver team you may need ; car2 rather than car1 (see Osella below). ; ; Liveries are 256x164, 8-bit BMPs in the car-atlas palette (e.g. from GP2Edit). ;==========================================================================TBH all these things weren't tested enough. Let me know of any problems.Code: Select all
[Team 1] ; McLaren car1 = liv\01a.bmp car2 = liv\01b.bmp cp1 = 1,100,180 cp2 = 1,100,180 shape = shapes\1989tk.dat nose = 1 mass = 500 downforce = 100
One of my biggest wishes is the ability to have a larger field so that we can fit more cars in older seasons, especially when there were a lot of single car teams.
This is awesome work rremedio!
Re: GP2Lap Experiments
BAR cars -> totally possible. I've tested it with 28 different liveries and it works.samsepi0l wrote: Thu Jun 25, 2026 11:29 pm So it would be theoretically possible to make the 1998 BAR cars with individual liveries. When it comes to banking I think the only 2 tracks I have that use it are Indianapolis 2000, and the old Mexico City track. I know the drivers car would vibrate in there too and it would appear onscreen if you were going over bumps, do you know why this is?
One of my biggest wishes is the ability to have a larger field so that we can fit more cars in older seasons, especially when there were a lot of single car teams.
This is awesome work rremedio!
About banking: I'm not really sure if it actually increases track bumpiness (which is usually dictated by a table in the .dat file) or if it is just the renderer having a hard time tracking the z position of the car. The whole thing is unfinished. I've spent a good time trying to get rid of the warping and bleeding graphics it causes with high banking, but I couldn't fix it.
About larger fields: I've looked into it a few weeks ago. It is, at least in theory, possible. But it doesn't look easy. I will probably have a go at it in a few weeks once I finished other stuff.
Re: GP2Lap Experiments
Oh man this is awesome! Thanks for making this!! Different liveries for each car and a carshape for every Team are great Additions.
I was suprised because many years ago I think you told me it was rather impossible to have more than 2 carshapes in the game. Great, maybe who knows one day you will be able to edit the track editor and make the full Nürburgring possible!
Sure it will take more time to finish it, but I´ll try this new Version of GP2Lap on my next carset. I hope it´s alright. I just Need to add the cfg file and the two Folders for liveries and shapes if I understood correctly.
Adding more Teams would be the ultimate step. Other modern games would become useless by then.
Now the only downside of this is that we Need to rework all the carsets from past Seasons. I don´t know where to start from
I was suprised because many years ago I think you told me it was rather impossible to have more than 2 carshapes in the game. Great, maybe who knows one day you will be able to edit the track editor and make the full Nürburgring possible!
Sure it will take more time to finish it, but I´ll try this new Version of GP2Lap on my next carset. I hope it´s alright. I just Need to add the cfg file and the two Folders for liveries and shapes if I understood correctly.
Adding more Teams would be the ultimate step. Other modern games would become useless by then.
Now the only downside of this is that we Need to rework all the carsets from past Seasons. I don´t know where to start from
Re: GP2Lap Experiments
trivia question:
Which other car would benefit from individual team liveries?
(I'm not referring to the BAR original design this would be the obvious answer)
There was another car that I know did atleast 1 race with a different team paint to paint comparison
(and I don't mean the little details like just the stripes and things)
Which other car would benefit from individual team liveries?
(I'm not referring to the BAR original design this would be the obvious answer)
There was another car that I know did atleast 1 race with a different team paint to paint comparison
(and I don't mean the little details like just the stripes and things)
Re: GP2Lap Experiments
Yeah, I thought more car shapes was impossible for a long time. But luckly the carshapes are just data and it did not require any changes to the rendering engine.eky78 wrote: Fri Jun 26, 2026 3:25 pm Oh man this is awesome! Thanks for making this!! Different liveries for each car and a carshape for every Team are great Additions.
I was suprised because many years ago I think you told me it was rather impossible to have more than 2 carshapes in the game. Great, maybe who knows one day you will be able to edit the track editor and make the full Nürburgring possible!
Sure it will take more time to finish it, but I´ll try this new Version of GP2Lap on my next carset. I hope it´s alright. I just Need to add the cfg file and the two Folders for liveries and shapes if I understood correctly.
Adding more Teams would be the ultimate step. Other modern games would become useless by then.
Now the only downside of this is that we Need to rework all the carsets from past Seasons. I don´t know where to start from![]()
What keeps the full Nurburgring from being made is not the track editor, but the world limits in GP2 that do not allow for something bigger that a 2.5km x 2.5km area. This is rooted in the way the game calculates the 3D geometry from the track data, it would require a big rewrite of the whole engine. I'm not sure GP2Lap can handle this and even if it can, it is not something I would know how to properly do.
Re: GP2Lap Experiments
Oh also- I thought of something. I remember a thread where we were talking about gp2 generating a random seed that wasn't very random.
https://www.grandprix2.de/gp2forum/view ... hp?p=33522
It seems hatcher/x86gp2 has solved this as I saw in a review that there was an option to make the seed truly random every time. I wonder if you've stumbled across this recently in your recent reverse-engineering?
https://www.grandprix2.de/gp2forum/view ... hp?p=33522
It seems hatcher/x86gp2 has solved this as I saw in a review that there was an option to make the seed truly random every time. I wonder if you've stumbled across this recently in your recent reverse-engineering?
Re: GP2Lap Experiments
Excuse me, I misinterpreted your words I thought you meant it was the Editor´s problem. Still my point was in general, even if at the moment one thing looks impossible, doesn´t mean that - in let´s say 10 years - it may become possible thanks to computer progress. And I can guarantee you in 10 years, we will still be playing this damned old game!rremedio wrote: Sun Jun 28, 2026 3:45 pmYeah, I thought more car shapes was impossible for a long time. But luckly the carshapes are just data and it did not require any changes to the rendering engine.eky78 wrote: Fri Jun 26, 2026 3:25 pm Oh man this is awesome! Thanks for making this!! Different liveries for each car and a carshape for every Team are great Additions.
I was suprised because many years ago I think you told me it was rather impossible to have more than 2 carshapes in the game. Great, maybe who knows one day you will be able to edit the track editor and make the full Nürburgring possible!
Sure it will take more time to finish it, but I´ll try this new Version of GP2Lap on my next carset. I hope it´s alright. I just Need to add the cfg file and the two Folders for liveries and shapes if I understood correctly.
Adding more Teams would be the ultimate step. Other modern games would become useless by then.
Now the only downside of this is that we Need to rework all the carsets from past Seasons. I don´t know where to start from![]()
What keeps the full Nurburgring from being made is not the track editor, but the world limits in GP2 that do not allow for something bigger that a 2.5km x 2.5km area. This is rooted in the way the game calculates the 3D geometry from the track data, it would require a big rewrite of the whole engine. I'm not sure GP2Lap can handle this and even if it can, it is not something I would know how to properly do.
Very interesting this thing of the datas in GP2Lap. Makes me think what else could be done with it, maybe tyres for each car or each car with a different Cockpit. Maybe something else. We will see...just surprise us! In the meantime we can enjoy a lot of the things you have already found so far, so thanks again!
Re: GP2Lap Experiments
I haven't looked into this but I remember talking to Hatcher when this was being implemented for x86gp2. The info provided by René in the previous forum is very accurate and Hatcher probably used it (last time we talked about that, hatcher had found what to change in the game). I may add this to GP2Lap in the future. For me, the first session "bug" of always using the same random values if actually a feature because it makes it easy for me to test the effect of changes in the game lol but I can see how it can be annoying for most people.samsepi0l wrote: Wed Jul 01, 2026 12:28 am Oh also- I thought of something. I remember a thread where we were talking about gp2 generating a random seed that wasn't very random.
https://www.grandprix2.de/gp2forum/view ... hp?p=33522
It seems hatcher/x86gp2 has solved this as I saw in a review that there was an option to make the seed truly random every time. I wonder if you've stumbled across this recently in your recent reverse-engineering?
Re: GP2Lap Experiments
No worries. The way I see the world limits, extending them would break all existing tracks, assuming we can extend them. That's why I'm not very hopeful it will happen. But, like you said, we are always learning new things about the game and maybe we can find a solution one day.eky78 wrote: Fri Jun 26, 2026 3:25 pm Excuse me, I misinterpreted your words I thought you meant it was the Editor´s problem. Still my point was in general, even if at the moment one thing looks impossible, doesn´t mean that - in let´s say 10 years - it may become possible thanks to computer progress. And I can guarantee you in 10 years, we will still be playing this damned old game!
Very interesting this thing of the datas in GP2Lap. Makes me think what else could be done with it, maybe tyres for each car or each car with a different Cockpit. Maybe something else. We will see...just surprise us! In the meantime we can enjoy a lot of the things you have already found so far, so thanks again!
I haven't digged enough to tell you how feasible per-car tyres would be. On one hand it shouldn't be very different from per-car liveries since the tyres are also textures from jam files. But I have yet no idea if it is something we could "separate" the same way we did for other things. (one more thing for my research to-do list
Different cockpits sounds much more plausible and actually simple if they all have the same layout for the HUD. Different layouts would probably be much more complicated to implement, but still feasible. I have plans to try and reproduce my "overlay cockpit" experiment from years ago with GP2Lap. What it can do is much more limited compared to what I did (which was overlaying directly on the DOSBox window) but I think it would look nice anyway. That's one of the many areas where x86gp2 is much more poweful than GP2Lap because of being a Windows app with full control of the screen.