The online racing simulator
Searching in All forums
(363 results)
T3charmy
S3 licensed
Quote from SimulatorRental.com :SCAWEN,

In relation to my using One PC to run multiple instances of LFS, for multiplayer gaming. I have an issue with frame rates being too low on the separate monitors, because only one can have focus.

I have been googling for frame rate drops when window loses focus...

Almost every reply/answer/solution to whatever game or program, is related to a setting in the game itself. Some games have separate frame rate cap variables for when the window does not have focus, or is sleeping, to save power/resources.

Scawen, is there a variable for the non-focused sleep frame rate in LFS?
(Asked this in the other thread about this as well)

Odd you're experiencing this. I just launched multiple LFSs on my end and loaded them up with AI drivers, and they were all running at high FPS with no significant frame drops. This is also while running another game on my 2nd monitor.

Any significant loss is more then likely due to not fast enough hardware.

This is what I tested with: https://pcpartpicker.com/user/T3charmy/saved/FQVypg
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from AymanHilal :

Apologies again if I did a mistake towards anyone, therefore I won't post what I will do anymore as I slowly regret of posting this thread.

Thanks.

I don't mean to deter you from posting your work, if it really is your work. My main complaint is lack of any sort of mention for the work your plugin seems to be based on. I don't see it in your special thanks section of your insim, you didn't mention it in the post, just seems like to me like I'm not getting any sort of credit for my work.

As for Using [SC] I see now what [SC] stands for(looked a little closer at your images, noticed it stands for SimpleCruise, which is totally fine mine used to be SuperCr3w/Sup3rCr3w.), I suppose it's totally fine. I still occasionally drive around with my [SC] tag even though [SC] hasn't technically been around since 2010. So go ahead an use it I really don't mind.

I don't mean to come off as rude, I just was a little annoyed as you've made multiple threads now, and not a single one has even mentioned my name until after I had asked about my code in the last thread(because as I said previously, a lot of your function names seem to line up with the function names of my code).

It's nice to see that servers are still using LFSLapper and that LFSLapper is finally receiving some updates/new packets after being in hiatus for so many years. Again do continue posting your work, just be sure to give proper credit to those who have helped you.
T3charmy
S3 licensed
Quote from AymanHilal :
After almost months of my cruise addon development, why not spice things up and post some sneak peeks of my cruise addon? Wink

How much of this is really your work? looks to me like a whole lot of this(other than the main UI) is based off of my LFSLapper plugin from here: https://www.lfs.net/forum/post/1848179#post1848179

Quote from AymanHilal :[SC] Cruise Server

Couldn't even come up with an original name? That was the exact name my old LFSLapper based cruise server used to be.

Quote from AymanHilal :Possibly one of the first servers to run a full cruise in a lapper.

I wouldn't say first. you're about 8 years late to the party for first... as mentioned previously.

Quote from AymanHilal :
Oh sh*t! You got me, I'm cracked!
No, you silly. I have a second hand S2 account.

Then why don't you post with that account?

Not to mention your to-do list looks an awful lot like the todo list that was once included in that project...
T3charmy
S3 licensed
Scawen I have one (small?) request(and not sure if it's worth the time but it'd be nice to have).

Could we get a packet like MTC(and possibly something like this for BTN aswell[and while on this topic, would it be possible we could get more than 240 buttons/ClickIDs]), except we have the ability to send an array of IDs to send to?

