Coder Social home page Coder Social logo

sqoshi / arcanoid Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 2.25 MB

Arcanoid game implemented in kotlin. Game has two types of gameplay. Multiplayer where user can join `rooms` opened by other players or create own customized one. Singleplayer where all data is being stored locally and user breaks his own records by beating next stages.

Kotlin 100.00%
mobile-applications kotlin firebase room-database

arcanoid's Introduction

Table Of Contents


Arcanoid

[NOTE] If video is not loading properly, it may be found in Arcanoid/media/

Introduction

Simple implementation of very popular game Arcanoid. Two game modes multiplayer and singleplayer allow to play with friends and break your records. Video of both modes are avaible in multiplayer singleplayer

General Info

Each user register his nickname in database. Registration is automatical, it does mean that first login stores nickname in database ( if nickname is available).

Multiplayer

When user want to play with friends he need to join or create a room. Each room contains Game configuration (rows, columns, mode(EASY,HARD,MEDIUM)). Room may be created by every user and configured as only he wish. Lobby is a list of rooms that are open at the moment. By clicking list item player joins as a guest and contest begin. The one who first destroys all the bricks wins.

Video

multiplayer.mp4

Database

Communication is owed to the firebase. Players listening opponents score and communicating in real time in such way.

Singleplayer

When user playing singleplayer mode he just beat next stages and local room database stores his achievements ( records ).

Video

singleplayer.mp4

Code Example

private fun addScoreListener() {
    messageReference.addValueEventListener(object : ValueEventListener {
        override fun onDataChange(snapshot: DataSnapshot) {
            if (snapshot.getValue(String::class.java) != null) {
                game_view.pauseThread()
                basicAlert(snapshot.getValue(String::class.java))
                closeRoom()

            }
        }

        override fun onCancelled(error: DatabaseError) {
            messageReference.setValue(message)
        }

    })
}

arcanoid's People

Contributors

sqoshi avatar

Watchers

 avatar  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.