Upcoming Events

Weekly BMW races on Simracing.GP Other regular AC events on Simracing.GP Weekly GT3 Sprint Races on Simracing.GP Rookie friendly WTCR sereis Weekly rFactor 2 events

Open source community sim?

Messages
73
Points
52
TL;DR A modern open-source racing simulator would be great. Maybe we in the community should do it! But maybe it’s just not feasible.

This post has been brewing in my head for a few weeks now. Would love to hear any thoughts and responses people have!

The positives

Look at what people like Ilja Jusupov and Peter Boese have managed to do for AC, or GTR233 and Shovas for GTR 2 – never mind the innumerable amazing skinners and car and track modders and everything. The work the community does is awesome. But it’s necessarily hamstrung by the fact these games’ core won’t change. Lots of bugs and limitations are present and won’t ever disappear (barring exceptional reverse engineering like that done on AC). Given the dedication and talents of the modding community, imagine if people had access to the source code and could fix/polish things and extend the game over time!

Another aspect of a community-developed open-source simulator that could be beneficial: it could be developed around features that matter to the community. Sim racers are a notoriously tough crowd, but I’d imagine an open, collaborative development process they could literally participate in would help get people on board. Plus, if there’s something they didn’t like, experienced modders and programmers could literally go in and work at changing it. Feature creep issues are a challenge, but should be manageable (surely we’ve learned the lessons of the West Bros. by now).

For me at least, the more you think about an idealized, utopian vision of a free, open-source (FOSS) community simulator, the more advantages and cool ideas you start to think of. Kinda intoxicating... :laugh:

The negatives

So… seems like a great idea. But, to my knowledge, there isn’t one. Dolphinity Racer was at one time open source, but then changed. TORCS is from like 20 years ago. And so on. Why? A couple thoughts.

Simplest reason is the difficulty involved in developing a sim-quality car physics engine. I’ve searched high and low, and although hopefully I’m wrong, I haven’t seen a free, open-source physics engine that isn't woefully inadequate even compared to NR2003 or gMotor (never mind rF2 or ACC or Madness or AC) That’s a massive development hurdle to get over – practically, perhaps an insurmountable one. Sure you could fork and extend a FOSS library like Nvidia’s PhysX, but that’s still a mountain of work to do before you even start on the game itself. Plus you’d have to develop the force feedback more or less from scratch. Yikes!

There’s also the simple fact FOSS is often developed, in practice, in the free time of a small number of committed main developers. Although in theory anyone can work at the code and support the game, many projects seem to die off when the main developers lose interest. And for most FOSS projects, these people have no financial incentive to do what they do – so how could people like this put in enough effort for a full legit simulator? Even given this, I think a FOSS sim isn’t impossible, but it’s a hell of a hill to climb.

An idea

Finally (I promise I’m almost done), a personal idea for a step towards an open-source racing sim – baby steps. Take a FOSS game engine like Godot or Torque3D, so you can modify it without fear. Put in one car (e.g. Skip Barber) and one track (e.g. Road Atlanta) by borrowing (with permission!) from the community. Then try to get a marginally plausible driving experience. Even that would be a massive achievement.

I wish I was a programmer and didn’t have such a damned busy life at the moment… otherwise I’d offer to start this kind of project up. Plus although I'm no modder,over time, I’d happily help with structured programming ideas, repo management, documentation… but a FOSS sim ultimately needs boatloads of time and code which I can't offer. :(
 
Messages
317
Points
451
I think at the moment with moddable sims a lot of the potential development effort and content effort goes to those sims such as Assetto Corsa. To an extent that allows most of the hard problems for graphics and engine and simulation to be solved as a good baseline and then the modders add in all the missing content. What AC has become however with graphics mods and even simulation updates is a lot more. But as a core it is going to be limited.

I suspect this wont happen yet, there isn't quite the imperative to create the open source sim just yet (and indeed open source games rarely do all that well because graphics is a massive job and the industry moves very fast) but if we go for a period without sims that can be modded I can see it quite likely that such a project gets started and I will certainly contribute in the physics simulations. But for now at least I think things are moving too fast in the game space for open source to latch on when we have moddable sims, but that could change well change if we don't get AC2 in the foreseeable future.
 
Messages
73
Points
52
Thanks for the reply! :)

