VPinballX (Standalone) Code (Draft)

VisualPinball Engine for MacOS / Android / linux - github / discord

Code

Use CMake

Dependancies

Debug mode

### change build instruction from 
cmake -DCMAKE_BUILD_TYPE=Release -B build
## to 
cmake -DCMAKE_BUILD_TYPE=Debug -B build_debug # so you have debug information

Setup a custom .ini files, with proper setting ex: Fullsceen=false and display for picking screen. You can copy & customize the one located in ~/.vpinball/VPinballX.ini

The entries of the .ini files are read with LoadValueWithDefault call, and you can lookup where the value are used in the code (see below for eg).

a Webserver is created on 0.0.0.0:2112

Setup Display

res/exampleTable.vpx is nice and small table for testing.

void Player::PreCreate(CREATESTRUCT& cs) {
    m_fullScreen = LoadValueWithDefault(regKey[RegName::Player], "FullScreen"s, IsWindows10_1803orAbove());
    ...
}
void Player::CreateWnd(HWND parent /* = 0 */) {
...
   const int display = g_pvp->m_primaryDisplay ? 0 : LoadValueWithDefault(regKey[RegName::Player], "Display"s, 0);
   
   if (m_fullScreen) 
   
         m_sdl_playfieldHwnd = SDL_CreateWindow(cs.lpszName, cs.x, cs.y, cs.cx, cs.cy, flags);
}

Project

Make it work on linux to be able to build a pincab not requiring windows.

Next

  • How to enable DMD inside B2S in standalone ? - see
    • patch
    • DMD in it’s own windows work fine (see Attack from Mars), but may depends on table implementation
  • loading lucy? / anaglyph
Written on September 27, 2023, Last update on October 6, 2023
pincab code-review project draft