Lua
PlayStation Home exposed a Lua 5.1 interface to developers, so that they could create games and systems without needing to embed everything in the main game.
LuaC
Developers had the option to compile their Lua scripts into bytecode, using the luac compiler. This was useful to protect the source code and improve performance.
In the Object’s resources.xml file, a luac entry must be marked with the protected attribute:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://home.scedev.net/schema/object">
<local>
<lua name="main.lua" deferred_loading="false" protected="true" file="path/to/main.luac" />
...
</local>
</resources>Home’s HDK provided its own HomeLuaC.exe compiler, which included additional optimizations for the PlayStation Home environment.
Libraries
In addition to the standard Lua libraries, Home provided plenty of custom ones, implemented in the game’s binary.
Lua Libraries
ActiveAdminAnimationAnimationNetworkDefArcadeGameAsyncCommandAsyncContextAtmosBase64BasicGenxBigIntegerCameraClothClubsCollisionCommerceCommercePointDataDebugEditorEntityEnvironmentFileHandleFontFurnitureGameInfoGameLaunchGameLaunchButtonGameLaunchExporterGameLaunchListItemGameLaunchMenuGameLaunchMenuSysGameLaunchSliderGfxEffectGlobalGriefReportGroupDoorGroupsHashHelpSystemHttpPostDataImplIntersectionJsonLightLinearCastLocalPlayerLocomotionLocomotionPartMaterialMatrix44MediaLibraryMemoryContainerMiniGameModelNavAppNetInstancesNetPropertyBagObjectObjectPreviewOsdOskOutboundMessagePadPersonPhantomPhys2dBodyPhys2dWorldPhys3dWorldPlatformPortablePropQuaternionRTGameRTGameObjectRaycastReceivedMessageRegionRendererRepertoireResourceResourcePackRewardsSaveDataSceneSceneDownloadSceneInfoSceneTransitionScreenScreenshotSoundSoundBankSoundStreamSpriteSpriteAnimStartupStreamOpsSubscriberSystemTargetMenuItemTextureTimeTutorialUTF8UserVector4VideoVideoRecorderViewWardrobeXml
Last updated on