# Look Your Loot aka Hamster

**URL:** <https://forum.defold.com/t/look-your-loot-aka-hamster/10018>\
**Category:** Dev diaries\
**Created:** [July 23, 2017, 7:17pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018 "2017-07-23T19:17:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dragosha](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/dragosha/32/5103_2.png) [@Dragosha](https://forum.defold.com/u/Dragosha)\
**Post date:** [July 23, 2017, 7:17pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/1 "2017-07-23T19:17:37Z")

</div>

Hey,  
once upon a time…  
I asked myself, what I can do, quick, fun and 2d. I had some experience in graphics and some gamedev experience as indie developer from 2009. But second part of my experience burned down along with Flash games portals. After that I was looking for new engine for me, not just framework like AIR Starling and not rocket since like UE. Defold looks like what i’m looking for.

So, Hamster has begun over two month ago as “Defold study project” from the paper prototype:

 ![](https://forum-defold-uploads.b-cdn.net/original/2X/6/66048392e548f5434649b3f9d56a16a9968607fb.jpg)

and set of graphic sketches what I did early year:

 ![](https://forum-defold-uploads.b-cdn.net/original/2X/c/c2c7c4ca3a5e923b5a6f9a933c09bcda492ec6ff.jpg)

 ![](https://forum-defold-uploads.b-cdn.net/original/2X/e/e5bcc8c435b4e36dbb109d9da61a4973dd5b2be0.jpg)

Now the game looks like playable prototype:

 ![](https://forum-defold-uploads.b-cdn.net/original/2X/e/efb73b5590e0f43c519a3064122dd9f1c2d425e2.jpg)

* * *

From first lines of code the project was available at  
**[http://dragosha.com/hamster/](http://dragosha.com/hamster/) as html5 game**  
and this is important thing for indie developer - get feedback on early stage of project.

* * *

Linked posts:

> [@Little Html5 FPS test](https://forum.defold.com/t/little-html5-fps-test/9421):
>
> Just asked in twitter how mutch FPS gets on devices this little card game: [http://dragosha.com/hamster/](http://dragosha.com/hamster/) (click on neighbor cards for playing) And stored people’s answers to :

> [@Camera and aspect ratio](https://forum.defold.com/t/camera-and-aspect-ratio/9450):
>
> If we use the camera and fix they aspect ratio by script or checkbox in the camera properties panel we are having correct camera’s zoom only if screen.width\>screen.height (0:00-0:20) [[Defold. Camera and aspect ratio.] ](https://www.youtube.com/watch?v=O85dwX7oYUg) So we need correct the camera zoom for portrait screens, where screen.width\<screen.height: in video: 0:45-1:10 My code for this (see windowevent function): local campos = vmath.vector3() local nearz = .1 local farz = 2000 local initial\_z = 680 function init(self) …

> [@The label component blink when rotation GO over Y axes (SOLVED)](https://forum.defold.com/t/the-label-component-blink-when-rotation-go-over-y-axes-solved/9311):
>
> Hi, I’m trying to make the card flip effect with perspective camera view and took strange behaviour of labels component. Game Object has the back sprite and several labels with card parameters. The some labels are blinking when GO is rotating. I quess they go behind to the sprite. But the other labels are not blinking. Code of rotate animation: go.set("hero","euler.y",-45) go.animate("hero","euler.y",go.PLAYBACK\_LOOP\_PINGPONG,45,go.EASING\_LINEAR,5) How it looks: [[Defold. Rotation …](https://www.youtube.com/watch?v=wFvEhCUtU4s)

Html template with resizable canvas: [HTML5 build full screen pixelated on HiDPI displays (DEF-2396)(SOLVED) - #5 by def.ent.777](https://forum.defold.com/t/html5-build-full-screen-pixelated-on-hidpi-displays-def-2396/4948/5)

In this topic I’ll post some things like that:

[https://forum-defold-uploads.b-cdn.net/original/2X/0/01f436aeddf7bbf9b38d0625a386326774592959.mp4](https://forum-defold-uploads.b-cdn.net/original/2X/0/01f436aeddf7bbf9b38d0625a386326774592959.mp4)

or that:

 ![](https://forum-defold-uploads.b-cdn.net/original/2X/3/358ca3b477c0d47d094e62eb32bb2568fb02e76e.png)

Overall plans: make complete game with sounds, twists and fun for mobile, web and desktops.

Thanks.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [July 23, 2017, 9:12pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/2 "2017-07-23T21:12:17Z")

</div>

It’s a great game concept! Looking forward to the complete game!

---

<div class="post-metadata">

**Author:** ![Oleg\_The\_Evangelist](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/oleg_the_evangelist/32/1596_2.png) [@Oleg\_The\_Evangelist](https://forum.defold.com/u/Oleg_The_Evangelist)\
**Post date:** [July 24, 2017, 7:50am UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/3 "2017-07-24T07:50:17Z")

</div>

Cheers for the post @Dragosha! What were the main challenges with Defold for you? There should be a love/hate story I guess =] We love to learn from such at Defold.

---

<div class="post-metadata">

**Author:** ![sven](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/sven/32/1086_2.png) [@sven](https://forum.defold.com/u/sven)\
**Post date:** [July 24, 2017, 7:52am UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/4 "2017-07-24T07:52:17Z")

</div>

Love it! I think it would really work great on mobile, maybe with some added metagame/layer. But definitely something I would play. 🙂

---

<div class="post-metadata">

**Author:** ![Dragosha](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/dragosha/32/5103_2.png) [@Dragosha](https://forum.defold.com/u/Dragosha)\
**Post date:** [July 25, 2017, 6:01pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/5 "2017-07-25T18:01:56Z")

</div>

Added Google Analytics through @britzl great lib: [GitHub - britzl/defold-googleanalytics: Google Analytics implementation for the Defold game engine · GitHub](https://github.com/britzl/defold-googleanalytics)  
and found a new game inside the game: which city gets the highest average result in the game 🙂

 ![](https://forum-defold-uploads.b-cdn.net/original/2X/4/40b77f3f2b91e0ccf439dfb098fb45d0e28de841.png)

Play for your city!

Or for your country 🙂

 ![](https://forum-defold-uploads.b-cdn.net/original/2X/8/822eff49ca11be73dd769d631f79bea23a0d3386.png)

---

<div class="post-metadata">

**Author:** ![Dragosha](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/dragosha/32/5103_2.png) [@Dragosha](https://forum.defold.com/u/Dragosha)\
**Post date:** [July 28, 2017, 5:55pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/6 "2017-07-28T17:55:56Z")

</div>

[http://dragosha.com/hamster/](http://dragosha.com/hamster/) **updated to v 0.44**

Added a new card - the trap. It damages the hero when spikes is active and ignoring by hero when trap’s spikes downed. The state of card is changing each turn. The card is ignoring hero’s shield.

 ![](https://forum-defold-uploads.b-cdn.net/original/2X/2/246bbe201b5699a09f6b4f60a1962eea3f022fb6.png)

Added some sounds in game and the music theme for main menu.

Sound specific of Html5 version:

- no sound in iOS (needs for mp3 supports?)
- sounds are crackling in Android Chrome. ( in particular the fireball sound). Main music theme twitches and has a little delay when collections are loading.
- there are some noises in desktop Chrome on Windows 10. Сlacks on scenes switching.

Began working on achievement system.  
In plans: add several ‘rpg’-classes for main hero in addition to the existing (will be Knight). The Mage, Palladin, Golem and Assassin.

–  
cheers

---

<div class="post-metadata">

**Author:** ![Dragosha](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/dragosha/32/5103_2.png) [@Dragosha](https://forum.defold.com/u/Dragosha)\
**Post date:** [August 2, 2017, 2:38pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/7 "2017-08-02T14:38:47Z")

</div>

Working on mage:

[![](https://img.youtube.com/vi/88NTtaRi2mc/maxresdefault.jpg "Look your loot. Work in progress. Drawing and animating the mage") ](https://www.youtube.com/watch?v=88NTtaRi2mc)

0- Photoshop  
8:13 - Spine  
14:30 - Defold + Atom  
15:40 - Result

---

<div class="post-metadata">

**Author:** ![Oleg\_The\_Evangelist](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/oleg_the_evangelist/32/1596_2.png) [@Oleg\_The\_Evangelist](https://forum.defold.com/u/Oleg_The_Evangelist)\
**Post date:** [August 2, 2017, 5:46pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/8 "2017-08-02T17:46:26Z")

</div>

this is so cool! Gonna post it around

---

<div class="post-metadata">

**Author:** ![stephenkalisch](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/stephenkalisch/32/4131_2.png) [@stephenkalisch](https://forum.defold.com/u/stephenkalisch)\
**Post date:** [August 2, 2017, 8:52pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/9 "2017-08-02T20:52:19Z")

</div>

Its so simple - and I love it!

Playing it a lot… But now.. dont know why, did a heavy record I quess 🙂

 ![](https://forum-defold-uploads.b-cdn.net/original/2X/9/942c172784a3af1c946d5492e77bfc596c7b22ea.jpg)

By the way…there is a little bug:  
If there seems the end of moves (your life is lower than the guys around and all other tiles are fadeout/flip to grey) and you pick up a barrel with a health-potion or fireball and you BEAT the opponents you can simply move/turn thru the grey (no enemy or item-card) cards o.O … just the new cards become any item/enemy. 😉

---

<div class="post-metadata">

**Author:** ![Dragosha](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/dragosha/32/5103_2.png) [@Dragosha](https://forum.defold.com/u/Dragosha)\
**Post date:** [August 3, 2017, 1:57pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/10 "2017-08-03T13:57:43Z")

</div>

A bit weird.  
Found what we can’t known sound is playing or not. And there is no callback, message, etc for sound end.  
(DEF-1549)  
So, if we want to play queue of music tracks we need grab their lenghts to table and check it in update().

---

<div class="post-metadata">

**Author:** ![Dragosha](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/dragosha/32/5103_2.png) [@Dragosha](https://forum.defold.com/u/Dragosha)\
**Post date:** [August 3, 2017, 2:06pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/11 "2017-08-03T14:06:11Z")

</div>

> [@stephenkalisch](#):
>
> But now.. dont know why, did a heavy record I quess

very cool! I suppose it’s second result after 13k by guy from Minsk 🙂

> [@stephenkalisch](#):
>
> By the way…there is a little bug:

thanks for a report. I saw it, but not sure to understand where is logical trap in my code ) So I’ll just remove this effect from next version 😵

---

<div class="post-metadata">

**Author:** ![stephenkalisch](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/stephenkalisch/32/4131_2.png) [@stephenkalisch](https://forum.defold.com/u/stephenkalisch)\
**Post date:** [August 3, 2017, 2:45pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/12 "2017-08-03T14:45:23Z")

</div>

@Dragosha  
I quess you check every move for “possible moves” and then call a function which turns the “not movable cards”. If not you may do so. From here I cannot understand where the problem is. Looks like after “turning the cards to impossible” you never check for possible moves.

---

<div class="post-metadata">

**Author:** ![stephenkalisch](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/stephenkalisch/32/4131_2.png) [@stephenkalisch](https://forum.defold.com/u/stephenkalisch)\
**Post date:** [August 5, 2017, 4:53pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/13 "2017-08-05T16:53:00Z")

</div>

hey @Dragosha

Found a small bug. In some cases (cant specify more exactly) at the End-Screen the last tile wont be fade out. See Screenshot:

 ![](https://forum-defold-uploads.b-cdn.net/original/2X/9/9f61d6e5db14f2f5d8470963e84d6d01b3146d5c.png)

---

<div class="post-metadata">

**Author:** ![88.josh](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/88.josh/32/20137_2.png) [@88.josh](https://forum.defold.com/u/88.josh)\
**Post date:** [August 9, 2017, 5:31pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/14 "2017-08-09T17:31:51Z")

</div>

This game is great! So cute! So well thought out! I am enjoying it a lot.

---

<div class="post-metadata">

**Author:** ![Dragosha](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/dragosha/32/5103_2.png) [@Dragosha](https://forum.defold.com/u/Dragosha)\
**Post date:** [August 9, 2017, 5:39pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/15 "2017-08-09T17:39:12Z")

</div>

working on mini game

[https://forum-defold-uploads.b-cdn.net/original/2X/b/bf871aa632747777afed86a55d76d9455b6ea9a6.mp4](https://forum-defold-uploads.b-cdn.net/original/2X/b/bf871aa632747777afed86a55d76d9455b6ea9a6.mp4)

---

<div class="post-metadata">

**Author:** ![Dragosha](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/dragosha/32/5103_2.png) [@Dragosha](https://forum.defold.com/u/Dragosha)\
**Post date:** [August 10, 2017, 3:48pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/16 "2017-08-10T15:48:45Z")

</div>

[http://dragosha.com/hamster/](http://dragosha.com/hamster/) Updated to 4.6  
Added: lock-picklock-unlock mini game (chest after boss defeat). Current difficullty: medium-hard.

 ![](https://forum-defold-uploads.b-cdn.net/original/2X/d/d4ccfc47a47030b8a8bfe8b9ecb7df40cab25f81.png)  
If you open chest - get rare card.  
If not - get fireball to hero.

Added: First ability card - Revive. It falls out from opened chest.

 ![](https://forum-defold-uploads.b-cdn.net/original/2X/f/f5475824473bdde34b36d2c123927f22b0df997c.png)  
Revive returns your hero to board after his death from enemies or traps.

---

<div class="post-metadata">

**Author:** ![stephenkalisch](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/stephenkalisch/32/4131_2.png) [@stephenkalisch](https://forum.defold.com/u/stephenkalisch)\
**Post date:** [August 10, 2017, 5:38pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/17 "2017-08-10T17:38:59Z")

</div>

UUUhhh. Lockpicking. AWESOME!

This game is going more and more damn good card-game! 😍

---

<div class="post-metadata">

**Author:** ![den33.info](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/d/8e7dd6/32.png) [@den33.info](https://forum.defold.com/u/den33.info)\
**Post date:** [August 11, 2017, 7:20pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/18 "2017-08-11T19:20:58Z")

</div>

I loved this game! Keep on making it 🙂

---

<div class="post-metadata">

**Author:** ![stephenkalisch](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/stephenkalisch/32/4131_2.png) [@stephenkalisch](https://forum.defold.com/u/stephenkalisch)\
**Post date:** [August 11, 2017, 7:23pm UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/19 "2017-08-11T19:23:15Z")

</div>

_hehe_

I’ve “infected” my girlfriend with the game. Now she’s playing it also 😃

Hey when will you release the android-version?

---

<div class="post-metadata">

**Author:** ![Dragosha](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/dragosha/32/5103_2.png) [@Dragosha](https://forum.defold.com/u/Dragosha)\
**Post date:** [August 12, 2017, 2:57am UTC](https://forum.defold.com/t/look-your-loot-aka-hamster/10018/20 "2017-08-12T02:57:17Z")

</div>

> [@stephenkalisch](#):
>
> Hey when will you release the android-version?

this fall, I guess

[Next page](https://forum.defold.com/t/look-your-loot-aka-hamster/10018.md?page=2)
