Wiki / Gameplay Workshop
Make a keypad game with a real goal
Build a two-cube game in Studio, set up four-direction movement, and reach a working win condition.
Make a player and a goal
Choose File → New Project… and save Keypad Quest.j2meproj in Documents. Studio opens a starter scene with a camera and cube. Select the cube in the Hierarchy, set its Name to Player, and in Transform → Position set X to -0.5 while Y and Z stay at 0.
Choose + Object → Cube to add a second cube. Select it and set its Name to Goal and its Position to X 0.5, Y 0, Z 0. This puts both cubes on the camera's horizontal plane with one unit between them. The default camera can see both.
Add keypad movement and tune the finish
Select Player. In the Inspector, open Add Component… and choose Keypad Movement. This component appears for a mesh when the scene contains another mesh. Studio picks the other mesh as the starting Goal; check that the field says Goal. Set Move step to 0.25 and Goal radius to 0.12.
The exported game moves the player with Numpad 4, 6, 2, and 8 (left, right, up, down). The goal is reached when the player is within Goal radius in 3D space. Here, four presses of 6 move X from −0.5 to 0.5 exactly. The MIDlet displays Goal reached! and stops accepting movement.
Build and play
Press Save, then Test MIDlet. In the emulator, press Numpad 6 four times and look for Goal reached!. Press Test MIDlet again to restart. Try 4, 2, or 8 first to see the other movement directions. Add another mesh between the player and goal and add Box Collider 3D components to both the player and obstacle to test blocking; the basic game has no obstacles, so every valid step moves freely.
The same starter project can be checked from PowerShell. Set $project to the folder you chose in Documents. Get $cli, $jdk, and $toolkit from the installed CLI setup guide. validate checks the scene; build writes the MIDlet JAR and JAD under the project's build folder.
node $cli validate $project
node $cli build $project --jdk $jdk --toolkit $toolkit