AI Coding & Prompts
Treat AI Coding as a game engine! Master prompts for Cursor, Claude, ChatGPT, and Antigravity to build complete BentoTiles games in minutes.
🤖 AI Coding as a Game Engine
With modern AI coding assistants (such as Cursor, Claude, ChatGPT, and Antigravity), you can treat AI Prompting as your primary game creation engine.
Instead of writing all boilerplates by hand, you can instruct AI to generate complete HTML5, Phaser 3, Unity, or Godot games pre-loaded with full BentoTiles SDK integration (Ads, Cloud Saves, Leaderboards, and Lifecycle events).
🚀 The BentoTiles Master AI Prompt
Copy and paste this master system prompt into your AI editor (Cursor, Claude, ChatGPT) when starting a new game project:
You are an expert HTML5 web game developer building a high-quality game for the BentoTiles web gaming platform.
REQUIREMENTS:
1. Include the BentoTiles SDK script tag in the HTML head:
<script src="https://sdk.bentotiles.com/v1/bentotiles-sdk.js"></script>
2. Initialize the SDK properly before starting the game loop:
BentoTiles.init({
gameId: "MY_GAME_SLUG",
onPause: () => { pauseGame(); muteAudio(); },
onResume: () => { resumeGame(); unmuteAudio(); }
}).then(() => {
BentoTiles.gameLoadingFinished();
startGame();
});
3. Add commercial ad breaks at natural pause points (Game Over, Level Clear) using:
BentoTiles.commercialBreak({
beforeAd: () => { pauseAudio(); },
afterAd: () => { resumeAudio(); }
});
4. Add a Rewarded Ad button for extra lives/coins using:
BentoTiles.rewardedBreak({
beforeAd: () => { pauseAudio(); },
afterAd: (success) => {
resumeAudio();
if (success) { grantReward(); }
}
});
5. Implement Cloud Saves with BentoTiles.storage (get/set) and Leaderboards with BentoTiles.leaderboards.submitScore().
Now, build a complete, single-file HTML5 Canvas arcade game with vibrant graphics, sound effects (using Web Audio API), score tracking, and smooth controls.📋 Ready-to-Use Prompt Templates
🎨 1. HTML5 Canvas Game Prompt
Prompt:
"Create a complete, polished 2D arcade dodge game in HTML5 Canvas using vanilla JavaScript. Include BentoTiles SDK initialization with gameId 'arcade-dodge', triggerBentoTiles.commercialBreak()when the player dies, add a 'Watch Ad for Revive' button usingBentoTiles.rewardedBreak(), and submit high scores viaBentoTiles.leaderboards.submitScore()."
⚡ 2. Phaser 3 Game Prompt
Prompt:
"Write a modular Phaser 3 platformer template in JavaScript. Include a BentoTiles SDK plugin or helper script that callsBentoTiles.init()on scene start, handlesgameLoadingFinished(), pauses the Phaser scene duringBentoTiles.commercialBreak(), and saves player high scores toBentoTiles.storage."
🎮 3. Unity WebGL C# & JSLib Bridge Prompt
Prompt:
"Generate a C#BentoTilesManager.csscript and.jslibbridge file for a Unity 2022+ WebGL game. Ensure C# callsBentoTiles_Init,BentoTiles_ShowAd, andBentoTiles_SubmitScore. HandleTime.timeScale = 0andAudioListener.pause = trueinside the C# callbacks."
🚀 4. Godot 4 GDScript Bridge Prompt
Prompt:
"Create a Godot 4 GDScriptBentoTilesSDK.gdAutoload script usingJavaScriptBridge. Implementinit(),commercial_break(),rewarded_break(), and score submission. Pause the GodotSceneTreeautomatically when an ad break starts."
💡 AI Prompting Tips for Web Games
- Dev Mock Mode: Tell your AI assistant that BentoTiles automatically runs in Dev Mock Mode on
localhost, so it can test ad overlays and cloud save mocks directly in the browser preview. - Audio Handling: Always remind the AI to route audio through Web Audio API or HTML5 Audio elements so that
onPauseandonResumecan mute/unmute sounds cleanly during ad breaks. - Responsive Canvas: Ask the AI to make the
<canvas>auto-fit the window size while preserving aspect ratio, ensuring smooth play on mobile and desktop devices.