The online racing simulator
#1 - Racon
PHP7/Win - PIE (PHP; InSim; Easy) - Windows EXE running a PHP InSim framework
PiranMOTO PIE (PHP; InSim; Easy) - Windows EXE running a PHP InSim framework

** Please consider this a beta release at this time! **

PIE is designed to be give easy access to InSim functionality with the PHP programming language (ver 7.2, CLI mode). It takes care of connection to InSim (and optionally OutSim and OutGauge) and maintaining the connection, and calls a user-defined function on receipt of any packet. It can be used to connect to an LFS client (local mode) or an LFS server (host mode) and comes with some basic commands and debugging.

PIE is a commandline executable that reads a PHP file (refered to as a PIE script) and optionally a text configuration file. PIE then uses the settings provided to initiate a connection to InSim. Once connected, PIE will wake from sleep at the specified frequency to run a 'tick'. During this tick, PIE will process any incoming packets, call any pending callback functions, and return to sleep. PIE runs at between 5 and 50 ticks per second, default 20.

PIE scripts consist of PHP functions that are called by PIE as appropriate, such as at startup, on receipt of a packet, at a pre-specified time, etc.

There are functions available to do common tasks such as sending packets, speaking to chat, etc., and a PIE object provides constantly-updated InSim information and a data store.

Functions that are called on receipt of an InSim packet are called with a parameter which consists of all the packet data, unpacked into an associative array. Some packets with combined values have additional indexes for the separated values, and all text fields have been made safe for windows (0 byte stripped, raw SkinID bytes converted to SkinID text string).


Requirements:
  • Windows or emulator
  • LFS v0.7+ (InSim v9+)
  • Visual C++Redistributable 2015 (often already installed) (https://www.microsoft.com/en-us/download/details.aspx?id=48145)
(You do NOT need to install PHP)


'Hello world' demo:
Attached images
image1.jpg
Attached files
PIEv0.1.1.zip - 9 MB - 196 views
tutorials.zip - 727.7 KB - 158 views
This is really cool, good work!

FGED GREDG RDFGDR GSFDG