I think you're absolutely correct that the proprietary/commercial baseline sims (e.g. AC, rF2) explicitly designed to be super open and moddable are a great compromise between financially supported developers doing the engine and base content and the community extending and adding all sorts of goodies. The collaborative and 'open' attitude of developers like Kunos and Reiza also further mitigates the need for open source. It is slightly concerning though that most recent sims like PC2, ACC and AMS2 are not open for modding... as good as those sims are, seems like the beginning of a concerning trend (for modding, anyway).

Not sure I agree about that fast moving changes are a reason to not try something open source, though. Like, I look at what an enjoyable driving experience you can get out of modded GTR2, and I start thinking that even "outdated" "unsophisticated" physics could still make for a perfectly decent sim. Especially if you basically ran custom physics on an established game engine, which would help provide up(ish)-to-date graphics. There's also such a dearth of decent open source non-arcade car physics out there that development time to even get close to the 'old' sims would still be massive... maybe another reason to get started experimenting?
 
Messages
196
Points
322
you are not alone, i am one of the many waiting for GTR3 just to be disapointed that it will me not mod friendly (and probably called TOCA4)

i will write down my thoughts about your QUEST, i suggest everybody not commited to ignore my comment and skip to the next thread

TLDR
the point is, to convice a bunch of people, invest a lot of time in something which will
be always subpar to existing solutions
because of most of the points on my wishing list are fullfield by some products to buy

======

and in my case right now its rF2
it lacks only modable AI and modable/scriptable race logic

i once tried to talk to the guy who made Online Racing Championship, based on the physics from RACING LEGENDS (www.slowtoast.com), with the wish he could open up his project for modding
but with my rude character, i was pretty uneffective

i am sure, it will be not hard to make a basic SIMULATOR,
but it will always lack in many points to the competition
in (licence) content
in 3d modeling
in physics
in FFB (thats i is the most difficult part to make the game feel good)


and this lead to the fate which has G-Rally

graphics & sound is now not a problem, as you can jump on Unity , Unreal, OGRE or whatever


SpeedDreams has it all, but is dead because of outdated GFX (my guess)
G-Rally is not open but probably a good example for why not to start such a project
work of many men-years, but there emerged DirtRally (and killed it)
otherwise it could have been a great RBR replacement

are there any moded cars for DirtRally, no
is Assetto Corsa a good modable platform, no
but it is true porn, like ProjectCars and this will take away 99% of players/users

p.s.;
take a look at rigs of rods
 
Last edited:
Messages
73
Points
52
You raise a lot of good points @mucho! Thanks for sharing your thoughts mate. :thumbsup:

Something I've realized the more I've thought: it's almost certainly NOT the right move to start with ambitiously trying to make a free and open source AC/rF2 replacement with a full easily modded 'platform' for all kinds of racing. One day, it'd be wonderful, sure. But to get to that kind of quality in a community project is unlikely – and as Racing Legends shows, aspiring to too much is nothing but a recipe for failure. At most, it'd be more sensible to aspire to something like ACC or GTR2 with one series and one type of car well-simulated – develop it as a community à la Linux, release ALL the source code, document it well. And if it's at all a decent sim, people will work on it and help it improve (and perhaps contribute more content).

I don't entirely agree that a community project will necessarily lack on all four of the dimensions you listed, though. Look at the incredible work far exceeding the original content in AC and rF2 and AMS... would content and 3D modelling really be an issue? Regardless, I do agree that physics and FFB is a huge problem. In particular, there don't seem to be modern-quality car physics or FFB code out there that isn't hidden in a closed, paid product. That, in a way, is what bothers me the most.

There is one cool exception to the physics problem: Project Chrono. It even has built-in real-time OpenGL visualization. Throw it some data to calibrate the vehicle dynamics equations, give it a high-quality track, and you're basically good to go. FFB is pretty much all that's missing. And suddenly, while that's still a lot of work, the project seems manageable and achievable. :D


Speed Dreams: as a TORCS fork, never mind the obvious weak graphics, I can't help but think that having 20 year old legacy physics code would be a massive limitation... although I have never played it, so perhaps they overcame that. Have you tried it? If so, how did the physics feel?

Yes, Rig of Rods is so cool. Proto-BeamNG that's GPL licensed and open source... good on those developers for sticking to their guns. Does it hold up in 2021 at all?

On Online Racing Championship... didn't know about that one until now. Thanks for sharing! (And for asking them to open it up, even if it didn't work)
 
