Treasure Ocean Documentation by slotgen


Treasure Ocean


Created: March 20, 2026

By: slotgen

Email: slotgen@gmail.com

Telegram: @SlotgenSupport

Thank you for purchasing my code. If you have any questions beyond the scope of this help file, please feel free to email via my user page contact form here. Thanks so much!

Engine: Construct 3 First Layout: loading 20 Paylines Free Spins + Big Win

1. Overview

Product: Treasure Ocean slot game source.

Use Case: fast reskin/rebrand and deployment for web casino portals or white-label game collections.

  • 5x3 evaluation area with fixed 20 paylines.
  • Wild/Scatter logic with free-spin triggering and retrigger.
  • Big Win stage animation flow and mobile/desktop responsive UI.
  • Multi-language text packs (JSON locales).

2. Package Contents

Top-level Directories

  • c3project/: full Construct 3 source package.
  • HTML5/: exported playable build generated from c3project.
  • documentation/: buyer help files (HTML/CSS/JS/assets).

Inside c3project/

  • c3project/project.c3proj: main Construct 3 project file.
  • c3project/layouts/: game scenes (loading, main, etc.).
  • c3project/eventSheets/: event logic per layout.
  • c3project/scripts/: gameplay/UI/runtime JS modules.
  • c3project/images/, c3project/icons/, c3project/files/: art and data assets.

3. Requirements & Setup

  • Construct 3 runtime project (c3project/project.c3proj, runtime: c3, savedWithRelease: 47600).
  • Modern browser (Chrome/Edge/Firefox/Safari).
  • Optional: local static server for final QA export check.

Project Technical Notes

  • Main runtime scripts are loaded from c3project/scripts/main.js.
  • Project uses built-in Construct plugins/behaviors and custom effect skymen_BetterOutline (v2.1.0.1 in project metadata).
  • Spine HTML runtime helper is included under c3project/scripts/spine/.

Export & QA Checklist

  1. Preview in Construct 3 and verify loading → main transition on desktop + mobile.
  2. Run spin tests for normal, turbo, free spin trigger, retrigger, big win sequence.
  3. Validate language switching via URL (?lang=xx&social=true|false).
  4. Export build into HTML5/ and smoke test on at least Chrome desktop + iOS/Android browser.
  5. Check no console errors in loading, spin, and popup flows.

This documentation itself is static. Double-click documentation/index.html to open it locally.

4. Quick Start

  1. Open c3project/project.c3proj in Construct 3.
  2. Run preview and verify loading → main transition.
  3. Test spin flow (normal/turbo, free spins, big win).
  4. Edit brand assets in c3project/images/ and text in locale JSON.
  5. Export target build to HTML5/ and run final QA.

Marketplace Submission Notes

  • Use listing preview images/video on the marketplace product page.
  • This local documentation focuses on setup and technical usage, not media showcase.
  • Keep UI text and jurisdiction wording consistent with the final submitted build.

5. Gameplay Rules

  • Lines: 20 fixed paylines.
  • Payout: multiplier × bet-per-line.
  • Scatter: 4+ triggers 15 free spins.
  • Retrigger: during free spins, 3+ scatter adds +5 free spins.
  • Big Win: threshold logic based on total win / total bet multiplier.

6. Architecture Map

FileResponsibility
c3project/scripts/mechanics.jsCore reel spin, symbol generation, win evaluation, free-spin counters.
c3project/scripts/result.jsWinning symbol focus, payline effects, free-spin loop orchestration.
c3project/scripts/bigwin.jsBig win thresholds, staged events, skip logic.
c3project/scripts/betoption.jsHUD, bet/autospin controls, history, i18n-based labels.
c3project/scripts/gui.jsResponsive layer scaling, loading prompt overlay, background mode.

7. Public API

APIDescription
g_spin(turbo)Start a spin; pass true for turbo mode.
g_setTotalBet(value)Set total bet amount.
g_getTotalBet()Get current total bet.
g_getFreeSpins()Read free-spin remaining count.
g_setSymbolsScaleMode(mode)Force responsive mode: auto/mobile/ipad/desktop.

