Giter Club home page Giter Club logo

slideparty's Introduction

slideparty

codecov

Slideparty - game intro

Inspiration

I want to make a puzzle game that runs on all platforms: Web, Android, iOS, Linux, Windows and MacOS. You can play with your friends regardless of what operating system you are using, you just need to have a room number to be able to play online and compete with your friends or you can directly compete with your friends. locally by various types of controls for different types of screens.

Like and comment my submissions in devpost.

What it does

Just a casual and fun puzzle game!

How we built it

The game has two part:

  • Client: I use flutter to make truly one codebase for across platform.
  • Server: I use shelf to make a web server in dart.

Client

Slideparty has three game-mode

  • Single mode: Play and try to solve as fast as you can a 3x3, 4x4 or 5x5 puzzle board.
  • Features:
    1. Auto solving
    2. Multiple ways to control game base on current devices
  • Multiple mode: Play with friends in local, you can play upto 4 players.
  • Features:
    1. Responsive layout
    2. Multiple ways to control game base on current devices
    3. Some sort of skills to prevent or annoying your friends for fun
  • Online mode: Enter a room code and you can play like multiple mode but on different devices.
  • Features:
    1. Real-time communication
    2. All features in multiple mode

Server

Slideparty server use websocket for handle real-time interaction between players.

Use shelf and shelf_router to making a web server is pretty straight-forward.

I seperate how client talking to server with mono-package slideparty_socket base on websocket, basically when client send an event and server handle that event, processing how the playboard changed and send back to client a json decoded.

Challenges we ran into

Auto-solver is pretty hard, first i'm trying to use A* algorithms to find the best solutions. It works well with 3x3 puzzle ... but with 4x4 the time complexity is so huge and immediately block UI thread so with this approach, impossible to solve 4x4 and 5x5 while keeping the app run smooth.

bob

After that I trying to find a pattern of the game then i found that if we solve the first row and first column of a N x N playboard and you remain exact (N - 1) x (N - 1) playboard and you can keep solving until N = 1 you solve the puzzle! This solution isn't return the shortest step to solve but it's run pretty fast and it's can solve any N x N board so i'm accept that is not the best solution but it is the fast enough to run smooth solution.

You can find my auto-solver algorithm in slideparty_playboard_utils repository.

What we learned

Have fun with flutter Discover how to use dart for backend

Testing

I tried to test all the essential parts of the game. It's not 100% coverage but it's still more reliable than no testing. To test this game, run the command:

flutter test

slideparty's People

Contributors

definev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.