Power Player is a runtime player that executes code and assets authored in PowerPoint, enabling the development of games, interactive media.
- Standalone : Windows
Edit objects directly on the slides. Define object names and layer hierarchy using the Selection Pane (Home > Select > Selection Pane).
Write JavaScript directly in the slide's Comment section to control objects, set up game loops, and handle player input.
- Invoke the function with 'this' as the Game Instance.
- Using this.var["varName"] to defined a global(Game) variable.
- Using let / var to defined a temporary variable.
- Auto convert
”“to',’‘to'. - Using spawnObject to duplicate an object results in a new instance named with the format
[originalName]-[uuid]. - Disable auto correct option :
File -> Options -> Proofing -> AutoCorrect Options - A semicolon
;is required at the end of each statement.
Class- Scenes
- Scene Objects
- Collision
- Audio
- Input
-
Make a button and switch to other slides.
{ let b = this.getObject("buttonObject"); b.interactive=true; b.on("pointerdown",()=>{ this.switchSlide(2); }) }
-
Control player.
this.onUpdate=(delta)=>{ let player = this.getObject("player"); player.x = this.input.mousePosition.x; player.y = this.input.mousePosition.y; if(this.input.getCode("KeyA")=="JustPress"){ this.spawnObject("object", {x:p.x+60, y:p.y}); this.playAudio(0,"se"); } }
-
Update spawned objects.
this.onUpdate=(delta)=>{ for(let obj of this.queryObjects("^objects-.+$")){ obj.x+=delta*300; if(this.objectOutOfScene(obj.name)){ this.removeObject(obj.name); } else if(this.collide("player",obj.name)){ this.var["score"]+=1; this.removeObject(obj.name); } } }