Messages
73
Points
52
Also, I just found this – Kompass Rally – which is an early-stage hobby project by @Th3HolyMoose (who's seems to be here on RD somewhere). His big thing seems to be procedural generated stages – which is super cool, great work! – but is developing some custom vehicle dynamics on top of Bullet Physics and is working on a custom game engine called 'exodus". Cool project!


If you're here, @Th3HolyMoose, at a minimum, would you be at all open to sharing some of the basic approach behind your vehicle physics? Or, given how few open-source code bases there are on which to build a modern sim racing title, would you consider releasing the base "exodus" engine code or just the vehicle physics calculations on GitHub for others to build on?

If not, I totally understand – to each his own. But if so, it would be a huge contribution to the community. :) Even just the physics e.g. which could contribute to other game engines using Bullet (e.g. the Godot engine, which is growing in popularity) or to Bullet itself – both of which seem to not have anything beyond simple arcade vehicles. And you could still keep anything specific to what makes your game special to yourself... so that you could still keep lots of it proprietary and release it on Steam for $$ if you wanted. Plus, you never know, you might get some talented collaborators in the community to make the project move faster and better by going "open-core".
 
Messages
196
Points
322
my recipe to solve this question would be:

start a project, split the 8 big questions in modules (DLL)

and create a minimum for each

module 1: game logic (scriptible with LUA)
module 2:AI basic, but expandable like in SpeedDreams
module 3:graphcs like in Art Rally
module 4:Control (basic FFB)
module 5:car physics, minimum (later use TORCS)
module 6:world physics, basic (later RoR)
module 7:sound, basic
module 8:UI, basic

get it rolling

create converter for racer/gmotor/rbr stuff (cars / tracks)


and then improve moduls easy to do


like M3 with Unity/Ogre whatever
M7 with a free high end product avail for free
M5 with something better

as the modules will be independent
everybody can hack his area of interest
just swap the DLL/LIB and go


the first step could be done pretty fast

the hard thing is to setup the basic so it will modular
a could be expandable for all future apects

like rain, changable drivers, safety cars, livetrack whats so ever
 
Last edited:
Messages
196
Points
322
Speed Dreams:
what pulled me away was the Control & GFX of
but the option to create own AI was a big surprise

Rig of Rods:
is purely OpenWorld, yes it is nice to see defrmation
but i want a Racing Sim
,

Project Chrono :
as cool as it is, creating suspensions in gMotor is not rocket science
but only done by a few (like in AC - you get 1000 cars which have the same physics)
so i would allow to create simplified physics alongside

Kompass Rally:
it would be a great starting point, if we could convnce him/her to
share his work (even not as open source), but as as the basic donor
for the modules, so we could get rolling fast would big blast forward




we always could ask ISI how much they want for a gMotor licence
like AMS did, you surely have some EUR/GBP/US$ an your paypal account

ps: take a look at Motor Town
 
Last edited:
Messages
73
Points
52
Along with public code, modularity is the key, exactly. Cause it allows easy hackability. You've got some good ideas, mate.

And IMO the most important module is the vehicle physics. You can grab UI, physics, graphics, etc. from a game engine easily, but not any decent vehicle physics (unless Bullet or Nvidia PhysX vehicles are much better than they seem... but they seem very arcade). Since TORCS/Speed Dreams, there's been no open source effort on sim-quality car physics, so that'd probably be the best place to start.

