Skip to Content
Nextra 4.0 is released 🎉
GamesDevelopmentLua

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

  • Active
  • Admin
  • Animation
  • AnimationNetworkDef
  • ArcadeGame
  • AsyncCommand
  • AsyncContext
  • Atmos
  • Base64
  • BasicGenx
  • BigInteger
  • Camera
  • Cloth
  • Clubs
  • Collision
  • Commerce
  • CommercePoint
  • Data
  • Debug
  • Editor
  • Entity
  • Environment
  • FileHandle
  • Font
  • Furniture
  • GameInfo
  • GameLaunch
  • GameLaunchButton
  • GameLaunchExporter
  • GameLaunchListItem
  • GameLaunchMenu
  • GameLaunchMenuSys
  • GameLaunchSlider
  • GfxEffect
  • Global
  • GriefReport
  • GroupDoor
  • Groups
  • Hash
  • HelpSystem
  • HttpPostData
  • Impl
  • Intersection
  • Json
  • Light
  • LinearCast
  • LocalPlayer
  • Locomotion
  • LocomotionPart
  • Material
  • Matrix44
  • MediaLibrary
  • MemoryContainer
  • MiniGame
  • Model
  • NavApp
  • NetInstances
  • NetPropertyBag
  • Object
  • ObjectPreview
  • Osd
  • Osk
  • OutboundMessage
  • Pad
  • Person
  • Phantom
  • Phys2dBody
  • Phys2dWorld
  • Phys3dWorld
  • Platform
  • Portable
  • Prop
  • Quaternion
  • RTGame
  • RTGameObject
  • Raycast
  • ReceivedMessage
  • Region
  • Renderer
  • Repertoire
  • Resource
  • ResourcePack
  • Rewards
  • SaveData
  • Scene
  • SceneDownload
  • SceneInfo
  • SceneTransition
  • Screen
  • Screenshot
  • Sound
  • SoundBank
  • SoundStream
  • Sprite
  • SpriteAnim
  • Startup
  • StreamOps
  • Subscriber
  • System
  • TargetMenuItem
  • Texture
  • Time
  • Tutorial
  • UTF8
  • User
  • Vector4
  • Video
  • VideoRecorder
  • View
  • Wardrobe
  • Xml
Last updated on