8. Customization

  • Brand/UI: replace logo/background/symbol textures in c3project/images/.
  • Localization: edit JSON files in c3project/scripts/locales/betoption/.
  • Math feel: tweak symbol weights and timing in c3project/scripts/mechanics.js.
  • Win thresholds: adjust big-win multipliers in c3project/scripts/bigwin.js.

9. Jurisdiction Requirements (Social Mode)

For social-casino deployment, some jurisdictions/platforms prohibit specific gambling terms. This applies primarily to game rules text, and may also apply to UI labels, image captions, and tutorial content.

Integration rule: the RGS provides URL query parameter social=true / social=false to indicate social-casino mode. Recommended implementation is separate locale files with sweeps_<lang> prefix for compliant text substitutions.

Restricted Terms Mapping

Restricted PhraseSuggested Replacement Phrase
win featureplay feature
pay outwin / won
paid outwin / won
stakeplay amount
pays outwon
bettingplay / playing
total bettotal play / play
betplay
betsplays
cashcoins
payerwinner
paywin
payswins
paidwon
moneycoins
buyplay
boughtinstantly triggered
purchaseplay
at the cost offor
rebetrespin
cost ofcan be played for
creditbalance
buy bonusget bonus
gambleplay
wagerplay
depositget coins
withdrawredeem
bonus buybonus / feature
be awarded to player’s accountsappear in player’s accounts
place your betscome and play / join in the game
bet/splay/s
currencytoken
fundbalance

Compliance Checklist

  • Rules popup text uses compliant terminology when social=true.
  • HUD labels switch from bet wording to play wording.
  • No restricted term appears in images, sprites, or banners.
  • No restricted term appears in history, toasts, or debug text.

10. Language Support

The project supports standard locale files and social-compliant locale files:

  • Standard: <lang>.json
  • Social mode: sweeps_<lang>.json
  • Selection: query params lang / locale and social=true|false
🇺🇸 en - English 🇩🇪 de - German 🇪🇸 es - Spanish 🇫🇮 fi - Finnish 🇫🇷 fr - French 🇮🇳 hi - Hindi 🇮🇩 id - Indonesian 🇯🇵 ja - Japanese 🇰🇷 ko - Korean 🇵🇱 pl - Polish 🇵🇹 pt - Portuguese 🇷🇺 ru - Russian 🇹🇷 tr - Turkish 🇻🇳 vi - Vietnamese 🇨🇳 zh - Chinese 🇸🇦 ar - Arabic

Example URLs

?lang=en&social=false
?lang=en&social=true
?locale=vi&social=true
?lang=ja&social=false

11. JS Setup Guide (Slot Configuration)

Most game behavior is controlled from JavaScript files in c3project/scripts/. Change only these config blocks to avoid breaking flow logic.

This section is focused on practical buyer customizations: symbol spacing, spin speed, UI theme colors, bet levels, free-spin rules, and language output.

Most Requested Customizations (with exact file targets)

Customization GoalEdit InMain Variables
Increase/decrease gap between symbolsc3project/scripts/mechanics.jsCONFIG.hSpacing, CONFIG.vSpacing, CONFIG.startX, CONFIG.startY
Change symbol sizec3project/scripts/mechanics.jsCONFIG.symbolSize
Make spin faster/slowerc3project/scripts/mechanics.jsMAX_SPEED, ACCEL_MS, NORMAL_COL_DELAY, TURBO_MIN_LOOP_SPEED
Adjust payout/RTP feelc3project/scripts/mechanics.jsWEIGHTS_WITH_WILD, WEIGHTS_NO_WILD, PAYOUT
Change free-spin trigger and countc3project/scripts/mechanics.jsSCATTER_THRESHOLD, SCATTER_FREE_SPINS
Change default bet ladderc3project/scripts/betoption.jsBET_UI.betOptions, BET_UI.autoOptions
Change main UI accent/theme colorc3project/scripts/betoption.js--slot-accent, --slot-accent-strong, --slot-panel-* CSS variables in HUD style block
Change loading prompt text/languagec3project/scripts/gui.jsresolveLoadingPromptMessage(), g_setLoadingPromptLocale(), g_setLoadingPromptText()
Change mobile/tablet/desktop scalec3project/scripts/gui.jsGUI_SCALE.profiles, g_setSymbolsScaleProfile()
Tune Big Win pacingc3project/scripts/bigwin.jsBIGWIN_FX.stageMs, maxTotalMs, endDelayMs, thresholds
Tune payline highlight cycle speedc3project/scripts/result.jsRESULT_FX.linePhaseMs

