The online racing simulator
Searching in All forums
(789 results)
the_angry_angel
S3 licensed
All the credit really goes to you Dygear. I probably wouldn’t have pulled the trigger if not for you <3
the_angry_angel
S3 licensed
Quote from CRAAACH :Damn, must accept an defeat...

No defeat necessary Smile There's plenty of room for lots of implementations Smile Maybe it's something we can cross-pollinate / borrow ideas from each other Smile

Quote from CRAAACH :I myself gonna stick to my solution as it will allow me to iterate faster over next insim version updates.

That's the main reason why it took me so long to publish the crates. Every time I thought that I had something workable I would do a little test to see how it felt working with it and every time I felt something was wrong and I needed to introduce a breaking change. There's absolutely real value in not releasing too early Smile I completely respect your decision because it's the right one imho Smile

Quote from CRAAACH :gotta say the Cpp + Rust worlds just collide too much, bringing huge pain in the ass to implement some structs, heheh.

I'll agree it's certainly been fun coming up with compromises or options Big grin Some stuff doesn't quite map nicely.

There are some areas of the code I think can be done better, but they'll have to wait. The IS_HCP is a good example where I think it needs to be closer to the IS_MAL, and there are a few fields that will need some incompatible changes down the line.

I initially went down the rust-bindgen route. Which was a mistake. I'm not even sure that made it into git history. After some experiments with manually writing parsers a significant amount of time the libraries used Deku. After a few compatibility and upgrade issues and realisation that it's compile time, I started work on some home-grown macros. I realised that I was just building a half-assed version of binrw, so eventually switched to that, and I'm very happy with it at the moment.

I probably wasted the most time on the parsing and writing of packets.
Rust - insim.rs - a suite of crates to help you work with LFS
the_angry_angel
S3 licensed
insim.rs is a suite of crates to help you work with LFS in Rust.

The intention is to provide an ergonomic, strongly typed, native rust implementation of insim and various file formats, rather than a thin layer over a series of bytes and primitive types.

Both blocking (sync) and Tokio-based async are supported (through feature flags), depending on your needs.
  • The libraries are all published to crates.io.
  • All libraries are documented on docs.rs (this could be massively improved, but I needed to get this out the door).
  • You'll find examples in the git repo and simpler ones in the documentation.
Right now it works with the current version of Insim (at the time of writing). I have left in the ability for multiple versions of packets either through traits (if you delve through the git history you'll find the original implementation and why I removed this) or feature flags, down the line.

This was very much built for me and has become a passion project with no goal, or reason. But I hope that it can be useful for someone else.

The Future

I've got plans and ideas for the suite of crates, you can find them all here: https://github.com/theangryangel/insim.rs/issues. I do want to add Outsim, Outguage, MPR and SPR support.

However, my focus was to reach a stable API (v1.0.0) before the arrival of my 2 adopted daughters. I've just managed this, so I'll be giving them my complete focus for the next few months, at least.

Bugs and Pull Requests
  • If you have a bug, please log it against https://github.com/theangryangel/insim.rs/issues and I'll get to it when I can.
  • Pull requests are very welcome, but if it's not aligned with the goals of the project then be prepared for rejection. If you want to do something significant/radical maybe reach out first.
A Bit of History

Back in Feb 2021, I started work on this as an excuse to tinker with Rust after a Twitter conversation with Dygear. The original plan was just to bang out something quick and then build something fun with it.

Turns out that I enjoy a bit of yak shaving and didn't really get to the "build something" part.

There were a lot of long breaks, because of family life, and I spent an insane amount of time thinking about how to make it easy to use for people familiar with Rust and the original insim spec.

It turned out my original ideas weren't very sensible, and everything looks very different than what I had in mind originally.

Addressing that "Rewrite it in Rust" meme

I often use Insim as my "hello world" to a new language because it touches quite a number of areas.

I entered this saga thinking that I'd just bang out a library, as I've done before, and then move on. Mark Rust off the list of languages. I wouldn't publish it. I wouldn't do all the boring things like tests and documentation. I never set out to write the fastest, safest thing, in the new cool language.

I absolutely did not plan on spending a vast amount of time on this. It's completely insane. But somewhere along the way what I did find was a language which re-ignited my passion for programming, after spending years writing boring business software, for boring business people.

And I cannot explain it at all.
Last edited by the_angry_angel, .
the_angry_angel
S3 licensed
Relay seems to be down. I think. I'm really tired and might be hallucinating.

On LFSWorld.net I'm seeing this https://imgur.com/Dnse97E

Locally I'm also unable to connect.
the_angry_angel
S3 licensed
Quote from Flame CZE :Is this a bug in the relay protocol?

I assumed that this was a bug in my implementation and for now I've effectively hardcoded the relay to "uncompressed" format.

I'm somewhat glad I'm not going mental.
the_angry_angel
S3 licensed
https://github.com/discourse/discourse is generally considered to be the defacto standard for forum software these days, I believe
the_angry_angel
S3 licensed
Quote from Bob Smith :I picked up a 'VZ' Monaro back in October and finally got around to getting a nice shot of it in the daylight.

Oooh. Nice <3

Quote from Bob Smith :The whole fuel price thing is clearly my fault

I *knew* it had to be one of you guys Big grin
the_angry_angel
S3 licensed
I'm not sure it's really in the same price range, but there's always OVH, Hetzner, Digitalocean, etc. if a really small VM is enough. It'll be around 4-8EUR/month depending the provider, etc. :/
the_angry_angel
S3 licensed
Vultr, Scaleway or DigitalOcean spring to mind as cheap
the_angry_angel
S3 licensed
Quote from Victor :Hi TAA! Yes, the relay works also with the new hosts, however there's no full support for the new sizebyte yet. It's coming up.

<3
the_angry_angel
S3 licensed
Quote :New packet size byte - now represents packet size divided by 4
This allows larger packets up to 1020 bytes (old limit was 252)

Is it safe to assume the relay will still exist in the new world order? And is there any possibility to default servers into the relay unless private or explicitly disabled?

The only reason I’m asking is that with no dcon this makes the relay a more valuable tool for testing libraries, etc.
the_angry_angel
S3 licensed
My condolences to friends and family.

I have fond memories of chatting with Shaun “back in the day”. Always positive Frown
the_angry_angel
S3 licensed
whatyearisit.gif
the_angry_angel
S3 licensed
Quote from xtraction : I would love to go back to the old days of GTR @ AS3 [CD] Server and race out my skin but it's never happening and never will.

Quote from RC-Maus :Yep I also miss the good old days, where u could choose between many servers with sprint races Shrug

The killer feature of LFS at it's height was undoubtedly servers like CTRA, etc. where there was a progression system, across multiple classes and servers with easy to pick up races. One off races before these types of server networks didn't keep me as interested and I never played as much before or after.

I'm now a proper adult - I own a house (which I bought as a wreck and I've been working on), I have a full time (and then some) job, I have a new extended family that I never had before, and a whole load of other stuff (gym, etc). My gaming sessions are now whenever I can get them in; leagues dont work for me, and I dont like pick up races because it feels like I'm just not doing anything. So I play stuff like BF where I can trick my brain into thinking because my XP is going up I'm not completely wasting time. Cruise servers I just dont get. If I wanted to sit in traffic I'd jump in my real car.

