Supcom/Moho engine rewrite
-
Great job, keep going!
-
gj
-
Impressive, curious for more!
-
A brilliant job, especially considering that the team next door have been making Sanctuary for several years and are still very much a work in progress. Hope you manage to get as close as possible to the original supcom
-
I hope this project and anything around it can work out, especially if it can push the development of FAF even further.
-
So here is a "working" build, but first I just wanted to address the work, Yes of course I have made this with heavy amounts of AI, and I know that kind of sucks, especially for those that have worked so hard on faf over the years.
In no way do i want this work to take away from that hard work.
What I hope, is that those people will be empowered by this project, they can already achieve magic with asm patches to the exe, imagine what can be done when they have real code to work with.I have no doubt that many many people understand fafs lua better than me, have better understand of graphics/pathfinding/supcoms quirks and behaviours/etc...
And I am excited to see what they will be capable of achieve with this work.I do plan to give the whole project to faf, code and all, and then you guys can do as you see fit with it.
I just hope it helps and empowers the community. (I guess the ends justify the means???)
Here is both an mac and windows exe. its to big to include here, so (and i can't believe this.. a link to limewire of all places... happy to share the file another means this was just the first google hit)
https://limewire.com/d/kIwte#CQnpfbOgYtWhen launching either they will attempt to find faf and supcom, if they can't they will ask you to give it to them.
you need the latest faf
Although it does not intergrate in to faf currently.
I explain networking below, but to play together:
- someone must host the game using the multiplayer option in the main menu, create a game as usual
- They will be give a long code in the chat, its also copied to the clipboard

- Others can then join via the multiplayer option in the menu, putting that string in to the ip address section, and 1 in the port section
like below (note the code doesn't match in this screenshot cos i took it at different times)

Now as said before while the game "works", its really really is far from perfect, many things are broken or not working as expected.
I also have only been able to test, on an old windows machine, a surface laptop, and a new mac.
I don't have anything with an amd card, so god knows if those work.If you get crashes, give me the logs to look at, although i make no promises
im only human (even if ai can help...)I have zero idea about mod support, i haven't had the time to look at it, in theory it should work, or at least i originally set up the ground works for it.
Bugs:
There will endless bugs of that im sure, every time i launch the game i notice bugs, and i'm just a casual noob player.- behaviour bugs (the tanks don't work like that, gunships don't hover like that, navy pathfinding is just awful right now)
- crashes (i'm guessing this will mostly be graphics card related)
- missing functionality (the novax doesn't work at all)
- look and feel of graphics (particles are all over the place, like projectiles, the uef t3 defence, or transports and gunships, the list goes on...)
I haven't tested many things, as i just haven't had the time and wanted to get this build out to people to mess around with.
Really this project is a proof of concept, i think it will take the faf community time if they choose to make this a real replacement)
If you have things not working please give me the log file, it should be next to the exe.
Networking:
So I’m really excited about the networking.First off it uses this fantastic library called Iroh, which does p2p with nat punch though. It will attempt to create direct p2p connections between players, and if not possible it will route the connection through a relay, at the moment this uses iroh public server which has zero guarantee about uptime and through put, but faf could easily host their own one.
When creating a lobby, the game will give you a long random string, others simply need to paste that in to ip direct connection, plus any port number between 1-65k
and it should connect :fingers_crossed:
The game still uses udp underneath although its got a reliability layer on top, and I believe connections through irohs relay are tcp, if your direct connected its udp.
I have zero idea how well this will actually work in the real world, but I have played a game with a friend.
Next is player input.
(now I could be wrong) but my understanding of how supcom does its input syncing is:- sim ticks along at 100ms, player input it sent every tick, but with a 500ms(I think?) delay, as all players need to have this input from every other player in order for the game to continue, thats what causes hitches with bad connections. As the game pauses waiting for input.
What this version does.
Fundamentally its the same, however instead of a fixed 500ms, each player has a dynamic input step. All ticks still need an input step.
but each player now measures their latency/ping to others, and picks an input delay for themselves.all their input is then marked with that delay. which comes in as (please apply this input in 5 ticks (or 500ms))
or if they have a very fast connection (please apply this input in 2 ticks (200ms))
The upside to this is bad connections should cause as much less hitching to everyone.
The down side is unfairness, a very laggy player can cause the delay of inputs to rise for those connected to them with a bad connection (as it could just be a bad connection between only 2 people).
I would purpose that there is an option to lock the input delay.
I hope this means people with high ping can still play in games, even though it does still impact people by delaying their inputs. But should minimise freezes.
To show this all off, there is now a ping table bit of ui. You can see it with ctrl + shift + p, or on Mac cmd + shift + p
it's a grid showing the whole mesh of connections between everyone, so all players can understand the network layout of the mesh.
it shows the current max game speed for each player, and their input delay
This should help understand when 2 players have a bad connection to each other, but good to everyone else
This screen shot is with faked players and numbers, but give you an idea, of course hopefully in a real game you don't see that much red

Perf
Here is a crazy 64,000 airplanes fighting, of course its completely laggy, but it's somewhere in the realm of vaguely playable, the main bottleneck for graphics is the particles which would need moving to be gpu accelerated, as they are currently processed all on the cpu.
https://youtu.be/gTWnagf_Gak
also for those that want it, here is a tracey profile of that, proving that it can use more than 1 core! although its still mostly single threaded unless the scale is really high.

I did test 63 players locally and it brought my machine to its knees...

I have patched the faf lobby in this exe to allow 64 players, although no map supports that, i've included an edited flat map that should support it. Everyone would need this map, the exe does not support transferring files yet.
I honestly have no idea how well it will work.
flat_63.v0001.zip -
Pretty funny (and awesome) seeing this here today. I was just reading about new AI models and their reverse engineering capabilities and was thinking about giving something like this a shot. Looks pretty damn sweet so far. Who'd ever imagine potential 64p SupCom? Love that you having a "working" MP version already, and that connection grid.
-
This sounds to be excessively awesome, great effort out of nowhere!
haven't tried it yet, will definately keep an eye on it.Just a great fan of the game myself, knowing and hearing of the bottlenecks that would require a new engine (or a rewrite) to fix.
And then to realise the opportunities this possibly opens up for further improvements makes this even more awesome.
Hope this endeavour will soon flourish!
Also makes one wonder if a single knowledgeable person with AI assistance is already capable of delivering such a feat that would take an entire team many months to pull off is slighty unnerving (if AI is this capable now already...). -
Does your engine run the lua code for the game patch?
-
I ran it yesterday on linux with latest FAF game files.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login