TORCS – and thus probably Speed Dreams – is supposedly modular: maybe you could pull the physics out of it? Does it in your experience feel good enough for that to be worthwhile? If not, either the Project Chrono::vehicle module or the vehicle physics from Kompass Rally (if he was comfortable, and I understand if he isn't) could also do the trick. The key is to be able to release the physics module code publicly (along with the rest of the game) so that people can find bugs and limitations and have the possibility of fixing them – instead of being stuck with (probably permament) stupid problems like no rolling starts in AC.

And this is why IMO although you're right about gMotor, buying a licence would defeat the purpose. You'd need access like AMS to the gMotor source code, which would cost a lot more, I imagine. AND you'd want the ability to make it public so that bugs and limitations in the engine could be fixed out in the open – and I just can't imagine ISI agreeing to that, as cool as it would be.


***Note: I guess what really bothers me is seeing the gargantuan effort by people like Ilya and Peter Boese and so on to reverse engineer AC to overcome limitations and fix issues. Or recent efforts by GTR233 and friends to add wipers to GTR2. Imagine if they'd had access to the full game code. How much more could they have done, and how much faster? It's intoxicating to think about haha
 
Messages
73
Points
52
Just found a cool project I wanted to share on this thread before I forget: VDrift.

Despite its drifty name, it seems to have somewhat plausible driving physics with clean (if basic) graphics and a selection of cars and tracks (including many ported from older projects like Dolphinity Racer). Check out the videos below. Is it the height of realism? No, certainly not. But start looking around at the general state of open source driving/racing games and you quickly realize even this level of physics is quite an achievement, actually.

Laps in a Porsche around Suzuka, Interlagos, and Spa

Portimao/Algarve in a formula car

For more info, see the website and GitHub below. The GitHub repo also has a fair amount of documentation about what's going on internally within the game and how you could mod it and create content for it. I'm mildly intrigued!

Its physics has been rewritten, but started out as a fork of Vamos, which (apparently) is a GPL-licensed C++ automotive simulation framework. Hadn't heard of it until now. Have no idea if it's any good... but frankly, given the sorry state of free and open source real-time vehicle simulation, it's something haha. You can find more about it here:


Final note about VDrift: I dig the fact it's fully cross-platform i.e. Windows, Mac, and Linux (and FreeBSD, of all things). But hasn't had a downloadable release in eons (since 2014). So you have to build from source to get the latest goodies. Going to see if I can build it on my Mac from the master branch off GitHub and get it running. If I can, will update below.
 

Stereo

Premium
Messages
4,187
Solutions
1
Points
2,222
Hmm, I have some thoughts on why this doesn't really happen, but first to establish where I'm coming from.
I've been modding racing games in general for almost 20 years, racing sims in particular for 16+. Specifically, that means Racer and Assetto Corsa. At this point I've done everything top to bottom; I started with skins, moved to modeling cars, editing car physics, then editing the game engine itself. Modding is my top feature; I don't buy games if it's not at least slightly supported by the devs. I've released over two dozen cars varying from 100% my own work to collaborations with other experts. I've contributed code to Assetto Corsa's CSP, both in graphics and physics engine mods. I'm a member of the group that has built the single most accurate car in any racing sim, ever. No effort spared, several thousand hours in development, it's not even a close race, there's nothing else like it. (this doesn't mean it's popular; most sim racers don't care about or understand accuracy)

So the first point is that kind of quality doesn't just happen if you spend enough money, take enough time, whatever. You need someone obsessed with the project, but still able to rationally evaluate where it's strong, where it's weak. Launching an open source project without being that person is not really possible. Any of the smaller sims you can point to that person. Ruud van Gaal for Racer, theHolyMoose for Kompass. Stefano Casillo for AC. They're working on every aspect of the source; they know how it all works and what's placeholders until they find good research. 3rd party code contributions don't change the architecture, just address specific features the contributor is an expert on.

Beyond just writing the code they decide which features make the grade. It's fairly controversial that Assetto Corsa didn't ship with night or rain, but what people don't really get is that it's all tradeoffs. You skip those and you spend the graphic budget elsewhere... AC vanilla content cars/tracks look far better than contemporary RF2 ones did, there's simply more detail everywhere, using the gpu resources and staff resources freed up.

Second point is that it's a big time investment to build content for a sim. Of course there's no limit to how fast you can rip a mesh and stick it on the physics of a car that's already in the sim... but to do it properly, understand every relevant number and put reasonable effort into matching them to the car, it's several hundred hours per car. There aren't that many people doing this for public mods, and, honestly, why would they do it for a constantly in development open source sim with a tiny audience, when they can put it in a game with an actual audience. Even disregarding the end users, a more popular game will have better tutorials and resources when you run into problems. My practical advice here is, even if it's open source, do not do "continual development" - make sure content developers aren't hitting a moving target. As an overarching principle, aim for complete backwards compatibility - if a new feature's not mature enough to make a guarantee that content configured to use it will keep working, it's not ready to be in the game.

Third point - you need a clear separation of physical and nonphysical modifications to pick up a large portion of the audience. People want to play fair online - this means being able to verify that another user's game is identical to yours in all physical aspects. If you don't have this you're confining yourself to the people who race non-competitively. If the engine allows some type of plugins, their scope either needs to be limited, or they need to be version-controlled while online too. (probably both)


That's it for my general thoughts. For specifics there are a few points in this thread I also want to put in my 2 cents on.
1) FFB. This can and should be a side effect of having a realistic physics engine. It doesn't need to be a byzantine system you need to train to understand - modern controller hardware is more than capable of producing real forces in real time. Car devs should be confident that once they've entered accurate numbers, ffb will just happen. End users only need 1 or 2 scale sliders to tune it to match their preferred weight.
2) Existing physics/graphics engines. These are what push devs away from moddability - it's probably best not to use them at all. The basic newtonian physics are not hard to implement, everything else is simplified and optimized, but not for racing sims. On the graphics side it locks you into proprietary compacted formats that are harder to modify - ACC and AMS2 both went this way and now users can't just drop new cars into a particular folder and go drive them, like they could in AC/AMS.
3) AI. Either skip it or make sure your metric of success doesn't go anywhere near "drives like a real person". Big budget games like Forza aren't doing this well, independents aren't doing this right, it's because it can't be done. Focus on what people actually demand from AI, which is a train of cars driving at approximately the same speed as the player, with individual strengths and weaknesses compared to the player, but who can't do anything to harm the player. If the player's on a weird line that makes them run into an AI, the player doesn't want to feel the consequences of their actions, they want to push the AI out of the way.
 
