Made a game in which you are a fox that wants to get to a chicken. Beware the farmer. Tap to move. Run on Android. It could be that the app is completely out of scale. Fix: rebuild the app again.
Hello Flutter judges and crew! Before we get started with the app, I'd like to present myself a little more. My name is Sven Knockaert, and I'm a student IT, last year, based in the idyllic city of Bruges, Belgium. I'm currently doing an internship with a firm that adopted Flutter recently. My task there is to get to know it better and help write an app for a client that delivers transport services for employees of multiple large companies in the Ghent harbor area. So naturally this contest is a nice opportunity for me to get to know Flutter even better.
My entry for the Flutter contest is a game. I chose this aspect of Flutter because I've made a few games in Javascript before. I also chose it because it's a nice change from the Material apps I write during the day :) . The concept: you are a fox. You want to get to the chicken. Try not to get caught by the angry farmer (he's the owner of the chicken). There is only one control: tap and hold to move forward. Release to stop.
I've ran the app only on Android smartphones (mainly Oneplus). They might work on iOS, but I have no idea. So, I'd recommend it to be ran on an Android device! Another note: it could be that the app is completely out of scale. You'd need to rebuild the app after the first time. I did not have the time to circumvent this issue.
A few points I'd like to make: I...
- used the
Flame
package that can be found on pub.dartlang.org because, in my opinion, it's the best package to make Flutter games out there - used the Visual Studio code auto formatting key combo to guarantee readability
- tried to keep variable names readable too
A few interesting features of Dart and Flutter that I managed to use here: the...
- chaining of method calls with ..
- avoidance of the
new
keyword to save precious bytes - usage of ? and ?? operators to check for null values
- avoided variable types in function parameters to also save bytes
- usage of the var keyword (just like in Javascript), to prevent having to write longer types (String, List, etc)
Finally, I want to emphasize that all the assets used are handcrafted by myself, in Illustrator and Photoshop. Most of them are made with the pen tool and a Wacom Intuous (source files can be asked for if desired).
I hope you will enjoy my entry.
Kind regards Sven Knockaert sven.knockaert@hotmail.com
// remove git