Quick Examples (Copy/Paste Style)

1) Wider symbol spacing + slightly larger symbols (c3project/scripts/mechanics.js)

const CONFIG = {
  startX: 320,
  startY: 55,
  hSpacing: 170,   // was 160
  vSpacing: 170,   // was 160
  symbolSize: 156, // was 150
  ...
};

2) Faster normal spin but controlled turbo (c3project/scripts/mechanics.js)

const MAX_SPEED = 3600;             // faster reel speed
const ACCEL_MS = 60;                // faster acceleration
const NORMAL_COL_DELAY = 80;        // shorter column stagger
const TURBO_MIN_LOOP_SPEED = 4600;  // turbo still clearly faster than normal

3) Re-theme HUD to blue (c3project/scripts/betoption.js in #slot-hud style variables)

--slot-accent:#38bdf8;
--slot-accent-strong:#0284c7;
--slot-panel-border:rgba(56,189,248,.45);
--slot-panel-tile-border:rgba(56,189,248,.35);

4) Runtime theme override without editing CSS block (call from your integration script)

const hud = document.getElementById("slot-hud");
if (hud) {
  hud.style.setProperty("--slot-accent", "#22c55e");
  hud.style.setProperty("--slot-accent-strong", "#15803d");
  globalThis.g_refreshResultFxTheme?.(); // sync payline/result accent
}

5) Change default bet/autoplay options (c3project/scripts/betoption.js)

betOptions: [0.1, 0.2, 0.5, 1, 2, 5, 10, 20],
autoOptions: ["inf", 25, 50, 100, 250],

6) Change free-spin trigger rule (c3project/scripts/mechanics.js)

const SCATTER_THRESHOLD = 3;   // trigger at 3 scatters
const SCATTER_FREE_SPINS = 12; // award 12 free spins

7) Loading prompt language by URL (already supported)

?lang=en&social=false
?lang=vi&social=false
?lang=de&social=true

Or force at runtime:

globalThis.g_setLoadingPromptLocale?.("ja");
globalThis.g_setLoadingPromptText?.("Touch to Start");

c3project/scripts/mechanics.js (Core Math + Reel Runtime)

VariableWhat It Controls
CONFIGGrid geometry and symbol placement: startX/startY, hSpacing/vSpacing, symbolSize, cols/rows, target layoutName and layerName.
EVAL_ROWSRows used for win evaluation. Default is 3 middle rows in a 5-row runtime grid.
WILD_COLSWhich reels can generate Wild symbols.
WEIGHTS_WITH_WILD, WEIGHTS_NO_WILDSymbol probability weights for each column type. Main RTP/volatility feel tuning point.
PAYLINESFull 20-line payline map (left to right evaluation paths).
PAYOUTMultiplier table per symbol and match count (3/4/5 of a kind).
SCATTER_THRESHOLDMinimum scatter count to trigger free spins.
SCATTER_FREE_SPINSNumber of free spins awarded at trigger.
totalBetDefault initial total bet on startup.
MAX_SPEED, ACCEL_MS, ALIGN_MSSpin acceleration, maximum reel speed, and final alignment timing.
NORMAL_COL_DELAY, NORMAL_MIN_LOOP_SPEEDNormal spin pacing and stagger delay between columns.
TURBO_MIN_LOOP_SPEED, TURBO_PRE_WAIT_MSTurbo spin behavior and stop timing.
REEL_BLUR_EFFECTName of blur effect used while reels are spinning.

