C .
ODE
G
AMELET
person_outline
Sign In
Name
Haskasu
Email
Link
https://haskasu.com
work
His Projects
add_circle_output
Project
image
His Resources
videogame_asset
His Builds
language
Search Others
search
visibility
code
PRIVATE
info_outline
# TwilightWarsLib A Top-down view shooting game framework. ## Getting Started These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. To start a .event ```typescript CG.TwilightWarsLib.initialize() .then(() => { CG.TwilightWarsLib.events.startEvents('test/test.events', 'arena'); }) ``` To manually setup the game: ```typescript CG.TwilightWarsLib.initialize() .then(() => let mapSource = 'test/test.twmap'; CG.Base.resourceManager.addAppSource(mapSource); CG.Base.resourceManager.load(() => { let mapResource = new CG.TWMap.resources.MapResource(); mapResource.importBase64(CG.Base.resourceManager.getText(mapSource)); mapResource.loadTextures(() => { CG.Base.pixi.initialize(600, 500); let game = new CG.TwilightWarsLib.games.Game(); CG.Base.pixi.root.addChild(game); game.initResources(mapResource); game.start(); console.log('tw game created'); let me = new CG.TwilightWarsLib.games.actors.Actor(game, 'me'); game.addActor(me, new MyActorController(me), 32, 100, 0, null); game.gameCamera.setFocus(me); game.interface.setMe(me); let ai = new CG.TwilightWarsLib.games.actors.Actor(game, 'ai'); ai.camp = CG.TwilightWarsLib.games.datas.Camp.CAMP2; ai.actorClip.headClip.clip.gotoAndStop(5); game.addActor(ai, new CG.TwilightWarsLib.games.actors.controllers.AIController(ai), 160, 300, 0, null); game.createStuff(null, 64 + 16, 128 + 16, CG.TwilightWarsLib.games.items.StuffInfo.getByCode('sword'), game.stuffManager.useNextStuffId(), true); }); }); }) ``` ## Versioning We use [SemVer](http://semver.org/) for versioning. ## Authors * **[Haskasu](/profile/Haskasu)** ## Acknowledgments * Hat tip to anyone who's code was used * Inspiration * etc
TwilightWarsLib
Haskasu
visibility
code
OPEN
info_outline
# TwilightWarsEvents 使用光暈戰記的遊戲引擎 + 同人陣的任務制作 = TwilightWarsEvents ## Getting Started ```typescript // app.ts export class App { constructor() { CG.TwilightWarsLib.initialize() .then(() => { CG.TwilightWarsLib.events.startEvents('CG.projectCode/your_mission.events') }); } } export const APP = new App(); ``` ## Authors **[Haskasu](/profile/Haskasu)**
TwilightWarsEvents
Haskasu
visibility
play_arrow
PLAY
code
PRIVATE
info_outline
# TWRoleCgEditor One Paragraph of project description goes here ## Getting Started (For a game project) Write some tips or instructions how to control in your game. (For building a module) Write a piece of codes to demostrate how to use this module. ```typescript function examples() { } ``` ## Authors **[Haskasu](/profile/Haskasu)**
TWRoleCgEditor
Haskasu
visibility
play_arrow
PLAY
code
PRIVATE
info_outline
# 光暈地圖編輯器 創造/編輯你自己的光暈地圖。
TWMapCgEditor
Haskasu
visibility
code
OPEN
info_outline
# ReactMaterial React components that implement Google's Material Design. Integrated with Code.Gamelet. ## Getting Started ### Usage Open a pre-defined dialog: ```typescript // Alert Dialog CG.ReactMaterial.dialogs.openAlertDialog({ title: 'Alert!!!', message: 'Something is happening.', onClose: () => { console.log('dialog is closed'); }; // Confirm Dialog CG.ReactMaterial.dialogs.openConfirmDialog({ title: 'Delete File', message: 'Are you sure?', onConfirm: () => { console.log('user confirmed'); }; // Input Dialog CG.ReactMaterial.dialogs.openInputDialog({ title: 'What\'s your name?', message: 'Your name will be shown in the highscore board.', onConfirm: (value: string) => { console.log('name = ' + value); }; ``` To write your own React element: ```typescript CG.React.renderElement( <div> <materialUI.TextField id="name" label="Name" margin="normal" /> <materialUI.Button variant="contained" color="primary" size="small" className={classes.button}> Send <materialUI.Icon>send</materialUI.Icon> </materialUI.Button> </div> ); ``` ## Versioning We use [SemVer](http://semver.org/) for versioning. ## Authors **[Haskasu](/profile/Haskasu)**
ReactMaterial
Haskasu
visibility
play_arrow
PLAY
code
OPEN
info_outline
# 蛇來也! (snake crossing) 在無邊無際的深海之中,海蛇們正養精蓄銳,準備在這一屆海底武鬥大會中力剋群蛇,成為新一代的藍海霸主。 玩家們的目標就是努力地吃,讓自己的身體變長。 深海之中有許多生物可以吃,不過要小心美味的河豚有時會鼓脹生刺,把有刺的河豚吃下去可是會中毒的喔! 此外最重要的一點就是千萬不可咬到自己的身體。 海底的貝殼打開時,可能會出現珍珠,如果蛇的身體被吃光成為小蝌蚪時,就記得快去吃珍珠才能變回蛇的形態。 貝殼中偶爾會出現的龍珠,可以讓海蛇成為海底龍王,不但速度提升,連躲在殼裏的寄居蟹也能一口吃掉。 ## 遊戲的原始碼 蛇來也!開放原始碼給同學們參考,不過小哈不習慣寫註解,所以這裏提供一個看原始碼的指南,幫助同學快速進入狀況。 [原始碼地圖指南](cg://source/CG.snakecrossing/SOURCECODE_GUIDE.md)
蛇來也!
Haskasu
visibility
code
PRIVATE
info_outline
# TWLibLib 因為TwilightWarsLib太大了。為了方便開發,將一些不常變更的模組移至這個地方,再包回去TwilightWarsLib。 請開發者只匯入TwilightWarsLib或TwilightWarsEvents,不要匯入這個模組。 ## 作者 **[Haskasu](/profile/113321052805704333314@google)**
TWLibLib
Haskasu
visibility
code
OPEN
info_outline
# CG Server This library gives apps the tools to access the powerful game server that provided by code.gamelet.com. The server provides the abilities listed below: 1. Player managements including login, profile, password etc. 1. A database that can do score leaderboard, individual player status, and more. 1. Multiplayer online connections (powered by socket.io). ## GLT Server A Database server. <a href="cg://source/CG.Server/GLT_README.md" class="mat-raised-button mat-primary">GLT Server Readme</a> ## MSG Server A realtime socket server. <a href="cg://source/CG.Server/MSG_README.md" class="mat-raised-button mat-primary">MSG Server Readme</a> ## Authors **[Haskasu](/profile/Haskasu)**
Server
Haskasu
visibility
code
OPEN
info_outline
# CG Server This library gives apps the tools to access the powerful game server that provided by code.gamelet.com. The server provides the abilities listed below: 1. Player managements including login, profile, password etc. 1. A database that can do score leaderboard, individual player status, and more. 1. Multiplayer online connections (powered by socket.io). ## GLT Server A Database server. <a href="cg://source/CG.Server/GLT_README.md" class="mat-raised-button mat-primary">GLT Server Readme</a> ## MSG Server A realtime socket server. <a href="cg://source/CG.Server/MSG_README.md" class="mat-raised-button mat-primary">MSG Server Readme</a> ## Authors **[Haskasu](/profile/Haskasu)**
Server
Haskasu
visibility
play_arrow
PLAY
code
PRIVATE
info_outline
# TWRoleCgEditor One Paragraph of project description goes here ## Getting Started (For a game project) Write some tips or instructions how to control in your game. (For building a module) Write a piece of codes to demostrate how to use this module. ```typescript function examples() { } ``` ## Authors **[Haskasu](/profile/Haskasu)**
TWRoleCgEditor
Haskasu
visibility
code
PRIVATE
info_outline
# GLT One Paragraph of the game description goes here ## Getting Started ### Auth (Login) ```typescript // All action must wait until auth system is ready. CG.GLT.auth.onReady(user => { if(user.isLocalGuest()) { // not login yet } else { // logged in user } }); // auth event listener, triggered when auth user changed let authListener = CG.GLT.auth.onAuth(user => { if(user.isLocalGuest()) { // logged out } else { // logged in user } }); // auth event listener, triggered when validating a new auth action // a following onAuth event is expected. this.validatingListener = onAuthValidating(() => { // show loading animation }); ``` ### API The CG.GLT.api is responsible to communicate with glt.gamelet.online. CG.GLT.commands includes all comments to query/submit data from glt.gamelet.online. The commands has a function submit() that uses CG.GLT.api.submitCommand(), so most of the time, you don't need to call the api to submit. ```typescript CG.GLT.commands.scoreService.submitScore( 'challenge', // the name of the score to submit 10, // the score SubmitType.KEEP_HIGHEST, // submit only when the new score is greater than the one on server TimeRange.ALL // submit to all time-ranges (history and weekly) ) .submit(); // to receive the weekly high score list CG.GLT.commands.scoreService.listScores( 'challenge', // the name of the scores to get TimeRange.WEEKLY, // in which time range OrderType.HIGH_TO_LOW, // how to order the scores CG.GLT.api.lastUpdatedServerTimestamp, // tell the server which week to see 0, // start index 10, // how many to get (list: UserScoreList) => { // do something with the scorelist }, (error) => { // deal with error } ) ``` ## Authors **[Haskasu](/profile/113321052805704333314@google)**
GLT
Haskasu
visibility
play_arrow
PLAY
code
PRIVATE
info_outline
# TWRoleCgEditor One Paragraph of project description goes here ## Getting Started (For a game project) Write some tips or instructions how to control in your game. (For building a module) Write a piece of codes to demostrate how to use this module. ```typescript function examples() { } ``` ## Authors **[Haskasu](/profile/Haskasu)**
TWRoleCgEditor
Haskasu
visibility
play_arrow
PLAY
code
OPEN
info_outline
# TrackballGamepadTest One Paragraph of project description goes here ## Getting Started (For a game project) Write some tips or instructions how to control in your game. (For building a module) Write a piece of codes to demostrate how to use this module. ```typescript function examples() { } ``` ## Authors **[Haskasu](/profile/Haskasu)**
TrackballGamepadTest
Haskasu
visibility
code
PRIVATE
info_outline
# TWLibLib 因為TwilightWarsLib太大了。為了方便開發,將一些不常變更的模組移至這個地方,再包回去TwilightWarsLib。 請開發者只匯入TwilightWarsLib或TwilightWarsEvents,不要匯入這個模組。 ## 作者 **[Haskasu](/profile/113321052805704333314@google)**
TWLibLib
Haskasu
visibility
code
OPEN
info_outline
# TwilightWarsEvents 使用光暈戰記的遊戲引擎 + 同人陣的任務制作 = TwilightWarsEvents ## Getting Started ```typescript // app.ts export class App { constructor() { CG.TwilightWarsLib.initialize() .then(() => { CG.TwilightWarsLib.events.startEvents('CG.projectCode/your_mission.events') }); } } export const APP = new App(); ``` ## Authors **[Haskasu](/profile/Haskasu)**
TwilightWarsEvents
Haskasu
visibility
play_arrow
PLAY
code
PRIVATE
info_outline
### 光暈戰記 在無數場戰鬥中交織而生的光暈世界中化身浩劫後的戰士,選擇陣營、堅定信念,和伙伴們並肩作戰,在戰場上留下鮮血與榮耀。 ### 遊戲特色 光暈戰記是個多人連線的射擊戰鬥遊戲,戰鬥分成兩個陣營-「皇家騎士團」與「天影十字軍」,只要殺倒敵人就能增加陣營的聲望,請小心不要砍倒戰友,否則聲望會降低。 如果不想效忠某個陣營,也可以選擇「成為第三勢力」,在戰場上殺光所有敵人來增加你第三勢力的個人聲望。特別注意一點,即使其他玩家選擇成為第三勢力,他們也全都算是敵人,第三勢力是沒有隊友的! ### Beta版說明 * 目前Beta公測中,在遊戲專屬討論區出現之前,有任何問題請前往[CG的專案討論區](https://code.gamelet.com/discuss/p/TwilightWars)。 * 商店武器的價格未來仍會調整。 * 新武器和道具不定時新增中...
光暈戰記
Haskasu
visibility
code
PRIVATE
info_outline
# TwilightWarsLib A Top-down view shooting game framework. ## Getting Started These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. To start a .event ```typescript CG.TwilightWarsLib.initialize() .then(() => { CG.TwilightWarsLib.events.startEvents('test/test.events', 'arena'); }) ``` To manually setup the game: ```typescript CG.TwilightWarsLib.initialize() .then(() => let mapSource = 'test/test.twmap'; CG.Base.resourceManager.addAppSource(mapSource); CG.Base.resourceManager.load(() => { let mapResource = new CG.TWMap.resources.MapResource(); mapResource.importBase64(CG.Base.resourceManager.getText(mapSource)); mapResource.loadTextures(() => { CG.Base.pixi.initialize(600, 500); let game = new CG.TwilightWarsLib.games.Game(); CG.Base.pixi.root.addChild(game); game.initResources(mapResource); game.start(); console.log('tw game created'); let me = new CG.TwilightWarsLib.games.actors.Actor(game, 'me'); game.addActor(me, new MyActorController(me), 32, 100, 0, null); game.gameCamera.setFocus(me); game.interface.setMe(me); let ai = new CG.TwilightWarsLib.games.actors.Actor(game, 'ai'); ai.camp = CG.TwilightWarsLib.games.datas.Camp.CAMP2; ai.actorClip.headClip.clip.gotoAndStop(5); game.addActor(ai, new CG.TwilightWarsLib.games.actors.controllers.AIController(ai), 160, 300, 0, null); game.createStuff(null, 64 + 16, 128 + 16, CG.TwilightWarsLib.games.items.StuffInfo.getByCode('sword'), game.stuffManager.useNextStuffId(), true); }); }); }) ``` ## Versioning We use [SemVer](http://semver.org/) for versioning. ## Authors * **[Haskasu](/profile/Haskasu)** ## Acknowledgments * Hat tip to anyone who's code was used * Inspiration * etc
TwilightWarsLib
Haskasu
visibility
play_arrow
PLAY
code
PRIVATE
info_outline
# petcrossing 嘎姆擂台的眾家主角們一起現身寵物連連看的世界。大家準備好了嗎?讓我們一起進去幫同樣的寵物配對在一塊。 規則是要把兩個兩個相同的寵物配對,而要消掉的寵物之間,最多只能轉兩個彎。 遊戲中會從四周的冰軌道不斷滑進被冰凍的寵物方塊,這些移動的寵物方塊會切斷正在相連中的配對,直到方塊到達定位才會解凍。如果冰凍方塊進不來解凍區,就會積在軌道上,任一個軌道積滿了冰凍方塊,就GameOver了。 遊戲區域中的空格上會不時出現各種道具寶物,只要配對連線時經過就會啟動。道具種類如下: * 寶石/鑽石:可以加分的寶物。 * 加速:增加配對連線的速度。 * 龜速:減緩配對連線的速度。 * 翻牌:所有的方塊中的寵物會暫時消失,考驗你的記憶力。 * 大風吹:所有寵物方塊換位置大搬家。 * 鐵槌:把軌道中的冰凍方塊全部敲碎。
Pet Crossing
Haskasu
visibility
code
PRIVATE
info_outline
# GLT One Paragraph of the game description goes here ## Getting Started ### Auth (Login) ```typescript // All action must wait until auth system is ready. CG.GLT.auth.onReady(user => { if(user.isLocalGuest()) { // not login yet } else { // logged in user } }); // auth event listener, triggered when auth user changed let authListener = CG.GLT.auth.onAuth(user => { if(user.isLocalGuest()) { // logged out } else { // logged in user } }); // auth event listener, triggered when validating a new auth action // a following onAuth event is expected. this.validatingListener = onAuthValidating(() => { // show loading animation }); ``` ### API The CG.GLT.api is responsible to communicate with glt.gamelet.online. CG.GLT.commands includes all comments to query/submit data from glt.gamelet.online. The commands has a function submit() that uses CG.GLT.api.submitCommand(), so most of the time, you don't need to call the api to submit. ```typescript CG.GLT.commands.scoreService.submitScore( 'challenge', // the name of the score to submit 10, // the score SubmitType.KEEP_HIGHEST, // submit only when the new score is greater than the one on server TimeRange.ALL // submit to all time-ranges (history and weekly) ) .submit(); // to receive the weekly high score list CG.GLT.commands.scoreService.listScores( 'challenge', // the name of the scores to get TimeRange.WEEKLY, // in which time range OrderType.HIGH_TO_LOW, // how to order the scores CG.GLT.api.lastUpdatedServerTimestamp, // tell the server which week to see 0, // start index 10, // how many to get (list: UserScoreList) => { // do something with the scorelist }, (error) => { // deal with error } ) ``` ## Authors **[Haskasu](/profile/113321052805704333314@google)**
GLT
Haskasu
visibility
play_arrow
PLAY
code
OPEN
info_outline
# 蛇來也! (snake crossing) 在無邊無際的深海之中,海蛇們正養精蓄銳,準備在這一屆海底武鬥大會中力剋群蛇,成為新一代的藍海霸主。 玩家們的目標就是努力地吃,讓自己的身體變長。 深海之中有許多生物可以吃,不過要小心美味的河豚有時會鼓脹生刺,把有刺的河豚吃下去可是會中毒的喔! 此外最重要的一點就是千萬不可咬到自己的身體。 海底的貝殼打開時,可能會出現珍珠,如果蛇的身體被吃光成為小蝌蚪時,就記得快去吃珍珠才能變回蛇的形態。 貝殼中偶爾會出現的龍珠,可以讓海蛇成為海底龍王,不但速度提升,連躲在殼裏的寄居蟹也能一口吃掉。 ## 遊戲的原始碼 蛇來也!開放原始碼給同學們參考,不過小哈不習慣寫註解,所以這裏提供一個看原始碼的指南,幫助同學快速進入狀況。 [原始碼地圖指南](cg://source/CG.snakecrossing/SOURCECODE_GUIDE.md)
蛇來也!
Haskasu
MORE RESULTS
ⒸCode.Gamelet.com |
Privacy Policy
|
Terms of Service