SimformSolutionsPvtLtd / battleship_flutter_flame

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

๐Ÿšข Battleship Game (Flutter Flame:fire:)

Battleship is a two player game. In this game players will place 4 ships on desired quadrants and then start. Both the players will have turns one by one to guess quadrants and destroy opponent's ship. Whoever manages to destroy opponent's all four ships wins the game.

You can learn more about rules and how to play it on wikipedia.

This app include null safety support as well.

๐Ÿ“„ Requirements

Make sure that you have all the requirements fulfilled and properly set for project execution.

๐Ÿ› ๏ธ Build project

1. Install dependencies

flutter packages get

2. Build apk

# run this step only if you want to create an apk file and install it to multiple device else you can go for step 3.

flutter build apk

3. Run app

# run this step if you do not want to create apk and install app on device or emulator directly.

flutter run 

๐Ÿ“ฑ Usage

1. Install and Open Battleship game.
2. Place all four ships on quadrants as you want.
3. Hit start button to play game.
4. Guess the ship locations on quadrants and tap on it to destroy the ships.
5. If you manage to destroy all 4 ships, you are a winner.

Here is an example,

Demo Image

๐Ÿš€ Development

We have used flame package to develop this app.

What is flame?

Flame is a modular Flutter game engine that provides a complete set of out-of-the-way solutions for games. It takes advantage of the powerful infrastructure provided by Flutter but simplifies the code you need to build your projects.

Flame provides simple yet effective game loop implementation, and the necessary functionalities that we need in a game. For instance; input, images, sprites, sprite sheets, animations, collision detection and a component system that we call Flame Component System (FCS for short).

you can learn more about flame and how to develop game in flame at flame documentation.

Why flame?

As defined in above section flame provides verity of components and functionalities that we can use to develop a 2D game. If we do the same thing using flutter components there are higher chances that it can become more complicated. Also there might be some performance issues.

Also if you have a prior experience with game engines developing game in flame becomes even easier.

About


Languages

Language:Dart 89.8%Language:HTML 8.8%Language:Swift 1.0%Language:Kotlin 0.3%Language:Objective-C 0.1%