Public hooks: g_spin, g_setTotalBet, g_getTotalBet, g_getBetPerLine, g_getFreeSpins, g_addFreeSpins, g_forceFreespin.

c3project/scripts/betoption.js (HUD + Betting + Locale)

VariableWhat It Controls
BET_UI.balanceInitial player balance shown on UI.
BET_UI.betOptionsAllowed bet values in the bet menu.
BET_UI.autoOptionsAutoplay preset counts ("inf" = infinite).
LINE_COUNTLine count used in UI/rule calculations (keep synced with mechanics paylines).
PAYOUT_MULTPayout table shown in info/history UI.
PAYLINES_20Payline order shown in help/history overlays.
BET_I18N_LANGSSupported language codes for query-driven locale selection.
BET_I18N_EN, BET_I18N_VIEmbedded fallback dictionaries when JSON files are unavailable.

Locale behavior: URL params lang/locale and social=true|false select file <lang>.json or sweeps_<lang>.json.

c3project/scripts/gui.js (Responsive + Loading Prompt)

VariableWhat It Controls
GUI_SCALE.modeDevice mode strategy: auto, mobile, ipad, desktop.
GUI_SCALE.layersToScaleWhich Construct layers are scaled responsively.
GUI_SCALE.profilesScale value per device class (mobile/ipad/desktop).
GUI_SCALE.backgroundModeBackground theme state (game or freespin).
LOADING_PROMPT.messageText shown after loading reaches 100%.
resolveLoadingPromptMessage() mapPer-language text translations for "Touch anywhere to continue".

Public hooks: g_setSymbolsScaleMode, g_setSymbolsScaleProfile, g_setScaleLayers, g_setBackgroundMode, g_setLoadingPromptLocale, g_setLoadingPromptText.

c3project/scripts/bigwin.js (Big Win Sequence)

VariableWhat It Controls
BIGWIN_FX.stageMsTime spacing between big-win stage milestones.
BIGWIN_FX.maxTotalMsMaximum total counting duration cap.
BIGWIN_FX.endDelayMsDelay before closing big-win presentation.
BIGWIN_FX.thresholdsMultiplier thresholds that trigger bigwin, megawin, supermegawin, epicwin.

c3project/scripts/result.js (Line FX + Free Spin Flow)

VariableWhat It Controls
RESULT_FX.linePhaseMsDuration of each highlighted payline phase when cycling win lines.
RESULT_FX.accentColorStroke/highlight color used by line rendering layer.

Safe Editing Checklist

  • Keep mechanics.js and betoption.js payout/line tables consistent.
  • After changing symbol weights or payout, test 200+ spins in normal and turbo.
  • After changing responsive scale, verify portrait mobile + desktop wide + tablet.
  • After adding language, add both <lang>.json and sweeps_<lang>.json.
  • After changing HUD accent color variables, call g_refreshResultFxTheme() so line/result FX matches HUD theme.

12. Performance Notes

  • Prefer testing on both desktop and low/mid mobile hardware.
  • Avoid oversized textures beyond required device target.
  • Keep animation overlays and post effects within budget.
  • Re-run QA after any reel timing or animation changes.

13. License & Usage Scope

This item is intended for sale under CodeCanyon Standard Licenses. License terms below summarize the official pages and should be treated as practical guidance for buyers.

Reference: CodeCanyon Standard License (Regular/Extended). Always follow the latest terms on the official license page.

Standard License Selection

License TypeUse CaseCore Rule
RegularEnd product is distributed for free to end users.1 license = 1 single end product (single application).
ExtendedEnd product is sold, licensed, or charged to end users.Still 1 license = 1 single end product (not multi-use).

What Buyers Can Do

  • Create one end product for self or one client.
  • Modify the source code and assets to build a customized final game.
  • Distribute copies of that same end product according to the selected license type.
  • Freelancers/agencies may charge service fees for implementation work for one client.

What Buyers Cannot Do

  • Reuse one purchase for multiple different end products, clients, or separate jobs.
  • Redistribute/resell the source item as stock, template, tool, or source package.
  • Offer this source in “build-your-own / on-demand” systems without separate license per final customized product.
  • Claim ownership of the original source item itself (author retains item ownership).