PRISM has a translationEngine and currently when we translate a message that would usually go to 255, We have to loop through the list of players and send a MTC to each client(I suppose I'd have to loop through regardless to get the list of players, but sending fewer packets would be nice). It'd be helpful if there were a way to send to a set of players at the same time, and in the process save a few bytes.
Last edited by T3charmy, .
T3charmy
S3 licensed
Well this is weird.... (Not sure if LFS related... I doubt it) but randomly today my Xbox one controller that was reporting 5 axes is now reporting 6 axes. of course when it did that LFS didn't recognize it as a new controller(which is both good and bad), therfore the axes for thr/ brk were still combined. How ever I don't see this being a common issue so no worries.

Other then that, played with it more, and everything seems to be going good.
T3charmy
S3 licensed
Works good on my XBox One Controller now, detects the 5 axes. the Joystick look is really nice. Without axis calibration the car pulls a little to the right now, how do I go about fixing that? X axis value is between 30 and 50. I assume I'd increase the max range by 80 or so to correct that(that works, but is there a better/proper way to do that?).

I guess deadzones is what I'm asking about. is there a way to define a deadzone in LFS?

Edit: Just remembered Windows has a calibration utility under USB controllers... ran the calibration, now only off by about 5-10.

Edit 2: in response to the other day, Yea, Thr/brk centre reduction is kinda what I was referring to, especially if it was implemented on the steering axis, though having steer turn/return rates would probably be better... but that's more of a personal preference.
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from Yisc[NL] :The reason you can't use "GetCurrentPlayerVar" in de OnDisConnect event is that as soon as the event is fired, the player has already left the server.
So Lapper isn't able to retrieve the value of that player anymore.
It would be better to make a "Logout" button in the HUD which is linked to a sub-routine that saves the value(s) and then disconnects the player.

Ah yea, I do vaguely remember that being an issue now... I think that was one of the reasons I moved away from LFSLapper... that and the lack of updates at the time.

Quote from AymanHilal :Exactly!! I wouldn't have done anything without your old cruise plugin! Big grin
Anyways, about the parameter, i'll give it a shot, thanks!

As Yisc said, I don't think it will work, but you can try.
T3charmy
S3 licensed
I believe in SetUserStoredValue you missed a parameter.

I can't remember been 6 years since I used LFSLapper, but I think it should be SetUserStoredValue(User, Key, Value);

I'm assuming you're using code from my old Cruise plugin(function names line up, you're having the same issue as my old system had in the last release i made).
Last edited by T3charmy, .
T3charmy
S3 licensed
Uploaded another update which fixes the issue with TranslateEngine, as well as adds an additional function to plugins that allows a plugin to send a message to all hosts(Currently This will send to all hosts, regardless if they are running the plugin that called it or not.)

I may add another parameter to the function that allows it to be only sent to servers running the calling plugin.
T3charmy
S3 licensed
Quote from Scawen :
TEST REQUEST 1:

If anyone is around who has a game controller with combined trigger axes, please can you confirm this - if you use the triggers, the yellow/blue bar on the LFS screen moves in the 'wrong' direction. To the left when you use the right trigger, and right when you use the left trigger.

To be clear - that strange result is the TRUE value reported by DirectInput. The LFS bug was in the interpretation of that value, so in fact the combined axis should be Inverted after all (which will be correct with my bug fix).

Correct, left trigger moves yellow bar to right, right trigger moves blue bar to left.

Xbox One Wireless; Windows 10 Pro
T3charmy
S3 licensed
Found a minor bug in the translate engine. I'll need to release another minor update.
PHPInSimMod - PRISM 0.6.0 Discussion
T3charmy
S3 licensed
You can download PHPInSimMod - PRISM 0.6.* from that link. Please use this thread to talk about this release.

Thank you.

PHPInSimMod (PRISM) 0.6.0

Increased version to 0.6.0 due to the following plugin breaking changes:
  • Translation engine changes potentially breaking plugins for certain users
  • AddClickEventToBtn from BetterButtonManager caused the incorrect params to be sent in some situations(See below)
Updates:
  • Add handling for buttons created using UCID 255 ( #63 )
    • correctly handle buttons events even when button is created with UCID 255
  • ClearButtonsForConn when a client disconnects ( #28 )
  • Update Translation Engine ( #64 )
    • Moved Translations to own class which is now inherited by plugins [UserPlugin extends Plugins extends Translations extends Timers]
    • Converted TranslateEngine to a class
      • See how to use Translations in your plugin here
      • Translations are now stored to a static variable for caching
      • To clear cache for your plugin call $this->clearTranslationCache();
      • if you ever called directly called the TranslateEngine function in your plugin(which was not how it was originally intended, but could have been used that way, you'll need to update your code to use translateEngine::translate)
  • Add param to betterButtonManager initButton function that prevents the text from looping
    • This could be really useful in situations such as coundowns so you could do something like:

      <?php 
      #InitButton(ButtonName, Group, Top, Left, Width, Height, ButtonStyle, Text, SecondsToShow, Repeat);
      $this->BTNMan[$UName]->InitButton('testButton''testGroup'25255025ISB_DARK, array('5''4''3''2''1''GO!'), 8false);
      ?>

      In this situation, it would count down from 5 to 1 and then say go for 3 seconds.
    • For help setting up betterButtonManager, there is a readme available here(though it currently doesn't list all of the functions that are available in the betterButtonManager.)
  • Fix situations when using betterButtonManager and addClickEventToBtn and no param array is specified(so it defaulted to null as a result as seen below)

    <?php 
    public function AddClickEventToBtn($Name$Class$Function$Params=null)
    ?>

    PRISM was treating the null as the parameter intended to send to the function. When there is no params the following is expected:

    <?php 
    function ClickEvent ($BTC$BTN) {
        
    #BTC has the structure of the BTC packet PRISM receives from the host
        #BTN is the original button that caused the click
    }
    ?>

PHPInSimMod (PRISM) 0.6.1

* available from same link as above currently
  • Fix issue left over from when moving translateEngine to it's own class
  • Add MessageAllHost Plugin function.

    <?php 
    # Sends a message to all servers including the one that called the function
    $this->messageAllHosts('This is sent to all PRISM connected hosts!');

    # Sends a message to all servers but the one that called the function
    $this->messageAllHosts('Message to other host!'true);
    ?>

Last edited by T3charmy, . Reason : Forgot to mention another important change
T3charmy
S3 licensed
PHPInSimMod (PRISM) 0.6.0

Increased version to 0.6.0 due to the following plugin breaking changes:
  • Translation engine changes potentially breaking plugins for certain users
  • AddClickEventToBtn from BetterButtonManager caused the incorrect params to be sent in some situations(See below)
Updates:
  • Add handling for buttons created using UCID 255 ( #63 )
    • correctly handle buttons events even when button is created with UCID 255
  • ClearButtonsForConn when a client disconnects ( #28 )
  • Update Translation Engine ( #64 )
    • Moved Translations to own class which is now inherited by plugins [UserPlugin extends Plugins extends Translations extends Timers]
    • Converted TranslateEngine to a class
      • See how to use Translations in your plugin here
      • Translations are now stored to a static variable for caching
      • To clear cache for your plugin call $this->clearTranslationCache();
      • if you ever called directly called the TranslateEngine function in your plugin(which was not how it was originally intended, but could have been used that way, you'll need to update your code to use translateEngine::translate)
  • Add param to betterButtonManager initButton function that prevents the text from looping
    • This could be really useful in situations such as coundowns so you could do something like:

      <?php 
      #InitButton(ButtonName, Group, Top, Left, Width, Height, ButtonStyle, Text, SecondsToShow, Repeat);
      $this->BTNMan[$UName]->InitButton('testButton''testGroup'25255025ISB_DARK, array('5''4''3''2''1''GO!'), 8false);
      ?>

      In this situation, it would count down from 5 to 1 and then say go for 3 seconds
    • For help setting up betterButtonManager, there is a readme available here(though it currently doesn't list all of the functions that are available in the betterButtonManager.)
  • Fix situations when using betterButtonManager and addClickEventToBtn and no param array is specified(so it defaulted to null as a result as seen below)

    <?php 
    public function AddClickEventToBtn($Name$Class$Function$Params=null)
    ?>

    PRISM was treating the null as the parameter intended to send to the function. When there is no params the following is expected:

    <?php 
    function ClickEvent ($BTC$BTN) {
        
    #BTC has the structure of the BTC packet PRISM receives from the host
        #BTN is the original button that caused the click
    }
    ?>

PHPInSimMod (PRISM) 0.6.1
  • Fix issue left over from when moving translateEngine to it's own class
  • Add MessageAllHost Plugin function.

    <?php 
    # Sends a message to all servers including the one that called the function
    $this->messageAllHosts('This is sent to all PRISM connected hosts!');

    # Sends a message to all servers but the one that called the function
    $this->messageAllHosts('Message to other host!'true);
    ?>

Last edited by ScottLy, . Reason : I think there's a bug with uploading, once i upload a file, after that i delete it other person files is not shown. Thats why i leave a dummy which is empty
T3charmy
S3 licensed
My original idea was a no go as you pointed out to me(Defeats the purpose of sending to UCID of 255). the best solution that I was able to come up with was reserve a set of IDs for global buttons. that way there will never be a chance of ClickIDs overlapping and interfering with eachother.

Code can be viewed here: https://github.com/Dygear/PRISM/commit/5ba1655914023a999322389d1c0c4fe58cd1a14f

I still need to complete the translation system caching and then I feel like it would be a good time to release 0.5.2. I hope to have the updates done and released by this evening.
T3charmy
S3 licensed
Quote from Scawen :I think this goes a bit further than what I can get into this week. I feel time is short because we need a full version up there that supports the new Rift. Many people can't or don't want to install a test patch so I think we need to go for a full version next weekend.

Totally understand that. I'm fine with it not being added right this second, but having this functionality in the future would certainly improve the driving experience and bring it more inline with other racing/driving games.

Quote from Scawen :This sounds a bit like the existing "Thr / brk centre reduction" option.

Perhaps. I'll look at that more, though my original thought wouldn't be needed if the below was implemented.

Quote from Scawen :I thought some more about this, and I'm not sure if this is just obvious or not (maybe is how it is in other games, I don't know) but I thought the two axes of the right stick could be useful to make a full 360 degree look system.

How it could work :

- X and Y axes are assigned
- A new "joystick" look function (probably default)
- Centre dead zone, nothing happens up to around 25% movement
- Moving stick to the edge in any direction will look that way
- Moving stick partially will provide an intermediate position

This way, moving the stick left or right would look 90 degrees left and right. You could look more forward or back from that position by moving the stick forward or back. I think you could quite quickly or smoothly look in any direction you wanted to. I haven't tried it yet but it seems the combined use of two axes to control look heading in this way could work well.

The idea sounds really good assuming I'm understanding it correctly. I feel like having this would make shoulder checks and that kind of stuff a little more natural for those not actually using a VR headset but are using a controller.
T3charmy
S3 licensed
Quote from cargame.nl :
Right well hmm.. All of a sudden it's busy. (lets see for how long)

I get several errors though, one of them @line48 parent::send($hostId); ... HostId not defined, that one I can understand... But I even get pack errors @prism_packets. No idea yet why this happens.

Hmm Interesting. I'll fix the line 48.. I'll look closer at the pack errors.
T3charmy
S3 licensed
Quote from cargame.nl :Smile

I tried to address the 255 myself but haven't found a 100% fix yet it seems. It was/is more complicated then I thought although I think I am on the correct path. But if you find a solution quicker it's always great of course. Tilt

I have a method in mind. I will try and implement it tomorrow.

Edit: and by tomorrow I mean I just implemented a solution that is ready to be tested.

if you wish to try the changes: https://github.com/T3charmy/PRISM/commit/701ead0280e0d2192b58b91b998217f4ba366132
I haven't done any testing yet, but theoretically it should do what we want it to.
Last edited by T3charmy, .
T3charmy
S3 licensed
Here's an old project of mine for LFSLapper, feel free to have a look and take some code/ideas: https://www.lfs.net/forum/post/1848179#post1848179
T3charmy
S3 licensed
This weekend I'm going to try and work on this stuff:
Quote from cargame.nl :Well... Very cool updates.. But...

Concerning language translations it's not very efficient to do this, every time some file must be read to retrieve a translation and the amount of read actions can increase massively with the amount of languages multiplied by lines of translation text multiplied by amount of connections.

So, it's better to read everything at init and store it in a memory array and access the memory array every time.

--
Talking about efficiency, sending buttons @255 never worked at buttonmanager. It starts to bug me a lot, hopefully it bugs me one day enough that I find a proper fix for this. It's already there for years. Sadly.

https://github.com/Dygear/PRISM/issues?utf8=%E2%9C%93&q=milestone%3A0.6.0
Last edited by T3charmy, .
PHPInSimMod - PRISM 0.5.1 Discussion
T3charmy
S3 licensed
You can download PHPInSimMod - PRISM 0.5.1 from that link. Please use this thread to talk about this release.

Thank you.

PHPInSimMod (PRISM) 0.5.1.0
  • Version changed to 0.5.1.0
  • Added new insim updates included in 0.6N
    • Added ISS_DIALOG and ISS_TEXT_ENTRY to the ISS state flags
    • New packet SMALL_LCS - set local car switches (lights, horn, siren)
T3charmy
S3 licensed
PHPInSimMod (PRISM) 0.5.1.0
  • Version changed to 0.5.1.0
  • Added new insim updates included in 0.6N
    • Added ISS_DIALOG and ISS_TEXT_ENTRY to the ISS state flags
    • New packet SMALL_LCS - set local car switches (lights, horn, siren)
T3charmy
S3 licensed
Alright. I'll get that released tonight after I grab some dinner.
T3charmy
S3 licensed
Should I do 0.5.0.8 or should I increase to 0.5.1? Wasn't sure since it's not a major update, but it's also not a hotfix. I think we should start another thread to discuss the version numbering schema, and what we want to do future releases as.

Quote from Wikipedia :the major number is increased when there are significant jumps in functionality such as changing the framework which could cause incompatibility with interfacing systems.

the minor number is incremented when only minor features or significant fixes have been added

and the revision number is incremented when minor bugs are fixed

But I suppose we need to discuss where we want to go from here on forward.

Edit: I know on my personal projects I usually do year.month.day.TimeinGMT24hrFormat such as 16.04.07.2230. but I don't think that would be the optimal version number schema for PRISM.
Last edited by T3charmy, .
T3charmy
S3 licensed
Yep, only 5, Just bought the controller + wireless adapter for windows from the store about 3 weeks ago. LFS reports "Controller (Xbox One For Windows) Gamepad". Only have 5 axes. X axis, Y Axis, Z Axis, RX Axis, RY Axis. Also using the auto-installed driver. Running Windows 10 1511 at the moment. (Also see my previous post about an issue related to windows 10 tech preview).
T3charmy
S3 licensed
Seeing as this hasn't been done yet. Would you like me to go ahead and release this?
FGED GREDG RDFGDR GSFDG