I've wanted to setup a kinda SaaS for a while to allow server ops to join their servers into an adhoc network via the InSim Relay to provide this experience so its not just relying on a single group. Just never got around to it, and now honestly I dont even know if the audience is really there.
the_angry_angel
S3 licensed
If you want a response from the devs its better to contact via https://www.lfs.net/mailus rather than assuming they'll find this on the forum.
the_angry_angel
S3 licensed
Fact of life; You put stuff on the internet, you will get port scanned. Decent software will attempt to talk to the port if it's open and try to verify what it is.

Unless you've got a reason to think you're being directly targetted I'd be surprised if its more than that.

If you're really bothered by it you can start looking at tools like fail2ban that consume the LFS server log and block the IPs (if you're on windows scripting something up using powershell, a quick regex to filter the logs and calls to create/modify firewall rules should suffice).
the_angry_angel
S3 licensed
Quote from Dygear :TAA, you mean this?

https://www.lfs.net/forum/post/1748707#post1748707

It wasn't specifically what I thinking of. Although now you've posted it I do remember it Big grin

Since it does does implement All The Things(TM), you should probably just use that folks Big grin
the_angry_angel
S3 licensed
Edit: As Dygear says; just use Victor's library at https://www.lfs.net/forum/post/1748707#post1748707


If you're not a fan of nesting your span's (which assuming you're putting your output through a html sanitiser might make it's job a little easier) you could do something like the following, which will result in;

<span style="color: red">Hello </span><span style="color: green">World. </span><span style="color: yellow">Testing.</span>


<?php

$str = "^1Hello ^2World. ^3Testing.";

echo preg_replace_callback("(\^([0-9])(.+?)(?=\^[0-9]|$))", function($match) {
$colours = array(
0 => 'black',
1 => 'red',
2 => 'green',
3 => 'yellow',
4 => 'blue',
5 => 'pink',
6 => 'lightblue',
7 => 'white',
8 => 'black',
9 => 'inherit'
);

return '<span style="color: '.$colours[$match[1]].'">'.$match[2].'</span>';
}, $str);
?>

It's been a long time since I've looked at LFS, but I could've sworn there was a method to escape ^. Not in the manual though and I can't be bothered to download the game to test.
Last edited by the_angry_angel, .
the_angry_angel
S3 licensed
If it's a thing for fun, cool Smile

If it's a thing you actually think people would want and use, I suspect that far fewer people will actually use than you think...

Edit: man, that's a bad sentence.
Last edited by the_angry_angel, .
the_angry_angel
S3 licensed
This McFrontalot song seems appropriate for some of the members here :P
the_angry_angel
S3 licensed
Tbh, if I was writing something for the real world (so a network of servers, with a website that was live updating track maps and leaderboards) and I was using PRISM I'd probably architect this completely differently. I'd setup a plugin to ship off the events (or packets) to a pubsub system (redis most likely) and then use something else to hand off to the websockets.

I do realise that PRISM is a long running process, but it doesn't really look like PHP lends itself at all to websockets even now, and it would become a much harder problem to scale PRISM doing all of the work, imho.

Best tool for the job and all that.
the_angry_angel
S3 licensed
LFS has a number of programming interfaces, one of which is called Outgauge. This provides a live feed of values from the dashboard. With some programming and hardware you can setup something like this.

I'm not aware if there's an "off the shelf" product.
FGED GREDG RDFGDR GSFDG