Last edited:
Messages
73
Points
52
@Stereo, thank you so much for the post and for sharing your thoughts and experiences in detail. I really appreciate that you took the time to jot everything down for a comparative noob like myself. And thank you for all the amazing work over the years! I imagine that's the IER P13c prototype you're referring to... an awe-inspiring piece of work I've been meaning to pick up for a long time – yet another reason to go buy that.

There's enough content in your post it'll take a while to fully digest, but I found myself nodding my head and thinking "yeah, that makes loads of sense" more of less all of the way through. I'll keep reading and reflecting and share any thoughts or questions I have.

For now, I do have one question for you, though, if you don't mind. To what extent would your work as a modder for AC and Racer been made easier if some or all of the code of the game's core had been public? Or did you have everything you need? I guess I can't help but wonder – as a non-modder (yet!) and not a professional programmer – if enough of the games' internals are made visible to you in whatever APIs and documentation etc. to mod and extend as you desire, or whether there'd be room for improvement.
 

Stereo

Premium
Messages
4,187
Solutions
1
Points
2,222
AC's fairly completely visible, though not quite publically. It was shipped with a debug file included, so every function header & most of the structs include original variable names & offsets in the exe, which means a dll can add code pretty much anywhere in the game (also why when it crashes it can print a stack trace, instead of just saying some unreadable memory dump). Most of what CSP does with this is add in graphics functions that weren't originally in the game, like it built an entire new structure of lights that just reads off car/track position and adds lights into the rendering process.

The main way it's different from just being open source is that anything baked in at compile time is tricky to modify. For a recent example, we were investigating editing the physics frequency, to see how much it could improve physics on stiff cars (prototypes run high enough springrates that 333Hz is kinda borderline for numerical integration) but it's not a variable since the game's only intended to run at a single rate, it's a #define macro. So to make it work, every function using that value has to be located and corrected to the new frequency. More often the physics additions are just a new function where there used to be a constant, for example changing bumpstops from a fixed rate to a lookup curve.

Racer was fairly well documented, most of the issues were kinda open problems, like the differential code went through a few iterations because it turns out a locking differential does things that fundamentally simulations struggle with, and no actual diff manufacturer has to document the exact ODE that can solve it cause the things just exist and function.
 
Messages
73
Points
52
For someone like me interested in how the internals of these sims work, this makes for such interesting reading. I always wondered how the CSP and Sol folks had enough information to add the functionality they did – now I know, and it makes lots of sense! :) It still seems an amazing and herculean effort (cause it is haha!) but now one I have a very faint sense of how it was done, which is cool.

In general, sounds like AC is about as visible and open as you can be without being 'open source'. Especially given the editing tools and the ability to extend by Python apps. And I'm guessing rF2 isn't far off. Yeah, exactly, the big challenges are any core limitations set in stone within the core code.

In your view, @Stereo, in theory, could there be a lot of value added from modders like you having access to the source code to study and modify when needed to solve problems, add features, or fix limitations? Or would the benefit – even in an ideal world setting aside feasibility issues and the 'moving target' problem – be too marginal and incremental to even theoretically be worth the effort?
 
Last edited:
Top