Seller Notes For Marketplace Compliance

  • State clearly that this package is sold under Envato Standard License terms (Regular/Extended).
  • Do not promise multi-client, developer-wide, or unlimited-project rights from a single purchase.
  • Include a support policy separate from license rights (support is not a license extension).

Package Usage Scope

This package is delivered for practical production use with source code and bundled game graphics as part of one licensed end product.

  • Usable deliverables include game source code and bundled visual content in this package.
  • Support and update obligations are scoped to the delivered source package.
  • For license interpretation, always follow the active CodeCanyon Standard License terms.

14. Support Policy

This support policy is designed for marketplace delivery and follows a clear boundary between bug-fix support and customization requests.

Support Scope

  • Included: bug fixes related to the original delivered source (runtime errors, broken game flow, incorrect documented behavior).
  • Not included: feature development, reskin work, math model redesign, UI restyling, third-party integration, platform migration, or custom game logic changes.
  • Customization requests: available as separate paid work. Contact first to confirm feasibility, quote, and delivery timeline.

Support Window

  • Standard support period is 6 months from the purchase date.
  • Support can be extended by purchasing a support extension on CodeCanyon.
  • After support expiration, new requests are handled only after support renewal or under a separate paid agreement.

Response SLA

  • Primary contact channel: slotgen@gmail.com.
  • Telegram support: @SlotgenSupport.
  • Initial response target: within 1-2 business days (excluding weekends and public holidays).
  • Fix delivery time depends on issue complexity and reproducibility.
  • To speed up handling, include purchase code, game version, browser/device, reproduction steps, and screenshots/video.

Support Workflow

  1. Submit issue details by email.
  2. Issue is validated against delivered source and documentation scope.
  3. If confirmed as a product bug, fix is scheduled and delivered in an update patch.
  4. If request is customization, a separate estimate and timeline is provided.

15. Troubleshooting & FAQ

Common Issues

IssueLikely CauseRecommended Fix
Language does not changeMissing locale file or wrong URL parameter.Verify ?lang=xx / ?locale=xx and confirm file exists in c3project/scripts/locales/betoption/.
Social wording not appliedsocial query flag not passed.Load with ?social=true and provide matching sweeps_<lang>.json file.
Payline color not matching HUD themeResult FX accent cache not refreshed.After changing HUD accent CSS vars, call globalThis.g_refreshResultFxTheme?.().
Text/UI too small on mobileResponsive profiles not tuned for target viewport.Adjust GUI_SCALE.profiles.mobile or set runtime scale via g_setSymbolsScaleProfile("mobile", value).
Spin feels too slow/fastTiming constants mismatch.Tune MAX_SPEED, ACCEL_MS, NORMAL_COL_DELAY, then re-test normal and turbo.
Free spin flow not as expectedTrigger thresholds modified without rebalancing.Review SCATTER_THRESHOLD, SCATTER_FREE_SPINS, and run regression tests for trigger/retrigger/end state.

Buyer FAQ

  • Can I use one purchase for multiple games? No. One CodeCanyon license covers one end product.
  • Can I request custom features under support? Default support covers bug fixes only; customization is separate paid work.
  • Where to change betting limits quickly? Edit BET_UI.betOptions in c3project/scripts/betoption.js.
  • Where to change symbol math? Use WEIGHTS_* and PAYOUT in c3project/scripts/mechanics.js.
  • How to switch language from integration? Pass lang/locale in URL or provide your own locale JSON files.

16. Changelog

## v1.1.0 (2026-03-11)
- Expanded buyer documentation with JS setup guide and practical tuning examples.
- Added social-mode terminology compliance section.
- Added language support reference with standard and sweeps locale strategy.
- Updated support policy and CodeCanyon Standard License guidance.
- Added troubleshooting/FAQ workflow.

## v1.0.0 (Initial Release)
- Initial game source package (Construct 3 project + runtime scripts).
- Core slot flow: spin, turbo, paylines, free spins, and big win stages.
- Responsive UI and loading flow with multilingual support foundation.