The online racing simulator
Searching in All forums
(669 results)
GeForz
S3 licensed
*blows dust off account*

Happy 20th Birthday!

Awesome to still seeing updates on this gem Smile
GeForz
S3 licensed
Yeah it's probably the same discussion as where the opening squirly braces belong, so I just continue with the given

I am just concerned about plugin-globals
GeForz
S3 licensed
everyone *g*
well your idea with the global object in the plugins config sounds weird and conflict-provoking if two addon writers make a "users" variable-database-thing.

additionally - as a fan of oop - I hate the thought that some magically vars exists outside of the object-context and you don't know where they come from ^^
GeForz
S3 licensed
Just a sidenote:

Pleas DO NOT use GLOBALS

thanks
GeForz
S3 licensed
ah well js... it's stupid and cool at the same time

i have some "get car infos info from prism and display cars on map" code lying around (the one on github is outdated) f someone wants to give it a try... i also have som multithreading example code which i could provide ^^
GeForz
S3 licensed
did you try to simulate the quality of analogue tv broadcasts?
GeForz
S3 licensed
The second-to last point should have really been "Added tracking of outbound packets"
GeForz
S3 licensed
If you do benchmarks, please also benchmark
'foo'.$packet->var.'bar'
against
"foo{$packet->var}bar"

GeForz
S3 licensed
not to mention the 132423 additional cars once we hit modding with s4!
GeForz
S3 licensed
Well http://www.lfsworld.net/remote/ does it somehow, so I would guess Victor has some experience with this...
GeForz
S3 licensed
Oh okay you are right, my bad :/

That means the buttonmanager has to be configured with a button id restriction in the hosts.ini file for each host...
GeForz
S3 licensed
andro you shold have put german signs on the road when using german police car skins
GeForz
S3 licensed
You mean the open configs?
Those have the normal track code appended by either X or Y.

e.g. for AS1

AS1 - normal track
AS1R - reverse track
AS1X - open config with normal AS1 start position
AS1Y - open config with reverse AS1 start position
GeForz
S3 licensed
But multiple insim connections don't share buttons/clickids?
At least that's what I found out by starting prism twice and clicking a button; only one instance got the BTC packet.

--

The way my implementation works is, that you a) can define keys for buttons and b) you can define callback-functions, thus you never need to compare clickIDs.
see https://github.com/GeForz/PRIS ... 1/plugins/buttonTests.php
GeForz
S3 licensed
perhaps you should add which "tool" you have put the x and y locations in?
GeForz
S3 licensed
Actually... it's not even html 5 as there is no canvas element involved
It's some wtf-html generation that creates a triangle by creating a div for each pixel-line with differing width's...
Buttonmanager
GeForz
S3 licensed
Ok, I promised Dygear to continue working on this, so this thread should be the central discussion topic for the ButtonManager/Button classes.

Let's start by specifying


The user (i.e. plugin writer) should be able to create new buttons with callbacks like in any other insim application. As prism is a multiuser/plugin system the user does not know which ClickIDs and areas of the screen are not already occupied by other plugins.
-> The main task of the Button system is to coordinate the assignment of ClickIDs to used buttons, so that no two plugins use the same ClickIDs.

Planned/partially implemented features:
  1. Assignment of unique ClickIDs to buttons on a user/host basis
  2. Restricting the ClickIDs in the hosts configuration
  3. Named buttons. e.g. Deleting buttons by key
  4. Grouping of buttons. e.g. Defining 5 buttons with the same group key and deleting them all with a single line of code
  5. Callback functions to buttons for clicks and text input
Proposed features:
  1. Reservation of an area on the screen to place buttons
  2. Automatic update of an button on "Content" change
  3. Throttling mechanism like Krammeh's for the above feature
  4. TTL - automatic deletion after x seconds
  5. Automatic deletion of buttons on certain events like race restarts
The assignment of the ClickIDs is the most important point which has to respect certain criterias:
- Upon sending a button has to have an unique ClickID
- After deletion the ClickID may be reassigned to another button
- Sending a button to all users should find a single ClickID which is not used for all users or one button for each user must be sent with user specific ClickIDs
-> The ClickIDs have to be on a host/user basis.


--

The current git version in the official repository is not ready to use. i.e. will probably crash after adding 240 buttons etc.

Please provide feedback on the proposed feature list and perhaps you even have more features to propose.
Last edited by GeForz, .
GeForz
S3 licensed
And while victor is on that he could add custom widgets for lfs world (or let's say custom "windows" which just involve an iframe and automatically sending the auth token to a specified url)
GeForz
S3 licensed
Quote from T3charmy :ok I fixed it...

added


<?php 
if (!empty($BTN->ClickID)) { return PLUGIN_CONTINUE; }
?>

to registerbutton, and now it only sets the ClickID when needed(AKA new button), also, when you guys made the button queue, it should go on a per user not a per host basics

so added this:

<?php 
self
::$ids[$hostId][$BTN->UCID]
?>

final product(posting to GitHub now):

<?php 
    
public static function registerButton(Button $BTN$hostId null)
    {
        if (!empty(
$BTN->ClickID)) { return PLUGIN_CONTINUE; }
        if (
$hostId === NULL)
        {
            global 
$PRISM;
            
$hostId $PRISM->hosts->curHostID;
        }
        
        
// next id: may be 0 - 239
        
$id 0;
        if (isset(
self::$ids[$hostId][$BTN->UCID]))
        {
            
$id self::$ids[$hostId][$BTN->UCID];
        }
        
        
$BTN->ReqI $id 1// may not be zero -_-
        
$BTN->ClickID $id;
        
        
self::$ids[$hostId][$BTN->UCID] = $id 1;
    }
?>

BTW Dygear, look for this account, not Fire_optikz001 :P Not even quite sure how I managed to get logged into Fire_optik001... :P

jeah thats one of the things i wasnt sure of. so its 239 buttons per conn and if you send a button to ucid 255 the clickid would need to be free for every user?
GeForz
S3 licensed
meh

I still get this odd exit-hang even in 0.6A3...

Is there any way to get more "debug" information?
GeForz
S3 licensed
Could anyone reproduce this?
Program does not exit after adding autoX object. [FIXED in 0.6E11]
GeForz
S3 licensed
Setup:
Freshly downloaded and unlocked LFS Z28. No configuration of any kind changed!

Steps to reproduce:
- Start singleplayer
- shift+u
- enable autox editor
- place starting line (no camera movement)
- press alt+f4

Outcome:
Car is steerably with the mouse but LFS has already partially shut down.
i.e. no hud, no sound, no key inputs
LFS can only be closed by killing the process.
Last edited by Flame CZE, . Reason : bug fixed in 0.6E11
GeForz
S3 licensed
I think including the LayoutObject is the easy way if you don't want to set the bytes manually yourself.
GeForz
S3 licensed
Thats a typo in prism core.
@Dygear: Manual pull request ^^
https://github.com/GeForz/PRIS ... 922e003a4b579c1839de5e945
GeForz
S3 licensed
AXM is definately working. What's your problem?
https://github.com/GeForz/PRIS ... urrent/plugins/pylons.php
FGED GREDG RDFGDR GSFDG