Skip to content

Commit

Permalink
feat: new char - telegramo (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmbanan666 authored Dec 13, 2024
1 parent 308bd17 commit fd130de
Show file tree
Hide file tree
Showing 18 changed files with 246 additions and 1 deletion.
Binary file added apps/telegram-game/public/units/telegramo/128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions apps/telegram-game/public/units/telegramo/idle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"frames": {
"0": {
"frame": { "x": 0, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"1": {
"frame": { "x": 32, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"2": {
"frame": { "x": 64, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"3": {
"frame": { "x": 96, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
}
},
"meta": {
"image": "idle.png",
"format": "RGBA8888",
"size": { "w": 128, "h": 32 },
"scale": "1"
},
"animations": {
"main": [0, 1, 2, 3]
}
}
Binary file added apps/telegram-game/public/units/telegramo/idle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
77 changes: 77 additions & 0 deletions apps/telegram-game/public/units/telegramo/moving.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"frames": {
"0": {
"frame": { "x": 0, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"1": {
"frame": { "x": 32, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"2": {
"frame": { "x": 64, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"3": {
"frame": { "x": 96, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"4": {
"frame": { "x": 128, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"5": {
"frame": { "x": 160, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"6": {
"frame": { "x": 192, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"7": {
"frame": { "x": 224, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
}
},
"meta": {
"image": "moving.png",
"format": "RGBA8888",
"size": { "w": 256, "h": 32 },
"scale": "1"
},
"animations": {
"main": [0, 1, 2, 3, 4, 5, 6, 7]
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/website/app/components/MainLogo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const characters = [
'twitchy',
'wooly',
'pup',
'telegramo',
]
const randomChar = characters[Math.floor(Math.random() * characters.length)]
const randomCharImage = `/units/${randomChar}/128.png`
Expand Down
Binary file added apps/website/public/units/telegramo/128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/website/public/units/telegramo/idle.aseprite
Binary file not shown.
Binary file added apps/website/public/units/telegramo/idle.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions apps/website/public/units/telegramo/idle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"frames": {
"0": {
"frame": { "x": 0, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"1": {
"frame": { "x": 32, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"2": {
"frame": { "x": 64, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"3": {
"frame": { "x": 96, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
}
},
"meta": {
"image": "idle.png",
"format": "RGBA8888",
"size": { "w": 128, "h": 32 },
"scale": "1"
},
"animations": {
"main": [0, 1, 2, 3]
}
}
Binary file added apps/website/public/units/telegramo/idle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
77 changes: 77 additions & 0 deletions apps/website/public/units/telegramo/moving.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"frames": {
"0": {
"frame": { "x": 0, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"1": {
"frame": { "x": 32, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"2": {
"frame": { "x": 64, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"3": {
"frame": { "x": 96, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"4": {
"frame": { "x": 128, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"5": {
"frame": { "x": 160, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"6": {
"frame": { "x": 192, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
},
"7": {
"frame": { "x": 224, "y": 0, "w": 32, "h": 32 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
"sourceSize": { "w": 32, "h": 32 },
"duration": 450
}
},
"meta": {
"image": "moving.png",
"format": "RGBA8888",
"size": { "w": 256, "h": 32 },
"scale": "1"
},
"animations": {
"main": [0, 1, 2, 3, 4, 5, 6, 7]
}
}
Binary file added apps/website/public/units/telegramo/moving.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/game/src/lib/objects/unit/unitObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class UnitObject extends BaseObject implements GameObjectUnit {
}

async initVisual(character?: CharacterEditionWithCharacter): Promise<void> {
const codename = character?.character.codename ?? 'twitchy'
const codename = character?.character.codename ?? 'telegramo'

const idle = await Assets.load(`/units/${codename}/idle.json`)
const idleSprite = new AnimatedSprite(idle.animations.main)
Expand Down

0 comments on commit fd130de

Please sign in to comment.