top of page

SemB: Week 2 - Swipe Gesture & More models

I am thinking that 3 slots in the inventory panel are not enough so I decided to make it 6.

At first, I am thinking to simply add an arrow button to control. But the arrows are too small and we have a limited space down there. I don't think it would be a good choice to add two arrows button.

Therefore, I did some research and decide to try the swipe function.

 

Function in inventory panel:

1. Click to use the tool.

2. Drag to place the tool out in the game scene.

3. Swipe to the other slots.

​

The major problem I am facing is how to distinguish this three gesture.

After a lot of testing, I successfully implement it.

​

The inventory panel is the region where the touch gesture started.

For every gesture, I will collect data of the first touch, last touch, touch time, direction and the distance between.

Click: release your finger in 0.2sec and distance smaller than 30px.

Swipe: release your finger in 0.5sec and distance is longer than 150px and direction is left or right.

Drag: drag (touch position) is upper than the slot.

​

Screenshot (71).png

I built the wood house model and the trap this week.

Screenshot (66).png
Trap.jpg
Screenshot (67).png
WoodHouse (7).jpg

Meanwhile, I draw more texture for preparation.

Night.jpg

This is the night sky texture. I am planning on to make a transition between the day and night time as fade in and out the day-night textures.

Smoke.png
Smoke.png
bottom of page