User prompt
seviyeyi geçtiğimizde seviyeyi geçtin diye bir yazı çıksın ve altındada sonraki seviye yazsın sonraki seviye yazısına tıkladığımızda sonraki seviyeye geçelim bide Kelime bulmaca oyununda oyuncu harfleri tek tek dokunarak değil, parmağını ekranda sürükleyerek bağlamalı. Telefon desenini çizer gibi, harfler sürüklenerek birleşsin ve kelime oluşsun.” ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Please fix the bug: 'Uncaught TypeError: LK.getMusicVolume is not a function' in or related to this line: 'LK.playMusic('backgroundMusic', {' Line Number: 1234
User prompt
kelime bulma sistemini bir yuvarlak şeklinde yap ve harfleri sanki telefon deseni çiziyormuşuz gibi tutup sürükleyelim ve kelimeyi bulalım ve ayrıca oyuna bir arkaplan müziği ekle ayarlar kısmı olsun ve müzikğin sesini ayarlayabilelim ↪💡 Consider importing and using the following plugins: @upit/tween.v1, @upit/storage.v1
User prompt
menüdeki herşey yani kısaca oyundaki her şey ingilizce olsun
User prompt
I want you to generate valid English words inside a longer word. Only use existing English dictionary words, not random syllables or letter combinations. Each word must have a real meaning in English. Do not invent new words and Do not repeat the same word in different levels
User prompt
oyunda 1000 seviye olsun ve her 300 bölümde zorluk seviyesi değişsin arada bir oyuncunun karşısına zor bölümlerde çıksın ve oyun hakkındaki herşey menüdeki hakkında kısmına yazılsın ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
kelime yanlış bilindiğinde kırmızı bir efekt kelimenin üzerinde olsun ve kelime sağa sola 2 saniye hareket etsin doğru bilindiğinde de yeşil bir efekt gelsin ve sağa sola yine 2 saniye hareket etsin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
türkçe dil seçeneğini oyundan kaldır ve artık her kelime başına 5 coin kazanalım ve menüye bir hakkında kısmı ekle buraya oyunun hakkındakileri yaz nasıl oynandığına dair ki oyuncu oyunun nasıl oynandığını bilsin ve her 50 seviyede bir arkaplan ekle genellikle futuristik yerlerin fotoğrafı gibi olsun ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
ingilizce dilini seçtiğimizde oyundaki bütün herşey ingilizce olsun bide türkçeyi seçtiğimizde kelimeleri türkçe alfabesiyle yaz ingilizceyi seçtiğimizde ingilizceyi kullan kelimeyi bulurken bir harfe bastığımızda onu sırayla 1,2,3 kelimenin üst tarafına koysun bir harfe bastğımızda onu ilk sıraya koysun ipucu kullandığımızda kelimenin içindeki harfin doğru yazılışındaki bir harfi üst taraftaki kutucuğa koysun ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
menüdeyken başlata bastığımda kelime bulma yeri gelmiyor bunu düzelt ayrıca menüye dil seçenekleri kısmı ekle ve ordan türkçe veya ingilizceyi seçelim yani oyunu iki dildede oynaya bilelim
User prompt
bir ana sayfa yapalım başlat butonu olsun ve oyuncuyu kaldğı yerden geri başlatsın ayrıca her bir kelime bildiğin 10 para kazansın ve o paralarıda ipucu almak için kullansın ipucu almak için ayrı bir yer yap ve bir ipucu 50 para olsun ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
en kolay seviye en uzun kelime orta seviyede uzun kelimenin içinde 1 kelime ve uzun kelim zor seviyedede uzun kelime ve uzun kelimenin içindeki 3 kelime uzun kelimenin içindeki kelimeleride türk dil kurumuna göre yap
User prompt
kullanılan kelimenin kendisi girilincede doğru sayılsın ve ayrıca kelimenin heceleri değil keliminenin içinden çıkabilecek kelimelerin hepsini girince doğru olup sonraki seviyeye geçilmesi lazım
User prompt
seviye bir bittikten sonra ve göndere basınca seviye 2 ye geçsin
User prompt
harflerin yerleri karıık olsun ve her seviyede 5 kelime olsun ben sana oyun içinde kullanacağın kelimeler bu kodun içerisinde # -*- coding: utf-8 -*- import requests from HTMLParser import HTMLParser import re class PageNumParser(HTMLParser): def handle_data(self, data): if "sayfanın" in data: getContent(int(re.search(r'\d+', data).group())) class wordParser(HTMLParser): def handle_starttag(self, tag, attrs): if tag == "a" and len(attrs) == 1: for attr in attrs: word = re.search(r"kelime=(.*)&cesit", attr[1]) print word.group(1) def getContent(totalPageCount): currentPage = 0 while totalPageCount > currentPage/60: pageURL = "http://tdk.gov.tr/index.php?option=com_yazimkilavuzu&view=yazimkilavuzu&kelime1=z&kategori1=yazim_listeli&ayn1=bas&konts=" + str(currentPage) response = requests.get(pageURL, headers={'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}, timeout=15) wordParser.feed(response.content.split('')[1].split(" ")[0]) currentPage = currentPage + 60 pageNumParser = PageNumParser() wordParser = wordParser() pageURL = "http://tdk.gov.tr/index.php?option=com_yazimkilavuzu&view=yazimkilavuzu&kelime1=z&kategori1=yazim_listeli&ayn1=bas&konts=0" response = requests.get(pageURL, headers={'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}, timeout=15) pageNumParser.feed(response.content.split('')[1].split("")[0])
User prompt
kelimeyi doğru bildiğimizde sonraki seviyeye geçelim ve oyunda 150 seviye olsun
User prompt
oyun tüm ekranı kaplasın ve yapacağımız kelimeyi söylemesin
Code edit (1 edits merged)
Please save this source code
User prompt
Kelime Avı - Harf Ustası
Initial prompt
bir kelime bulma oyunu yapalım harflerle kelime bulalım ismi en uzun kelimenin içinden diğer kelimeleri bulalım ve oyundaki kelimeleri Türk Dil Kurumundan seç ve bu oyunda sonsuz level olsun oyun hiç bitmesin oyuncu zorlandığı zaman bir harf çıkarabilmek için bir ipucu kutusu olsun ama 2 hakkı olsun her 50 levelde bir 1 ipucu kutusu hediyesi verilsin
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var LetterTile = Container.expand(function (letter, index) {
var self = Container.call(this);
var background = self.attachAsset('letterTile', {
anchorX: 0.5,
anchorY: 0.5
});
var letterText = new Text2(letter.toUpperCase(), {
size: 50,
fill: 0x333333
});
letterText.anchor.set(0.5, 0.5);
self.addChild(letterText);
self.letter = letter;
self.index = index;
self.isSelected = false;
self.background = background;
self.letterText = letterText;
self.wasHovered = false; // Track if this tile was hovered during current drag
self.setSelected = function (selected) {
self.isSelected = selected;
if (selected) {
self.background.tint = 0x4CAF50;
// Add glow effect for selected tiles
self.background.scaleX = 1.1;
self.background.scaleY = 1.1;
} else {
self.background.tint = 0xffffff;
self.background.scaleX = 1.0;
self.background.scaleY = 1.0;
}
};
self.down = function (x, y, obj) {
if (gameState === 'playing') {
// Clear previous selection and start new drag sequence
clearSelection();
selectedLetters.push(self);
self.setSelected(true);
updateCurrentWord();
updateSequenceDisplay();
LK.getSound('buttonClick').play();
isDragging = true;
// Reset hover states for all tiles
for (var i = 0; i < letterTiles.length; i++) {
letterTiles[i].wasHovered = false;
}
self.wasHovered = true;
}
};
return self;
});
var WordItem = Container.expand(function (word, points) {
var self = Container.call(this);
var background = self.attachAsset('wordBackground', {
anchorX: 0,
anchorY: 0.5
});
background.alpha = 0.8;
var wordText = new Text2(word.toUpperCase(), {
size: 36,
fill: 0x333333
});
wordText.anchor.set(0, 0.5);
wordText.x = 15;
self.addChild(wordText);
var pointText = new Text2('+' + points, {
size: 30,
fill: 0x4CAF50
});
pointText.anchor.set(1, 0.5);
pointText.x = 580;
self.addChild(pointText);
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0xffffff
});
/****
* Game Code
****/
// Game data and word lists - 1000 levels total with difficulty progression every 300 levels
// Background assets for futuristic themes every 50 levels
var currentLanguage = 'english';
var turkishWordLists = [];
var englishWordLists = [];
var wordLists = [];
// Language strings
var languageStrings = {
turkish: {
title: 'KELİME OYUNU',
start: 'BAŞLAT',
money: 'PARA',
level: 'SEVİYE',
languageSelection: 'DİL SEÇİMİ:',
buyHint: 'İPUCU SATIN AL',
oneHint: '1 İPUCU = 50 PARA',
yourMoney: 'PARAN',
buy: 'SATIN AL',
back: 'GERİ',
send: 'GÖNDER',
clear: 'TEMİZLE',
hint: 'İPUCU',
buyHintShort: 'İPUCU\nAL',
menu: 'MENÜ',
score: 'SKOR',
hintText: 'İPUCU: ',
completedAll: 'TEBRİKLER! TÜM SEVİYELERİ TAMAMLADINIZ!',
bonusHint: '+1 İPUCU BONUS!'
},
english: {
title: 'WORD GAME',
start: 'START',
money: 'COINS',
level: 'LEVEL',
languageSelection: 'LANGUAGE:',
buyHint: 'BUY HINT',
oneHint: '1 HINT = 50 COINS',
yourMoney: 'YOUR COINS',
buy: 'BUY',
back: 'BACK',
send: 'SUBMIT',
clear: 'CLEAR',
hint: 'HINT',
buyHintShort: 'BUY\nHINT',
menu: 'MENU',
score: 'SCORE',
hintText: 'HINTS: ',
completedAll: 'CONGRATULATIONS! ALL LEVELS COMPLETED!',
bonusHint: '+1 HINT BONUS!'
}
};
// Function to get localized string
function getString(key) {
return languageStrings[currentLanguage][key] || key;
}
// Alphabet definitions
var turkishAlphabet = 'ABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZ';
var englishAlphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
function getAlphabet() {
return currentLanguage === 'turkish' ? turkishAlphabet : englishAlphabet;
}
// EASY LEVELS (1-50): Only the main word can be found
var easyWords = ["KALEM", "KITAP", "OKUL", "MASA", "KEDI", "KOPEK", "ELMA", "ARMUT", "SEKER", "EKMEK", "GUNES", "YAGMUR", "KARLI", "SICAK", "SOGUK", "MUTLU", "UZGUN", "HIZLI", "YAVAS", "BUYUK", "KUCUK", "UZUN", "KISA", "GENIS", "DAR", "YENI", "ESKI", "GUZEL", "CIRKIN", "TEMIZ", "KIRLI", "BEYAZ", "SIYAH", "KIRMIZI", "MAVI", "YESIL", "SARI", "PEMBE", "MOR", "TURUNCU", "DOKTOR", "OGRETMEN", "POLIS", "ITFAIYE", "ASCI", "BERBER", "TERZI", "KAPICI", "GARSON", "SOFOR"];
for (var i = 0; i < 50; i++) {
turkishWordLists.push({
word: easyWords[i],
words: []
});
}
// MEDIUM LEVELS (51-100): Main word + 1 sub-word that can be made from the letters
var mediumLevels = [{
word: "PENCERE",
words: ["PEN"]
}, {
word: "TABLETU",
words: ["TAB"]
}, {
word: "KAHVALT",
words: ["KAH"]
}, {
word: "OKUYUCU",
words: ["OKU"]
}, {
word: "YAZILIM",
words: ["YAZ"]
}, {
word: "GELISIM",
words: ["GEL"]
}, {
word: "MUTLULUK",
words: ["MUT"]
}, {
word: "DOSTLUK",
words: ["DOS"]
}, {
word: "KARDESLIK",
words: ["KAR"]
}, {
word: "SEVGILIK",
words: ["SEV"]
}, {
word: "OYUNCAK",
words: ["OYN"]
}, {
word: "KITAPLIK",
words: ["KIT"]
}, {
word: "MASALAR",
words: ["MAS"]
}, {
word: "EVLERDE",
words: ["EV"]
}, {
word: "SEHIRLER",
words: ["SEH"]
}, {
word: "AILELER",
words: ["AIL"]
}, {
word: "ARKADAS",
words: ["ARK"]
}, {
word: "MERHABA",
words: ["MER"]
}, {
word: "GUNAYDIN",
words: ["GUN"]
}, {
word: "TESEKKUR",
words: ["TES"]
}, {
word: "HOSGELDIN",
words: ["HOS"]
}, {
word: "GORUSMEK",
words: ["GOR"]
}, {
word: "HABERLER",
words: ["HAB"]
}, {
word: "GELECEK",
words: ["GEL"]
}, {
word: "ZAMANLAR",
words: ["ZAM"]
}, {
word: "DUNYADA",
words: ["DUN"]
}, {
word: "HAYATTA",
words: ["HAY"]
}, {
word: "BILGILER",
words: ["BIL"]
}, {
word: "DERSLERI",
words: ["DER"]
}, {
word: "OGRETMEN",
words: ["OGR"]
}, {
word: "OKULLAR",
words: ["OKL"]
}, {
word: "EVIMIZDE",
words: ["EVI"]
}, {
word: "AILELERIMIZ",
words: ["AIL"]
}, {
word: "ARKADALAR",
words: ["ARK"]
}, {
word: "DOSTLUK",
words: ["DOS"]
}, {
word: "SEVGILIK",
words: ["SEV"]
}, {
word: "MUTLULUK",
words: ["MUT"]
}, {
word: "KAHVALTI",
words: ["KAH"]
}, {
word: "YEMEKLER",
words: ["YEM"]
}, {
word: "ICECEKLER",
words: ["ICE"]
}, {
word: "MEYVELER",
words: ["MEY"]
}, {
word: "SEBZELER",
words: ["SEB"]
}, {
word: "ETKINLIK",
words: ["ETK"]
}, {
word: "OYUNLAR",
words: ["OYN"]
}, {
word: "SPORCULAR",
words: ["SPO"]
}, {
word: "SANATCI",
words: ["SAN"]
}, {
word: "MUZISYEN",
words: ["MUZ"]
}, {
word: "RESSAMLAR",
words: ["RES"]
}, {
word: "YAZARLAR",
words: ["YAZ"]
}, {
word: "SAIRLER",
words: ["SAI"]
}, {
word: "FILMLER",
words: ["FIL"]
}, {
word: "DIZILER",
words: ["DIZ"]
}];
for (var i = 0; i < 50; i++) {
turkishWordLists.push(mediumLevels[i]);
}
// HARD LEVELS (101-150): Main word + 3 sub-words that can be made from the letters
var hardLevels = [{
word: "BILGISAYAR",
words: ["BIL", "GIS", "AYA"]
}, {
word: "TELEVIZYON",
words: ["TEL", "VIZ", "YON"]
}, {
word: "TELEFON",
words: ["TEL", "FON", "ELF"]
}, {
word: "INTERNET",
words: ["INT", "NET", "TER"]
}, {
word: "BILGILER",
words: ["BIL", "GIL", "LER"]
}, {
word: "PROGRAM",
words: ["PRO", "RAM", "GRA"]
}, {
word: "SISTEMI",
words: ["SIS", "TEM", "EMI"]
}, {
word: "TEKNOLOJI",
words: ["TEK", "NOL", "LOJ"]
}, {
word: "MATEMATIK",
words: ["MAT", "TEM", "TIK"]
}, {
word: "GEOMETRI",
words: ["GEO", "MET", "TRI"]
}, {
word: "COGRAFYA",
words: ["COG", "RAF", "YAF"]
}, {
word: "TARIH",
words: ["TAR", "IH", "HI"]
}, {
word: "EDEBIYAT",
words: ["EDE", "BIY", "YAT"]
}, {
word: "FIZIK",
words: ["FIZ", "ZIK", "IK"]
}, {
word: "KIMYA",
words: ["KIM", "MYA", "YA"]
}, {
word: "BIYOLOJI",
words: ["BIY", "OLO", "LOJ"]
}, {
word: "INGILIZCE",
words: ["ING", "LIZ", "ZCE"]
}, {
word: "FRANSIZCA",
words: ["FRA", "SIZ", "ZCA"]
}, {
word: "ALMANCA",
words: ["ALM", "MAN", "ANC"]
}, {
word: "TURKCE",
words: ["TUR", "KCE", "CE"]
}, {
word: "RESIM",
words: ["RES", "SIM", "IM"]
}, {
word: "MUZIK",
words: ["MUZ", "ZIK", "IK"]
}, {
word: "BEDEN",
words: ["BED", "DEN", "EN"]
}, {
word: "SAGLIK",
words: ["SAG", "LIK", "IK"]
}, {
word: "SPOR",
words: ["SPO", "OR", "R"]
}, {
word: "FUTBOL",
words: ["FUT", "BOL", "OL"]
}, {
word: "BASKETBOL",
words: ["BAS", "KET", "BOL"]
}, {
word: "VOLEYBOL",
words: ["VOL", "EY", "BOL"]
}, {
word: "TENIS",
words: ["TEN", "NIS", "IS"]
}, {
word: "YUZME",
words: ["YUZ", "ZME", "ME"]
}, {
word: "KOSU",
words: ["KOS", "OSU", "SU"]
}, {
word: "BISIKLET",
words: ["BIS", "IK", "LET"]
}, {
word: "OTOMOBIL",
words: ["OTO", "MOB", "BIL"]
}, {
word: "OTOBUS",
words: ["OTO", "BUS", "US"]
}, {
word: "TREN",
words: ["TR", "REN", "EN"]
}, {
word: "UCAK",
words: ["UC", "CAK", "AK"]
}, {
word: "GEMI",
words: ["GEM", "EMI", "MI"]
}, {
word: "BISIKLET",
words: ["BIS", "IK", "LET"]
}, {
word: "MOTOSIKLET",
words: ["MOT", "SIK", "LET"]
}, {
word: "TAKMISI",
words: ["TAK", "MIS", "SI"]
}, {
word: "OYUNCU",
words: ["OY", "YUN", "CU"]
}, {
word: "HAKEM",
words: ["HAK", "KEM", "EM"]
}, {
word: "ANTRENOR",
words: ["ANT", "REN", "NOR"]
}, {
word: "SAYGIN",
words: ["SAY", "YGI", "GIN"]
}, {
word: "BASARI",
words: ["BAS", "SAR", "ARI"]
}, {
word: "GALIBIYET",
words: ["GAL", "IBY", "YET"]
}, {
word: "MAGLUBIYE",
words: ["MAG", "LUB", "BIY"]
}, {
word: "BERABERE",
words: ["BER", "RAB", "ERE"]
}, {
word: "TAKIMLAR",
words: ["TAK", "KIM", "LAR"]
}, {
word: "TURNUVA",
words: ["TUR", "NUV", "VAL"]
}, {
word: "SAMPIYONLUK",
words: ["SAM", "PIY", "LUK"]
}];
for (var i = 0; i < 50; i++) {
turkishWordLists.push(hardLevels[i]);
}
// Generate 1000 English word levels with difficulty progression every 300 levels
// EASY LEVELS (1-300): Only the main word can be found - unique words only
var englishEasyWords = ["APPLE", "BREAD", "CHAIR", "DANCE", "EAGLE", "FIELD", "GRAPE", "HORSE", "ISLAND", "JUICE", "KNIFE", "LIGHT", "MAGIC", "NIGHT", "OCEAN", "PEACE", "QUEEN", "RIVER", "STONE", "TIGER", "UNITY", "VOICE", "WATER", "YOUTH", "ZEBRA", "BEACH", "CANDY", "DREAM", "EARTH", "FLAME", "GIANT", "HONEY", "IMAGE", "JEWEL", "KITE", "LEMON", "MOUSE", "NURSE", "OPERA", "PIANO", "QUIET", "ROBOT", "STORM", "TRAIN", "UNDER", "VALLEY", "WITCH", "XRAY", "YOUNG", "ZIGZAG", "BRIDGE", "CASTLE", "DESERT", "ENGINE", "FOREST", "GARDEN", "HAMMER", "INSECT", "JACKET", "KITTEN", "LADDER", "MARKET", "NEEDLE", "ORANGE", "PARROT", "RABBIT", "SILVER", "TURKEY", "UNCLE", "VIOLET", "WINDOW", "YELLOW", "BARREL", "CANDLE", "DOLPHIN", "EMPEROR", "FINGER", "GOLDEN", "HELMET", "IGLOO", "JUNGLE", "KERNEL", "LIZARD", "MIRROR", "NEPHEW", "OXYGEN", "PEPPER", "QUARTZ", "RAINBOW", "SHADOW", "TEMPLE", "UPWARD", "VELVET", "WIZARD", "XYLEM", "YOGURT", "ZEPHYR", "ARCTIC", "BUTTON", "CIRCLE", "DONKEY", "ELEVEN", "FROZEN", "GUITAR", "HUNTER", "INSANE", "JOYFUL", "KETTLE", "LEGEND", "MONKEY", "NEPHEW", "OFFICE", "POETRY", "QUIVER", "RIDDLE", "SIMPLE", "TIMBER", "UPSIDE", "VECTOR", "WISDOM", "XENIAL", "YONDER", "ZOMBIE", "BUCKET", "COUGAR", "DOLLAR", "EXPERT", "FOLDER", "GLOBAL", "HAMMER", "INDOOR", "JUNGLE", "KERNEL", "LINEAR", "MENTAL", "NORMAL", "ORIENT", "PENCIL", "QUORUM", "RENDER", "SPIRAL", "TOWARD", "UNBIND", "VISUAL", "WINTER", "XENON", "YODEL", "ZONAL", "ABRUPT", "BINARY", "CURSOR", "DEEPLY", "EXOTIC", "FORMAL", "GALAXY", "HYBRID", "IMPACT", "JUNIOR", "KINETIC", "LATERAL", "MANUAL", "NEURAL", "OXYGEN", "POLAR", "QUANTUM", "RANDOM", "STELLAR", "TREMOR", "UPWARD", "VERBAL", "WAIVER", "XERUS", "YEARLY", "ZENITH", "BLAZER", "CIPHER", "DYNAMO", "EQUINE", "FUSION", "GALAXY", "HERALD", "IMPACT", "JUMPER", "KNIGHT", "LINEAR", "MATRIX", "NEXUS", "ORIENT", "PRISM", "QUASAR", "RADIUS", "SECTOR", "TERROR", "UPLINK", "VECTOR", "WHISPER", "XENITH", "YOGIC", "ZIPPER", "BIONIC", "COSMIC", "DOMAIN", "ENIGMA", "FABRIC", "GADGET", "HARBOR", "INFLUX", "JIGSAW", "KERNEL", "LEGION", "MODERN", "NIMBUS", "ORIGIN", "PHOTON", "QUARRY", "REFORM", "SUMMIT", "TENSOR", "ULTIMA", "VERTEX", "WANDER", "XEBEC", "YELLOW", "ZYGOTE", "BEACON", "CHROME", "DEPLOY", "EVOLVE", "FACILE", "GENIUS", "HOLLOW", "INSURE", "JUNGLE", "KINSHIP", "LAUNCH", "MELODY", "NOTION", "OUTPUT", "PLEDGE", "QUARTZ", "RESCUE", "SYMBOL", "TENSOR", "UNIQUE", "VOYAGE", "WARMTH", "XENIAL", "YONDER", "ZODIAC", "BINARY", "COSMIC", "DEEPLY", "ENIGMA", "FABRIC", "GLOBAL", "HELMET", "INFLUX", "JUNGLE", "KINDLE", "LINEAR", "METEOR", "NEURAL", "OPTICS", "PLASMA", "QUORUM", "ROBUST", "SYSTEM", "TENSOR", "UNIQUE", "VECTOR", "WISDOM", "XENIAL", "YOGURT", "ZENITH", "BLAZER", "CIPHER", "DOMAIN", "EVOLVE", "FABRIC", "GOLDEN", "HOLDER", "IMPACT", "JUNGLE", "KERNEL", "LEGEND", "MATRIX", "NOTION", "ORIGIN", "PLASMA", "QUARRY", "RADIUS", "SPIRAL", "TIMBER", "UNIQUE", "VOYAGE", "WISDOM", "XENIAL", "YOGURT", "ZYGOTE"];
// Generate 300 easy levels - each word appears only once
for (var i = 0; i < 300; i++) {
englishWordLists.push({
word: englishEasyWords[i],
words: []
});
}
// MEDIUM LEVELS (301-600): Main word + 1-2 sub-words - ensure sub-words can be made from main word letters
var englishMediumLevels = [{
word: "STREAM",
words: ["TEAM"]
}, {
word: "PLAYER",
words: ["PLAY"]
}, {
word: "MASTER",
words: ["TEAM"]
}, {
word: "WINTER",
words: ["WIN"]
}, {
word: "PLANET",
words: ["PLAN"]
}, {
word: "GARDEN",
words: ["RAGE"]
}, {
word: "LISTEN",
words: ["NEST"]
}, {
word: "DANCER",
words: ["RACE"]
}, {
word: "FRIEND",
words: ["FIRE"]
}, {
word: "MOTHER",
words: ["OTHER"]
}, {
word: "FATHER",
words: ["EARTH"]
}, {
word: "SISTER",
words: ["REST"]
}, {
word: "BROTHER",
words: ["OTHER"]
}, {
word: "TEACHER",
words: ["TEACH"]
}, {
word: "STUDENT",
words: ["NEST"]
}, {
word: "PAINTER",
words: ["PAINT"]
}, {
word: "WRITER",
words: ["WRITE"]
}, {
word: "READER",
words: ["READ"]
}, {
word: "DRIVER",
words: ["DRIVE"]
}, {
word: "SINGER",
words: ["RING"]
}, {
word: "DANCER",
words: ["DANCE"]
}, {
word: "WORKER",
words: ["WORK"]
}, {
word: "HELPER",
words: ["HELP"]
}, {
word: "LEADER",
words: ["LEAD"]
}, {
word: "FINDER",
words: ["FIND"]
}, {
word: "KEEPER",
words: ["KEEP"]
}, {
word: "LOSER",
words: ["LOSE"]
}, {
word: "WINNER",
words: ["WIN"]
}, {
word: "RUNNER",
words: ["RUN"]
}, {
word: "WALKER",
words: ["WALK"]
}, {
word: "TALKER",
words: ["TALK"]
}, {
word: "THINKER",
words: ["THINK"]
}, {
word: "DREAMER",
words: ["DREAM"]
}, {
word: "SLEEPER",
words: ["SLEEP"]
}, {
word: "WATCHER",
words: ["WATCH"]
}, {
word: "LISTENER",
words: ["LISTEN"]
}, {
word: "SPEAKER",
words: ["SPEAK"]
}, {
word: "CREATOR",
words: ["CREATE"]
}, {
word: "BUILDER",
words: ["BUILD"]
}, {
word: "FIGHTER",
words: ["FIGHT"]
}, {
word: "CLIMBER",
words: ["CLIMB"]
}, {
word: "SWIMMER",
words: ["SWIM"]
}, {
word: "JUMPER",
words: ["JUMP"]
}, {
word: "THROWER",
words: ["THROW"]
}, {
word: "CATCHER",
words: ["CATCH"]
}, {
word: "PUSHER",
words: ["PUSH"]
}, {
word: "PULLER",
words: ["PULL"]
}, {
word: "HOLDER",
words: ["HOLD"]
}, {
word: "LIFTER",
words: ["LIFT"]
}, {
word: "MOVER",
words: ["MOVE"]
}, {
word: "SHAKER",
words: ["SHAKE"]
}, {
word: "MAKER",
words: ["MAKE"]
}];
// Extend medium levels to 300 levels
var mediumWords = ["BASKET", "CASTLE", "DANGER", "ELEVEN", "FROZEN", "GROUND", "HEIGHT", "INVITE", "JACKET", "KITCHEN", "LADDER", "MOTHER", "NUMBER", "OBJECT", "PEOPLE", "QUEENS", "RESULT", "SWITCH", "TEMPLE", "UNITED", "VICTOR", "WONDER", "XAVIER", "YELLOW", "ZIPPER", "ANCHOR", "BUTTER", "CORNER", "DOUBLE", "ENERGY", "FINGER", "GOLDEN", "HEALTH", "ISLAND", "JUNGLE", "KNIGHT", "LEGEND", "MONKEY", "NEPHEW", "OYSTER", "PRETTY", "QUARTER", "RESCUE", "SIMPLE", "TURKEY", "URGENT", "VELVET", "WINTER", "XENIAL", "YOGURT"];
for (var i = 51; i < mediumWords.length && i < 300; i++) {
var word = mediumWords[i - 51];
var subword = word.substring(0, 3);
englishMediumLevels.push({
word: word,
words: [subword]
});
}
// Fill remaining slots
for (var i = 0; i < 300; i++) {
var levelData = englishMediumLevels[i % englishMediumLevels.length];
englishWordLists.push({
word: levelData.word,
words: levelData.words.slice()
});
}
// HARD LEVELS (601-900): Main word + 2-4 sub-words
var englishHardLevels = [{
word: "STREAM",
words: ["TEAM", "STEAM", "MASTER"]
}, {
word: "PLAYER",
words: ["PLAY", "LAYER", "REPLAY"]
}, {
word: "GARDEN",
words: ["GRADE", "RANGE", "DANGER"]
}, {
word: "MASTER",
words: ["STEAM", "TEAMS", "STREAM"]
}, {
word: "LISTEN",
words: ["SILENT", "ENLIST", "TINSEL"]
}, {
word: "WONDER",
words: ["DRONE", "OWNER", "DROWN"]
}, {
word: "FRIEND",
words: ["FINDER", "FIRE", "RIDE"]
}, {
word: "MOTHER",
words: ["OTHER", "METRO", "THERMO"]
}, {
word: "FATHER",
words: ["HATER", "HEART", "EARTH"]
}, {
word: "SISTER",
words: ["RESIST", "TREES", "STEER"]
}, {
word: "BROTHER",
words: ["OTHER", "BERTH", "BOTHER"]
}, {
word: "TEACHER",
words: ["CHEATER", "CREATE", "THEATER"]
}, {
word: "STUDENT",
words: ["STUNNED", "DENTS", "TUNED"]
}, {
word: "PAINTER",
words: ["REPAINT", "PARENT", "RETINA"]
}, {
word: "WRITER",
words: ["REWRITE", "TIRE", "WIRE"]
}, {
word: "READER",
words: ["REREAD", "DEAR", "RARE"]
}, {
word: "DRIVER",
words: ["REDRIVE", "RIDE", "RIVER"]
}, {
word: "SINGER",
words: ["RESIGN", "RINGS", "REIGN"]
}, {
word: "DANCER",
words: ["RACED", "CRANE", "NECTAR"]
}, {
word: "WORKER",
words: ["REWORK", "WORK", "WORE"]
}, {
word: "HELPER",
words: ["HELP", "RELPH", "HEEL"]
}, {
word: "LEADER",
words: ["DEALER", "REAL", "LEAD"]
}, {
word: "FINDER",
words: ["FRIEND", "FIND", "FIRE"]
}, {
word: "KEEPER",
words: ["PEEK", "KEEP", "PEER"]
}, {
word: "LOSER",
words: ["ROLES", "LOSE", "SOLE"]
}, {
word: "WINNER",
words: ["INNER", "WIN", "WIRE"]
}, {
word: "RUNNER",
words: ["RUN", "RUNE", "RUER"]
}, {
word: "WALKER",
words: ["WALK", "AWKE", "REAL"]
}, {
word: "TALKER",
words: ["TALK", "REAL", "LATE"]
}, {
word: "THINKER",
words: ["THINK", "INERT", "THEIR"]
}, {
word: "DREAMER",
words: ["DREAM", "REARM", "DERMA"]
}, {
word: "SLEEPER",
words: ["SLEEP", "SPEEL", "PEERS"]
}, {
word: "WATCHER",
words: ["WATCH", "CHEAT", "CRATE"]
}, {
word: "LISTENER",
words: ["LISTEN", "SILENT", "ENLIST"]
}, {
word: "SPEAKER",
words: ["SPEAK", "PEAKS", "SEPAR"]
}, {
word: "CREATOR",
words: ["CREATE", "ACTOR", "TRACER"]
}, {
word: "BUILDER",
words: ["BUILD", "BRIDE", "RULED"]
}, {
word: "FIGHTER",
words: ["FIGHT", "EIGHT", "TIGER"]
}, {
word: "CLIMBER",
words: ["CLIMB", "CRIME", "LIMBER"]
}, {
word: "SWIMMER",
words: ["SWIM", "WIRES", "SWIMS"]
}, {
word: "JUMPER",
words: ["JUMP", "RUMP", "PURE"]
}, {
word: "THROWER",
words: ["THROW", "OTHER", "WHERE"]
}, {
word: "CATCHER",
words: ["CATCH", "CHEAT", "REACH"]
}, {
word: "PUSHER",
words: ["PUSH", "HUES", "SURE"]
}, {
word: "PULLER",
words: ["PULL", "RULE", "LURE"]
}, {
word: "HOLDER",
words: ["HOLD", "RODE", "ROLE"]
}, {
word: "LIFTER",
words: ["LIFT", "TILE", "FELT"]
}, {
word: "MOVER",
words: ["MOVE", "OVER", "ROME"]
}, {
word: "SHAKER",
words: ["SHAKE", "HEARS", "SHARE"]
}, {
word: "MAKER",
words: ["MAKE", "REAM", "MARE"]
}, {
word: "TAKER",
words: ["TAKE", "RATE", "TEAR"]
}, {
word: "GIVER",
words: ["GIVE", "RIVE", "VERI"]
}, {
word: "LOVER",
words: ["LOVE", "OVER", "ROLE"]
}];
// Extend to 300 hard levels
for (var i = 0; i < 300; i++) {
var levelData = englishHardLevels[i % englishHardLevels.length];
englishWordLists.push({
word: levelData.word,
words: levelData.words.slice()
});
}
// EXPERT LEVELS (901-1000): Main word + 3-5 sub-words - most challenging
var englishExpertLevels = [{
word: "STREAM",
words: ["TEAM", "STEAM", "MASTER", "STREAM"]
}, {
word: "PLAYER",
words: ["PLAY", "LAYER", "REPLAY", "PARLEY"]
}, {
word: "GARDEN",
words: ["GRADE", "RANGE", "DANGER", "RANGED"]
}, {
word: "MASTER",
words: ["STEAM", "TEAMS", "STREAM", "TAMERS"]
}, {
word: "LISTEN",
words: ["SILENT", "ENLIST", "TINSEL", "INLETS"]
}, {
word: "WONDER",
words: ["DRONE", "OWNER", "DROWN", "WONDER"]
}, {
word: "FRIEND",
words: ["FINDER", "FIRE", "RIDE", "FRIED"]
}, {
word: "MOTHER",
words: ["OTHER", "METRO", "THERMO", "MOTHER"]
}, {
word: "FATHER",
words: ["HATER", "HEART", "EARTH", "FATHER"]
}, {
word: "SISTER",
words: ["RESIST", "TREES", "STEER", "SISTER"]
}, {
word: "BROTHER",
words: ["OTHER", "BERTH", "BOTHER", "BROTHER"]
}, {
word: "TEACHER",
words: ["CHEATER", "CREATE", "THEATER", "TEACHER"]
}, {
word: "STUDENT",
words: ["STUNNED", "DENTS", "TUNED", "STUDENT"]
}, {
word: "PAINTER",
words: ["REPAINT", "PARENT", "RETINA", "PAINTER"]
}, {
word: "WRITER",
words: ["REWRITE", "TIRE", "WIRE", "WRITER"]
}, {
word: "READER",
words: ["REREAD", "DEAR", "RARE", "READER"]
}, {
word: "DRIVER",
words: ["REDRIVE", "RIDE", "RIVER", "DRIVER"]
}, {
word: "SINGER",
words: ["RESIGN", "RINGS", "REIGN", "SINGER"]
}, {
word: "DANCER",
words: ["RACED", "CRANE", "NECTAR", "DANCER"]
}, {
word: "WORKER",
words: ["REWORK", "WORK", "WORE", "WORKER"]
}, {
word: "HELPER",
words: ["HELP", "RELPH", "HEEL", "HELPER"]
}, {
word: "LEADER",
words: ["DEALER", "REAL", "LEAD", "LEADER"]
}, {
word: "FINDER",
words: ["FRIEND", "FIND", "FIRE", "FINDER"]
}, {
word: "KEEPER",
words: ["PEEK", "KEEP", "PEER", "KEEPER"]
}, {
word: "LOSER",
words: ["ROLES", "LOSE", "SOLE", "LOSER"]
}, {
word: "WINNER",
words: ["INNER", "WIN", "WIRE", "WINNER"]
}, {
word: "RUNNER",
words: ["RUN", "RUNE", "RUER", "RUNNER"]
}, {
word: "WALKER",
words: ["WALK", "AWKE", "REAL", "WALKER"]
}, {
word: "TALKER",
words: ["TALK", "REAL", "LATE", "TALKER"]
}, {
word: "THINKER",
words: ["THINK", "INERT", "THEIR", "THINKER"]
}, {
word: "DREAMER",
words: ["DREAM", "REARM", "DERMA", "DREAMER"]
}, {
word: "SLEEPER",
words: ["SLEEP", "SPEEL", "PEERS", "SLEEPER"]
}, {
word: "WATCHER",
words: ["WATCH", "CHEAT", "CRATE", "WATCHER"]
}, {
word: "LISTENER",
words: ["LISTEN", "SILENT", "ENLIST", "LISTENER"]
}, {
word: "SPEAKER",
words: ["SPEAK", "PEAKS", "SEPAR", "SPEAKER"]
}, {
word: "CREATOR",
words: ["CREATE", "ACTOR", "TRACER", "CREATOR"]
}, {
word: "BUILDER",
words: ["BUILD", "BRIDE", "RULED", "BUILDER"]
}, {
word: "FIGHTER",
words: ["FIGHT", "EIGHT", "TIGER", "FIGHTER"]
}, {
word: "CLIMBER",
words: ["CLIMB", "CRIME", "LIMBER", "CLIMBER"]
}, {
word: "SWIMMER",
words: ["SWIM", "WIRES", "SWIMS", "SWIMMER"]
}, {
word: "JUMPER",
words: ["JUMP", "RUMP", "PURE", "JUMPER"]
}, {
word: "THROWER",
words: ["THROW", "OTHER", "WHERE", "THROWER"]
}, {
word: "CATCHER",
words: ["CATCH", "CHEAT", "REACH", "CATCHER"]
}, {
word: "PUSHER",
words: ["PUSH", "HUES", "SURE", "PUSHER"]
}, {
word: "PULLER",
words: ["PULL", "RULE", "LURE", "PULLER"]
}, {
word: "HOLDER",
words: ["HOLD", "RODE", "ROLE", "HOLDER"]
}, {
word: "LIFTER",
words: ["LIFT", "TILE", "FELT", "LIFTER"]
}, {
word: "MOVER",
words: ["MOVE", "OVER", "ROME", "MOVER"]
}, {
word: "SHAKER",
words: ["SHAKE", "HEARS", "SHARE", "SHAKER"]
}, {
word: "MAKER",
words: ["MAKE", "REAM", "MARE", "MAKER"]
}, {
word: "TAKER",
words: ["TAKE", "RATE", "TEAR", "TAKER"]
}, {
word: "GIVER",
words: ["GIVE", "RIVE", "VERI", "GIVER"]
}, {
word: "LOVER",
words: ["LOVE", "OVER", "ROLE", "LOVER"]
}];
// Extend to 100 expert levels
for (var i = 0; i < 100; i++) {
var levelData = englishExpertLevels[i % englishExpertLevels.length];
englishWordLists.push({
word: levelData.word,
words: levelData.words.slice()
});
}
// Language switching function
function setLanguage(language) {
currentLanguage = language;
storage.currentLanguage = language;
if (language === 'turkish') {
wordLists = turkishWordLists;
} else {
wordLists = englishWordLists;
}
// Reset game to level 1 when switching languages
currentLevel = 0;
storage.currentLevel = 0;
currentWordData = wordLists[currentLevel % wordLists.length];
// Update all UI texts
updateAllUITexts();
}
// Function to update all UI texts based on current language
function updateAllUITexts() {
// Menu texts
titleText.setText(getString('title'));
startButtonText.setText(getString('start'));
menuCoinsText.setText(getString('money') + ': ' + coins);
menuLevelText.setText(getString('level') + ': ' + (currentLevel + 1));
languageText.setText(getString('languageSelection'));
// Buy hint menu texts
buyHintTitleText.setText(getString('buyHint'));
buyHintInfoText.setText(getString('oneHint'));
buyHintCoinsText.setText(getString('yourMoney') + ': ' + coins);
buyHintButtonText.setText(getString('buy'));
backFromBuyButtonText.setText(getString('back'));
// Game UI texts
levelText.setText(getString('level') + ' ' + (currentLevel + 1));
coinsText.setText(getString('money') + ': ' + coins);
scoreText.setText(getString('score') + ': ' + totalScore);
hintText.setText(getString('hintText') + hintCount);
submitText.setText(getString('send'));
clearText.setText(getString('clear'));
hintButtonText.setText(getString('hint'));
buyHintGameText.setText(getString('buyHintShort'));
backToMenuText.setText(getString('menu'));
}
// Set initial language to English
wordLists = englishWordLists;
// Game state
var gameState = 'menu'; // 'menu', 'playing', 'buying'
var currentLevel = storage.currentLevel || 0;
var totalScore = storage.totalScore || 0;
var coins = storage.coins || 0;
var hintCount = storage.hintCount || 2;
var currentWordData = wordLists[currentLevel % wordLists.length];
var foundWords = [];
var selectedLetters = [];
var currentWord = "";
var letterTiles = [];
var foundWordItems = [];
var isDragging = false;
var musicVolume = storage.musicVolume || 0.5;
// Main Menu Elements
var menuContainer = new Container();
game.addChild(menuContainer);
var titleText = new Text2('WORD GAME', {
size: 80,
fill: 0x2196F3
});
titleText.anchor.set(0.5, 0.5);
titleText.x = 1024;
titleText.y = 800;
menuContainer.addChild(titleText);
var startButton = menuContainer.addChild(LK.getAsset('menuButtonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 1200,
scaleX: 1.5,
scaleY: 1.5
}));
var startButtonText = new Text2('START', {
size: 48,
fill: 0xFFFFFF
});
startButtonText.anchor.set(0.5, 0.5);
startButtonText.x = 1024;
startButtonText.y = 1200;
menuContainer.addChild(startButtonText);
var menuCoinsText = new Text2('COINS: ' + coins, {
size: 42,
fill: 0xFFD700
});
menuCoinsText.anchor.set(0.5, 0.5);
menuCoinsText.x = 1024;
menuCoinsText.y = 1000;
menuContainer.addChild(menuCoinsText);
var menuLevelText = new Text2('LEVEL: ' + (currentLevel + 1), {
size: 36,
fill: 0x666666
});
menuLevelText.anchor.set(0.5, 0.5);
menuLevelText.x = 1024;
menuLevelText.y = 1400;
menuContainer.addChild(menuLevelText);
// About button
var aboutButton = menuContainer.addChild(LK.getAsset('buttonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 824,
y: 1550,
scaleX: 1.2,
scaleY: 1.2
}));
var aboutButtonText = new Text2('ABOUT', {
size: 32,
fill: 0xFFFFFF
});
aboutButtonText.anchor.set(0.5, 0.5);
aboutButtonText.x = 824;
aboutButtonText.y = 1550;
menuContainer.addChild(aboutButtonText);
aboutButton.down = function () {
showAboutMenu();
LK.getSound('buttonClick').play();
};
// Settings button
var settingsButton = menuContainer.addChild(LK.getAsset('buttonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 1224,
y: 1550,
scaleX: 1.2,
scaleY: 1.2
}));
var settingsButtonText = new Text2('SETTINGS', {
size: 32,
fill: 0xFFFFFF
});
settingsButtonText.anchor.set(0.5, 0.5);
settingsButtonText.x = 1224;
settingsButtonText.y = 1550;
menuContainer.addChild(settingsButtonText);
settingsButton.down = function () {
showSettingsMenu();
LK.getSound('buttonClick').play();
};
startButton.down = function () {
startGame();
initializeLetterTiles();
LK.getSound('buttonClick').play();
};
// Settings Menu Elements
var settingsContainer = new Container();
settingsContainer.visible = false;
game.addChild(settingsContainer);
var settingsTitleText = new Text2('SETTINGS', {
size: 60,
fill: 0x2196F3
});
settingsTitleText.anchor.set(0.5, 0.5);
settingsTitleText.x = 1024;
settingsTitleText.y = 600;
settingsContainer.addChild(settingsTitleText);
var musicVolumeText = new Text2('MUSIC VOLUME: ' + Math.round(musicVolume * 100) + '%', {
size: 42,
fill: 0x666666
});
musicVolumeText.anchor.set(0.5, 0.5);
musicVolumeText.x = 1024;
musicVolumeText.y = 800;
settingsContainer.addChild(musicVolumeText);
// Volume control buttons
var volumeDownButton = settingsContainer.addChild(LK.getAsset('buttonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 724,
y: 900,
scaleX: 1.0,
scaleY: 1.0
}));
var volumeDownText = new Text2('-', {
size: 36,
fill: 0xFFFFFF
});
volumeDownText.anchor.set(0.5, 0.5);
volumeDownText.x = 724;
volumeDownText.y = 900;
settingsContainer.addChild(volumeDownText);
var volumeUpButton = settingsContainer.addChild(LK.getAsset('buttonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 1324,
y: 900,
scaleX: 1.0,
scaleY: 1.0
}));
var volumeUpText = new Text2('+', {
size: 36,
fill: 0xFFFFFF
});
volumeUpText.anchor.set(0.5, 0.5);
volumeUpText.x = 1324;
volumeUpText.y = 900;
settingsContainer.addChild(volumeUpText);
var backFromSettingsButton = settingsContainer.addChild(LK.getAsset('buttonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 1200,
scaleX: 1.2,
scaleY: 1.2
}));
var backFromSettingsButtonText = new Text2('BACK', {
size: 36,
fill: 0xFFFFFF
});
backFromSettingsButtonText.anchor.set(0.5, 0.5);
backFromSettingsButtonText.x = 1024;
backFromSettingsButtonText.y = 1200;
settingsContainer.addChild(backFromSettingsButtonText);
// Volume control handlers
volumeDownButton.down = function () {
var oldVolume = musicVolume;
musicVolume = Math.max(0, musicVolume - 0.1);
storage.musicVolume = musicVolume;
musicVolumeText.setText('MUSIC VOLUME: ' + Math.round(musicVolume * 100) + '%');
LK.playMusic('backgroundMusic', {
fade: {
start: oldVolume,
end: musicVolume,
duration: 200
}
});
LK.getSound('buttonClick').play();
};
volumeUpButton.down = function () {
var oldVolume = musicVolume;
musicVolume = Math.min(1, musicVolume + 0.1);
storage.musicVolume = musicVolume;
musicVolumeText.setText('MUSIC VOLUME: ' + Math.round(musicVolume * 100) + '%');
LK.playMusic('backgroundMusic', {
fade: {
start: oldVolume,
end: musicVolume,
duration: 200
}
});
LK.getSound('buttonClick').play();
};
backFromSettingsButton.down = function () {
showSettingsMenu(false);
};
// About Menu Elements
var aboutContainer = new Container();
aboutContainer.visible = false;
game.addChild(aboutContainer);
var aboutTitleText = new Text2('HOW TO PLAY', {
size: 60,
fill: 0x2196F3
});
aboutTitleText.anchor.set(0.5, 0.5);
aboutTitleText.x = 1024;
aboutTitleText.y = 400;
aboutContainer.addChild(aboutTitleText);
var aboutText = new Text2('WORD PUZZLE GAME - 1000 LEVELS\n\nHOW TO PLAY:\n• Letters are arranged in a circular pattern\n• Drag from one letter to another to form words\n• Find all possible words to complete each level\n• Each word earns you 5 coins\n• Use hints when stuck (costs 50 coins)\n\nDIFFICULTY PROGRESSION:\n• Levels 1-300: EASY - Find the main word only\n• Levels 301-600: MEDIUM - Find main word + 1-2 sub-words\n• Levels 601-900: HARD - Find main word + 2-4 sub-words\n• Levels 901-1000: EXPERT - Find main word + 3-5 sub-words\n\nFEATURES:\n• Circular letter selection like phone pattern\n• Background music with volume control\n• Futuristic backgrounds every 50 levels\n• Bonus hints at certain milestones\n• Complete all 1000 levels to become a word master!', {
size: 28,
fill: 0x666666
});
aboutText.anchor.set(0.5, 0.5);
aboutText.x = 1024;
aboutText.y = 800;
aboutContainer.addChild(aboutText);
var backFromAboutButton = aboutContainer.addChild(LK.getAsset('buttonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 1200,
scaleX: 1.2,
scaleY: 1.2
}));
var backFromAboutButtonText = new Text2('BACK', {
size: 36,
fill: 0xFFFFFF
});
backFromAboutButtonText.anchor.set(0.5, 0.5);
backFromAboutButtonText.x = 1024;
backFromAboutButtonText.y = 1200;
aboutContainer.addChild(backFromAboutButtonText);
backFromAboutButton.down = function () {
showAboutMenu(false);
};
// Buy Hint Menu Elements
var buyHintContainer = new Container();
buyHintContainer.visible = false;
game.addChild(buyHintContainer);
var buyHintTitleText = new Text2('BUY HINT', {
size: 60,
fill: 0xFF9800
});
buyHintTitleText.anchor.set(0.5, 0.5);
buyHintTitleText.x = 1024;
buyHintTitleText.y = 800;
buyHintContainer.addChild(buyHintTitleText);
var buyHintInfoText = new Text2('1 HINT = 50 COINS', {
size: 42,
fill: 0x666666
});
buyHintInfoText.anchor.set(0.5, 0.5);
buyHintInfoText.x = 1024;
buyHintInfoText.y = 1000;
buyHintContainer.addChild(buyHintInfoText);
var buyHintCoinsText = new Text2('YOUR COINS: ' + coins, {
size: 36,
fill: 0xFFD700
});
buyHintCoinsText.anchor.set(0.5, 0.5);
buyHintCoinsText.x = 1024;
buyHintCoinsText.y = 1100;
buyHintContainer.addChild(buyHintCoinsText);
var buyHintButton = buyHintContainer.addChild(LK.getAsset('buyHintButtonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 824,
y: 1300,
scaleX: 1.2,
scaleY: 1.2
}));
var buyHintButtonText = new Text2('BUY', {
size: 36,
fill: 0xFFFFFF
});
buyHintButtonText.anchor.set(0.5, 0.5);
buyHintButtonText.x = 824;
buyHintButtonText.y = 1300;
buyHintContainer.addChild(buyHintButtonText);
var backFromBuyButton = buyHintContainer.addChild(LK.getAsset('buttonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 1224,
y: 1300,
scaleX: 1.2,
scaleY: 1.2
}));
var backFromBuyButtonText = new Text2('BACK', {
size: 36,
fill: 0xFFFFFF
});
backFromBuyButtonText.anchor.set(0.5, 0.5);
backFromBuyButtonText.x = 1224;
backFromBuyButtonText.y = 1300;
buyHintContainer.addChild(backFromBuyButtonText);
buyHintButton.down = function () {
buyHint();
};
backFromBuyButton.down = function () {
showBuyHintMenu(false);
};
// Game UI Container
var gameContainer = new Container();
gameContainer.visible = false;
game.addChild(gameContainer);
// UI Elements - Scaled for full screen
var levelText = new Text2('LEVEL ' + (currentLevel + 1), {
size: 54,
fill: 0x333333
});
levelText.anchor.set(0.5, 0);
levelText.x = 1024;
levelText.y = 150;
gameContainer.addChild(levelText);
var currentWordDisplay = new Text2('', {
size: 48,
fill: 0x666666
});
currentWordDisplay.anchor.set(0.5, 0.5);
currentWordDisplay.x = 1024;
currentWordDisplay.y = 650;
gameContainer.addChild(currentWordDisplay);
var coinsText = new Text2('COINS: ' + coins, {
size: 36,
fill: 0xFFD700
});
coinsText.anchor.set(1, 0);
coinsText.x = 2000;
coinsText.y = 50;
gameContainer.addChild(coinsText);
var scoreText = new Text2('SCORE: ' + totalScore, {
size: 42,
fill: 0x333333
});
scoreText.anchor.set(1, 0);
scoreText.x = 2000;
scoreText.y = 100;
gameContainer.addChild(scoreText);
var hintText = new Text2('HINTS: ' + hintCount, {
size: 36,
fill: 0xFF9800
});
hintText.anchor.set(0, 0);
hintText.x = 150;
hintText.y = 50;
gameContainer.addChild(hintText);
// Progress bar - Larger and repositioned
var progressBg = gameContainer.addChild(LK.getAsset('progressBg', {
anchorX: 0.5,
anchorY: 0,
x: 1024,
y: 250,
scaleX: 2,
scaleY: 1.5
}));
var progressFill = gameContainer.addChild(LK.getAsset('progressBar', {
anchorX: 0,
anchorY: 0,
x: 624,
y: 250,
scaleX: 0,
scaleY: 1.5
}));
// Submit button - Larger
var submitButton = gameContainer.addChild(LK.getAsset('buttonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 750,
scaleX: 1.5,
scaleY: 1.5
}));
var submitText = new Text2('SUBMIT', {
size: 36,
fill: 0xFFFFFF
});
submitText.anchor.set(0.5, 0.5);
submitText.x = 1024;
submitText.y = 750;
gameContainer.addChild(submitText);
submitButton.down = function (x, y, obj) {
submitWord();
};
// Clear button - Larger and repositioned
var clearButton = gameContainer.addChild(LK.getAsset('buttonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 624,
y: 750,
scaleX: 1.5,
scaleY: 1.5
}));
var clearText = new Text2('CLEAR', {
size: 36,
fill: 0xFFFFFF
});
clearText.anchor.set(0.5, 0.5);
clearText.x = 624;
clearText.y = 750;
gameContainer.addChild(clearText);
clearButton.down = function (x, y, obj) {
clearSelection();
};
// Hint button - Larger and repositioned
var hintButton = gameContainer.addChild(LK.getAsset('hintButtonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 1424,
y: 750,
scaleX: 1.5,
scaleY: 1.5
}));
var hintButtonText = new Text2('HINT', {
size: 30,
fill: 0xFFFFFF
});
hintButtonText.anchor.set(0.5, 0.5);
hintButtonText.x = 1424;
hintButtonText.y = 750;
gameContainer.addChild(hintButtonText);
hintButton.down = function (x, y, obj) {
useHint();
};
// Buy Hint button
var buyHintGameButton = gameContainer.addChild(LK.getAsset('buyHintButtonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 1724,
y: 750,
scaleX: 1.2,
scaleY: 1.2
}));
var buyHintGameText = new Text2('BUY\nHINT', {
size: 24,
fill: 0xFFFFFF
});
buyHintGameText.anchor.set(0.5, 0.5);
buyHintGameText.x = 1724;
buyHintGameText.y = 750;
gameContainer.addChild(buyHintGameText);
buyHintGameButton.down = function () {
showBuyHintMenu(true);
};
// Back to menu button
var backToMenuButton = gameContainer.addChild(LK.getAsset('buttonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 324,
y: 750,
scaleX: 1.2,
scaleY: 1.2
}));
var backToMenuText = new Text2('MENU', {
size: 30,
fill: 0xFFFFFF
});
backToMenuText.anchor.set(0.5, 0.5);
backToMenuText.x = 324;
backToMenuText.y = 750;
gameContainer.addChild(backToMenuText);
backToMenuButton.down = function () {
backToMenu();
};
// Sequence input display container - Shows selected letters in order
var sequenceContainer = new Container();
sequenceContainer.x = 1024;
sequenceContainer.y = 400;
gameContainer.addChild(sequenceContainer);
// Found words container - Repositioned for full screen
var foundWordsContainer = new Container();
foundWordsContainer.x = 100;
foundWordsContainer.y = 900;
gameContainer.addChild(foundWordsContainer);
// Level completion popup container
var levelCompleteContainer = new Container();
levelCompleteContainer.visible = false;
game.addChild(levelCompleteContainer);
// Semi-transparent background overlay
var levelCompleteOverlay = levelCompleteContainer.addChild(LK.getAsset('futuristicBg2', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 1366,
scaleX: 1.0,
scaleY: 1.0
}));
levelCompleteOverlay.alpha = 0.8;
// Level passed text
var levelPassedText = new Text2('LEVEL PASSED!', {
size: 72,
fill: 0x4CAF50
});
levelPassedText.anchor.set(0.5, 0.5);
levelPassedText.x = 1024;
levelPassedText.y = 1200;
levelCompleteContainer.addChild(levelPassedText);
// Next level button
var nextLevelButton = levelCompleteContainer.addChild(LK.getAsset('menuButtonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 1500,
scaleX: 1.5,
scaleY: 1.5
}));
var nextLevelText = new Text2('NEXT LEVEL', {
size: 48,
fill: 0xFFFFFF
});
nextLevelText.anchor.set(0.5, 0.5);
nextLevelText.x = 1024;
nextLevelText.y = 1500;
levelCompleteContainer.addChild(nextLevelText);
nextLevelButton.down = function () {
hideLevelCompletePopup();
loadNextLevel();
LK.getSound('buttonClick').play();
};
// Global variables for sequence display
var sequenceBoxes = [];
var maxSequenceLength = 12; // Maximum word length we expect
// Initialize sequence display boxes
function initializeSequenceDisplay() {
// Clear existing sequence boxes
for (var i = 0; i < sequenceBoxes.length; i++) {
sequenceBoxes[i].destroy();
}
sequenceBoxes = [];
var boxSpacing = 90;
var startX = -((maxSequenceLength - 1) * boxSpacing) / 2;
for (var i = 0; i < maxSequenceLength; i++) {
var box = new Container();
// Background box
var bg = box.attachAsset('letterTile', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 1.2,
scaleY: 1.2
});
bg.alpha = 0.3;
// Letter text
var letterText = new Text2('', {
size: 40,
fill: 0x333333
});
letterText.anchor.set(0.5, 0.5);
box.addChild(letterText);
box.x = startX + i * boxSpacing;
box.letterText = letterText;
box.background = bg;
sequenceBoxes.push(box);
sequenceContainer.addChild(box);
}
}
// Update sequence display
function updateSequenceDisplay() {
for (var i = 0; i < sequenceBoxes.length; i++) {
var box = sequenceBoxes[i];
if (i < selectedLetters.length) {
var letter = selectedLetters[i].letter;
// Use proper alphabet casing
if (currentLanguage === 'turkish') {
letter = letter.toUpperCase();
} else {
letter = letter.toUpperCase();
}
box.letterText.setText(letter);
box.background.alpha = 1.0;
box.background.tint = 0x4CAF50;
} else {
box.letterText.setText('');
box.background.alpha = 0.3;
box.background.tint = 0xffffff;
}
}
}
// Initialize letter tiles
function initializeLetterTiles() {
// Clear existing tiles
for (var i = 0; i < letterTiles.length; i++) {
letterTiles[i].destroy();
}
letterTiles = [];
var letters = currentWordData.word.split('');
// Convert letters to proper alphabet
for (var i = 0; i < letters.length; i++) {
if (currentLanguage === 'turkish') {
letters[i] = letters[i].toUpperCase();
} else {
letters[i] = letters[i].toUpperCase();
}
}
// Shuffle the letters randomly
var shuffledLetters = [];
for (var i = 0; i < letters.length; i++) {
shuffledLetters.push(letters[i]);
}
// Fisher-Yates shuffle algorithm
for (var i = shuffledLetters.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = shuffledLetters[i];
shuffledLetters[i] = shuffledLetters[j];
shuffledLetters[j] = temp;
}
// Arrange letters in a circular pattern
var centerX = 1024;
var centerY = 1200;
var radius = 300;
for (var i = 0; i < shuffledLetters.length; i++) {
var tile = new LetterTile(shuffledLetters[i], i);
// Calculate circular position
var angle = i / shuffledLetters.length * 2 * Math.PI - Math.PI / 2; // Start from top
tile.x = centerX + Math.cos(angle) * radius;
tile.y = centerY + Math.sin(angle) * radius;
tile.scaleX = 1.5;
tile.scaleY = 1.5;
letterTiles.push(tile);
gameContainer.addChild(tile);
}
// Initialize sequence display
initializeSequenceDisplay();
}
// Update current word display
function updateCurrentWord() {
currentWord = '';
for (var i = 0; i < selectedLetters.length; i++) {
currentWord += selectedLetters[i].letter;
}
currentWordDisplay.setText(currentWord.toUpperCase());
}
// Clear letter selection
function clearSelection() {
for (var i = 0; i < selectedLetters.length; i++) {
selectedLetters[i].setSelected(false);
}
selectedLetters = [];
currentWord = '';
currentWordDisplay.setText('');
updateSequenceDisplay();
LK.getSound('buttonClick').play();
}
// Submit word
function submitWord() {
if (currentWord.length < 3) {
LK.effects.flashObject(currentWordDisplay, 0xff0000, 500);
return;
}
var wordLower = currentWord.toLowerCase();
var isValidWord = false;
// Check if word exists in current level's word list OR is the main word itself
for (var i = 0; i < currentWordData.words.length; i++) {
if (currentWordData.words[i].toLowerCase() === wordLower) {
isValidWord = true;
break;
}
}
// Also check if it's the main word itself
if (currentWordData.word.toLowerCase() === wordLower) {
isValidWord = true;
}
// Check if word already found
var alreadyFound = false;
for (var i = 0; i < foundWords.length; i++) {
if (foundWords[i].toLowerCase() === wordLower) {
alreadyFound = true;
break;
}
}
if (isValidWord && !alreadyFound) {
// Word found!
var points = currentWord.length * 10;
var coinReward = 5;
foundWords.push(currentWord);
totalScore += points;
coins += coinReward;
// Add word to found words display
var wordItem = new WordItem(currentWord, points);
wordItem.y = (foundWords.length - 1) * 90;
foundWordsContainer.addChild(wordItem);
// Update UI
scoreText.setText(getString('score') + ': ' + totalScore);
coinsText.setText(getString('money') + ': ' + coins);
storage.coins = coins;
LK.setScore(totalScore);
// Calculate total possible words (including main word)
var totalPossibleWords = currentWordData.words.length + 1;
// Update progress
var progress = foundWords.length / totalPossibleWords;
progressFill.scaleX = progress;
// Play sound and flash green
LK.getSound('wordFound').play();
LK.effects.flashObject(currentWordDisplay, 0x4CAF50, 500);
// Shake animation for correct word - move left and right for 2 seconds
var originalX = currentWordDisplay.x;
tween(currentWordDisplay, {
x: originalX - 20
}, {
duration: 100,
onFinish: function onFinish() {
tween(currentWordDisplay, {
x: originalX + 20
}, {
duration: 200,
onFinish: function onFinish() {
tween(currentWordDisplay, {
x: originalX - 15
}, {
duration: 200,
onFinish: function onFinish() {
tween(currentWordDisplay, {
x: originalX + 15
}, {
duration: 200,
onFinish: function onFinish() {
tween(currentWordDisplay, {
x: originalX - 10
}, {
duration: 200,
onFinish: function onFinish() {
tween(currentWordDisplay, {
x: originalX + 10
}, {
duration: 200,
onFinish: function onFinish() {
tween(currentWordDisplay, {
x: originalX
}, {
duration: 100
});
}
});
}
});
}
});
}
});
}
});
}
});
// Complete level logic based on difficulty progression every 300 levels
var shouldCompleteLevel = false;
if (currentLevel < 300) {
// Easy levels (1-300): complete when main word is found
shouldCompleteLevel = currentWordData.word.toLowerCase() === wordLower;
} else if (currentLevel < 600) {
// Medium levels (301-600): complete when ALL words are found (including main word)
shouldCompleteLevel = foundWords.length >= totalPossibleWords;
} else if (currentLevel < 900) {
// Hard levels (601-900): complete when ALL words are found (including main word)
shouldCompleteLevel = foundWords.length >= totalPossibleWords;
} else {
// Expert levels (901-1000): complete when ALL words are found (including main word)
shouldCompleteLevel = foundWords.length >= totalPossibleWords;
}
if (shouldCompleteLevel) {
completeLevel();
}
clearSelection();
} else if (alreadyFound) {
LK.effects.flashObject(currentWordDisplay, 0xFFEB3B, 500);
clearSelection();
} else {
// Wrong word - red flash and shake effect
LK.effects.flashObject(currentWordDisplay, 0xff0000, 500);
// Shake animation - move left and right for 2 seconds
var originalX = currentWordDisplay.x;
tween(currentWordDisplay, {
x: originalX - 30
}, {
duration: 100,
onFinish: function onFinish() {
tween(currentWordDisplay, {
x: originalX + 30
}, {
duration: 200,
onFinish: function onFinish() {
tween(currentWordDisplay, {
x: originalX - 20
}, {
duration: 200,
onFinish: function onFinish() {
tween(currentWordDisplay, {
x: originalX + 20
}, {
duration: 200,
onFinish: function onFinish() {
tween(currentWordDisplay, {
x: originalX - 10
}, {
duration: 200,
onFinish: function onFinish() {
tween(currentWordDisplay, {
x: originalX + 10
}, {
duration: 200,
onFinish: function onFinish() {
tween(currentWordDisplay, {
x: originalX
}, {
duration: 100
});
}
});
}
});
}
});
}
});
}
});
}
});
clearSelection();
}
}
// Use hint
function useHint() {
if (hintCount <= 0) {
LK.effects.flashObject(hintText, 0xff0000, 500);
return;
}
// Find an unfound word
var unfoundWords = [];
// Check all words in the level
for (var i = 0; i < currentWordData.words.length; i++) {
var word = currentWordData.words[i];
var found = false;
for (var j = 0; j < foundWords.length; j++) {
if (foundWords[j].toLowerCase() === word.toLowerCase()) {
found = true;
break;
}
}
if (!found) {
unfoundWords.push(word);
}
}
// Also check if main word is unfound
var mainWordFound = false;
for (var j = 0; j < foundWords.length; j++) {
if (foundWords[j].toLowerCase() === currentWordData.word.toLowerCase()) {
mainWordFound = true;
break;
}
}
if (!mainWordFound) {
unfoundWords.push(currentWordData.word);
}
if (unfoundWords.length > 0) {
var randomWord = unfoundWords[Math.floor(Math.random() * unfoundWords.length)];
// Clear current selection
clearSelection();
// Find the first letter of the word and select it
var targetLetter = randomWord.charAt(0).toUpperCase();
for (var i = 0; i < letterTiles.length; i++) {
var tile = letterTiles[i];
if (tile.letter.toUpperCase() === targetLetter && !tile.isSelected) {
selectedLetters.push(tile);
tile.setSelected(true);
updateCurrentWord();
updateSequenceDisplay();
break;
}
}
hintCount--;
hintText.setText(getString('hintText') + hintCount);
storage.hintCount = hintCount;
LK.getSound('buttonClick').play();
}
}
// Complete level
function completeLevel() {
currentLevel++;
// Check if game completed (1000 levels)
if (currentLevel >= 1000) {
// Show completion message
var completionText = new Text2(getString('completedAll'), {
size: 48,
fill: 0x4CAF50
});
completionText.anchor.set(0.5, 0.5);
completionText.x = 1024;
completionText.y = 1366;
game.addChild(completionText);
LK.showYouWin();
return;
}
// Change background every 50 levels and bonus hint
if (currentLevel % 50 === 0) {
hintCount++;
updateBackground();
var bonusText = new Text2(getString('bonusHint'), {
size: 54,
fill: 0x4CAF50
});
bonusText.anchor.set(0.5, 0.5);
bonusText.x = 1024;
bonusText.y = 2000;
bonusText.alpha = 0;
game.addChild(bonusText);
tween(bonusText, {
alpha: 1,
y: 1600
}, {
duration: 500
});
tween(bonusText, {
alpha: 0
}, {
duration: 2000,
onFinish: function onFinish() {
bonusText.destroy();
}
});
}
// Save progress
storage.currentLevel = currentLevel;
storage.totalScore = totalScore;
storage.hintCount = hintCount;
LK.getSound('levelComplete').play();
LK.effects.flashScreen(0x4CAF50, 1000);
// Show level completion popup
showLevelCompletePopup();
}
// Load next level
function loadNextLevel() {
currentWordData = wordLists[currentLevel % wordLists.length];
foundWords = [];
selectedLetters = [];
currentWord = '';
// Clear found words display
for (var i = 0; i < foundWordItems.length; i++) {
foundWordItems[i].destroy();
}
foundWordItems = [];
// Clear found words container
for (var i = foundWordsContainer.children.length - 1; i >= 0; i--) {
foundWordsContainer.children[i].destroy();
}
// Update UI
levelText.setText(getString('level') + ' ' + (currentLevel + 1));
currentWordDisplay.setText('');
hintText.setText(getString('hintText') + hintCount);
progressFill.scaleX = 0;
// Reinitialize letter tiles
initializeLetterTiles();
}
// Background management
var currentBackground = null;
function updateBackground() {
if (currentBackground) {
currentBackground.destroy();
}
var bgLevel = Math.floor(currentLevel / 50);
var bgAssetName = 'futuristicBg' + (bgLevel % 3 + 1);
currentBackground = game.addChildAt(LK.getAsset(bgAssetName, {
anchorX: 0,
anchorY: 0,
x: 0,
y: 0
}), 0);
currentBackground.alpha = 0.3; // Semi-transparent so UI remains visible
}
function showAboutMenu(show) {
if (show === undefined) show = true;
if (show) {
gameState = 'about';
menuContainer.visible = false;
aboutContainer.visible = true;
buyHintContainer.visible = false;
gameContainer.visible = false;
settingsContainer.visible = false;
} else {
gameState = 'menu';
menuContainer.visible = true;
aboutContainer.visible = false;
buyHintContainer.visible = false;
gameContainer.visible = false;
settingsContainer.visible = false;
}
}
function showSettingsMenu(show) {
if (show === undefined) show = true;
if (show) {
gameState = 'settings';
menuContainer.visible = false;
aboutContainer.visible = false;
buyHintContainer.visible = false;
gameContainer.visible = false;
settingsContainer.visible = true;
} else {
gameState = 'menu';
menuContainer.visible = true;
aboutContainer.visible = false;
buyHintContainer.visible = false;
gameContainer.visible = false;
settingsContainer.visible = false;
}
}
// Game state management functions
function startGame() {
gameState = 'playing';
menuContainer.visible = false;
gameContainer.visible = true;
buyHintContainer.visible = false;
aboutContainer.visible = false;
settingsContainer.visible = false;
updateBackground(); // Set initial background
// Start background music
LK.playMusic('backgroundMusic', {
fade: {
start: 0,
end: musicVolume,
duration: 1000
}
});
// Update display texts
coinsText.setText(getString('money') + ': ' + coins);
scoreText.setText(getString('score') + ': ' + totalScore);
hintText.setText(getString('hintText') + hintCount);
levelText.setText(getString('level') + ' ' + (currentLevel + 1));
}
function backToMenu() {
gameState = 'menu';
menuContainer.visible = true;
gameContainer.visible = false;
buyHintContainer.visible = false;
aboutContainer.visible = false;
settingsContainer.visible = false;
// Update menu texts
menuCoinsText.setText(getString('money') + ': ' + coins);
menuLevelText.setText(getString('level') + ': ' + (currentLevel + 1));
// Save progress
storage.currentLevel = currentLevel;
storage.totalScore = totalScore;
storage.coins = coins;
storage.hintCount = hintCount;
}
function showLevelCompletePopup() {
levelCompleteContainer.visible = true;
// Animate the popup appearing
levelCompleteContainer.alpha = 0;
levelCompleteContainer.scaleX = 0.5;
levelCompleteContainer.scaleY = 0.5;
tween(levelCompleteContainer, {
alpha: 1,
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 500,
easing: tween.easeOut
});
}
function hideLevelCompletePopup() {
tween(levelCompleteContainer, {
alpha: 0,
scaleX: 0.5,
scaleY: 0.5
}, {
duration: 300,
easing: tween.easeIn,
onFinish: function onFinish() {
levelCompleteContainer.visible = false;
}
});
}
function showBuyHintMenu(show) {
if (show) {
gameState = 'buying';
gameContainer.visible = false;
buyHintContainer.visible = true;
buyHintCoinsText.setText(getString('yourMoney') + ': ' + coins);
} else {
gameState = 'playing';
gameContainer.visible = true;
buyHintContainer.visible = false;
}
}
function buyHint() {
if (coins >= 50) {
coins -= 50;
hintCount++;
storage.coins = coins;
storage.hintCount = hintCount;
// Update displays
buyHintCoinsText.setText(getString('yourMoney') + ': ' + coins);
coinsText.setText(getString('money') + ': ' + coins);
hintText.setText(getString('hintText') + hintCount);
LK.effects.flashObject(buyHintCoinsText, 0x4CAF50, 500);
LK.getSound('buttonClick').play();
} else {
LK.effects.flashObject(buyHintCoinsText, 0xff0000, 500);
}
}
// Initialize first level only if playing
if (gameState === 'playing') {
initializeLetterTiles();
} else {
// Show main menu by default
menuContainer.visible = true;
gameContainer.visible = false;
buyHintContainer.visible = false;
}
// Add mouse/touch move handler for drag selection
game.move = function (x, y, obj) {
if (isDragging && gameState === 'playing') {
// Check if mouse is over any letter tile that hasn't been hovered yet
for (var i = 0; i < letterTiles.length; i++) {
var tile = letterTiles[i];
if (!tile.wasHovered) {
var bounds = tile.getBounds();
// Expand the hit area slightly for better touch experience
var padding = 20;
if (x >= bounds.x - padding && x <= bounds.x + bounds.width + padding && y >= bounds.y - padding && y <= bounds.y + bounds.height + padding) {
// Add this tile to the selection sequence
selectedLetters.push(tile);
tile.setSelected(true);
tile.wasHovered = true; // Mark as hovered to prevent re-selection
updateCurrentWord();
updateSequenceDisplay();
// Visual feedback - slight shake animation
var originalX = tile.x;
var originalY = tile.y;
tween(tile, {
x: originalX + 5,
y: originalY + 5
}, {
duration: 50,
onFinish: function onFinish() {
tween(tile, {
x: originalX,
y: originalY
}, {
duration: 50
});
}
});
break;
}
}
}
}
};
game.up = function (x, y, obj) {
isDragging = false;
};
game.update = function () {
// Only run game logic when playing
if (gameState === 'playing') {
// Game runs continuously
}
}; ===================================================================
--- original.js
+++ change.js
@@ -23,24 +23,37 @@
self.index = index;
self.isSelected = false;
self.background = background;
self.letterText = letterText;
+ self.wasHovered = false; // Track if this tile was hovered during current drag
self.setSelected = function (selected) {
self.isSelected = selected;
if (selected) {
self.background.tint = 0x4CAF50;
+ // Add glow effect for selected tiles
+ self.background.scaleX = 1.1;
+ self.background.scaleY = 1.1;
} else {
self.background.tint = 0xffffff;
+ self.background.scaleX = 1.0;
+ self.background.scaleY = 1.0;
}
};
self.down = function (x, y, obj) {
- if (!self.isSelected) {
+ if (gameState === 'playing') {
+ // Clear previous selection and start new drag sequence
+ clearSelection();
selectedLetters.push(self);
self.setSelected(true);
updateCurrentWord();
updateSequenceDisplay();
LK.getSound('buttonClick').play();
isDragging = true;
+ // Reset hover states for all tiles
+ for (var i = 0; i < letterTiles.length; i++) {
+ letterTiles[i].wasHovered = false;
+ }
+ self.wasHovered = true;
}
};
return self;
});
@@ -77,10 +90,10 @@
/****
* Game Code
****/
-// Background assets for futuristic themes every 50 levels
// Game data and word lists - 1000 levels total with difficulty progression every 300 levels
+// Background assets for futuristic themes every 50 levels
var currentLanguage = 'english';
var turkishWordLists = [];
var englishWordLists = [];
var wordLists = [];
@@ -1514,8 +1527,53 @@
var foundWordsContainer = new Container();
foundWordsContainer.x = 100;
foundWordsContainer.y = 900;
gameContainer.addChild(foundWordsContainer);
+// Level completion popup container
+var levelCompleteContainer = new Container();
+levelCompleteContainer.visible = false;
+game.addChild(levelCompleteContainer);
+// Semi-transparent background overlay
+var levelCompleteOverlay = levelCompleteContainer.addChild(LK.getAsset('futuristicBg2', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 1024,
+ y: 1366,
+ scaleX: 1.0,
+ scaleY: 1.0
+}));
+levelCompleteOverlay.alpha = 0.8;
+// Level passed text
+var levelPassedText = new Text2('LEVEL PASSED!', {
+ size: 72,
+ fill: 0x4CAF50
+});
+levelPassedText.anchor.set(0.5, 0.5);
+levelPassedText.x = 1024;
+levelPassedText.y = 1200;
+levelCompleteContainer.addChild(levelPassedText);
+// Next level button
+var nextLevelButton = levelCompleteContainer.addChild(LK.getAsset('menuButtonBg', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 1024,
+ y: 1500,
+ scaleX: 1.5,
+ scaleY: 1.5
+}));
+var nextLevelText = new Text2('NEXT LEVEL', {
+ size: 48,
+ fill: 0xFFFFFF
+});
+nextLevelText.anchor.set(0.5, 0.5);
+nextLevelText.x = 1024;
+nextLevelText.y = 1500;
+levelCompleteContainer.addChild(nextLevelText);
+nextLevelButton.down = function () {
+ hideLevelCompletePopup();
+ loadNextLevel();
+ LK.getSound('buttonClick').play();
+};
// Global variables for sequence display
var sequenceBoxes = [];
var maxSequenceLength = 12; // Maximum word length we expect
// Initialize sequence display boxes
@@ -1920,12 +1978,10 @@
storage.totalScore = totalScore;
storage.hintCount = hintCount;
LK.getSound('levelComplete').play();
LK.effects.flashScreen(0x4CAF50, 1000);
- // Wait a bit then load next level
- LK.setTimeout(function () {
- loadNextLevel();
- }, 1500);
+ // Show level completion popup
+ showLevelCompletePopup();
}
// Load next level
function loadNextLevel() {
currentWordData = wordLists[currentLevel % wordLists.length];
@@ -2039,8 +2095,36 @@
storage.totalScore = totalScore;
storage.coins = coins;
storage.hintCount = hintCount;
}
+function showLevelCompletePopup() {
+ levelCompleteContainer.visible = true;
+ // Animate the popup appearing
+ levelCompleteContainer.alpha = 0;
+ levelCompleteContainer.scaleX = 0.5;
+ levelCompleteContainer.scaleY = 0.5;
+ tween(levelCompleteContainer, {
+ alpha: 1,
+ scaleX: 1.0,
+ scaleY: 1.0
+ }, {
+ duration: 500,
+ easing: tween.easeOut
+ });
+}
+function hideLevelCompletePopup() {
+ tween(levelCompleteContainer, {
+ alpha: 0,
+ scaleX: 0.5,
+ scaleY: 0.5
+ }, {
+ duration: 300,
+ easing: tween.easeIn,
+ onFinish: function onFinish() {
+ levelCompleteContainer.visible = false;
+ }
+ });
+}
function showBuyHintMenu(show) {
if (show) {
gameState = 'buying';
gameContainer.visible = false;
@@ -2079,18 +2163,39 @@
}
// Add mouse/touch move handler for drag selection
game.move = function (x, y, obj) {
if (isDragging && gameState === 'playing') {
- // Check if mouse is over any unselected letter tile
+ // Check if mouse is over any letter tile that hasn't been hovered yet
for (var i = 0; i < letterTiles.length; i++) {
var tile = letterTiles[i];
- if (!tile.isSelected) {
+ if (!tile.wasHovered) {
var bounds = tile.getBounds();
- if (x >= bounds.x && x <= bounds.x + bounds.width && y >= bounds.y && y <= bounds.y + bounds.height) {
+ // Expand the hit area slightly for better touch experience
+ var padding = 20;
+ if (x >= bounds.x - padding && x <= bounds.x + bounds.width + padding && y >= bounds.y - padding && y <= bounds.y + bounds.height + padding) {
+ // Add this tile to the selection sequence
selectedLetters.push(tile);
tile.setSelected(true);
+ tile.wasHovered = true; // Mark as hovered to prevent re-selection
updateCurrentWord();
updateSequenceDisplay();
+ // Visual feedback - slight shake animation
+ var originalX = tile.x;
+ var originalY = tile.y;
+ tween(tile, {
+ x: originalX + 5,
+ y: originalY + 5
+ }, {
+ duration: 50,
+ onFinish: function onFinish() {
+ tween(tile, {
+ x: originalX,
+ y: originalY
+ }, {
+ duration: 50
+ });
+ }
+ });
break;
}
}
}
In the middle part, there are mountains, in the upper left corner, the sun, a river flowing from the mountain, and a house beside the river. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzerinde hint yazan yeşil bir buton. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzerinde buy hint yazan sarı bir buton. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzerinde about yazan gri bir düğme. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzerinde submit yazan turuncu bir buton. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
bir ayarlar simgesi ve kenarlarını benim için düzelt. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzerinde start yazan yeşil bir buton. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzerinde menu yazan kırmızı bir buton. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzerinde clear yazan bir buton. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzeinde Back yazan kırmızı bir buton . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat