Coder Social home page Coder Social logo

acid-snake's Introduction

acid-snake's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

acid-snake's Issues

Change point system

The final score will be calculated by considering the collected points and the time needed.

The formula is like the following:

FINAL_SCORE = POW(POINTS, 2) / SECONDS / 5

For example:

POINTS = 330;
SECONDS = 77;

FINAL_SCORE = 279

Create player profiler

Implement functionality in order to measure the 'skill' of a player. There are many factors to consider due to calculate some kind of number which represents the current skill of the player.

First approach

In Acid Snake it is possible move the snake around and/or to collect blocks. These two actions can be divided into sub-factors to calculate a proper value. We need an interface which provides seconds based calculations:

public interface PlayerTracker {

    /**
     * Returns the average of collected blocks per second
     */
    float getBlocksPerSecond();

    /**
     * Returns the average of touches per second
     */
    float getTouchesPerSecond();

    /**
     * Returns the average number of combos
     */
    float getCombosPerSecond();

    /**
     * Returns the number of collected blocks at some point of history
     */
    int getNumberOfCollectedBlocks(int history);

    /**
     * Returns the number of combos at a certain history
     */
    int getNumberOfCombos(int history);

    /**
     * Returns the collected block at some point in the history
     */
    EntityType getBlockOfHistory(int history);
}

By doing so it should be very easy to use the provided data to delegate information to another class which calculates a value from it (which represents the current skill). Therefore we have to consider the priority of each action, which block has been collected at a certain point of history.

Simplified, the history represents the number of collecting steps (taken by the snake) in the past. When I want the block which has been collected 10 steps before, I only need to call playerTracker.getBlockOfHistory(10).

Estimating the skill of the player

I would recommend a system between 0.0-1.0-xx to estimate the skill of a player. The default is 1.0 (at the beginning). If the player plays not very good, the skill goes down. If the player makes smart combinations (such as using two portals directly afterwards) or acting as fast as possible (high collecting frequency), the skill goes up.

Usage of the value

The estimated skill can be used to control for instance the spawn rate. It could be possible to spawn blocks next to each other to provide a valid combo.

The problem is that the player could leave combos on field in order to make the super epic high score by collecting them together. Therefore those kind of block chains should disappear after a number of movements.

item: teleporter

Create an item which teleports the snake to another, marked location.

Behavior

  • spawns by a rate of 0.001%
  • spawns only two teleporters at one time
  • disappears when collecting other items (25% rate)
  • when entering one teleporter, the snake will be teleported to the other location
  • all teleporters disappear after usage

Rendering bug on advanced devices

When playing AcidSnake on advanced devices, there appear green boxes behind the snake. This may caused by a wrongly set rendering/clearing order.

Snake leaves green chunks

When moving the snake, it leaves green chunks (on faster devices only). Maybe caused by wrong event handling (order of event processing maybe wrongly configured)

App crashes unexpectedly

The app crashes sometimes on higher devices (4.x android versions) with the following exception:

java.lang.IllegalStateException: GameHelper: operation attempted at incorrect state. Operation: succeedSignIn. State: DISCONNECTED. Expected states: CONNECTING CONNECTED.
at com.google.example.games.basegameutils.GameHelper.assertState(GameHelper.java:184)
at com.google.example.games.basegameutils.GameHelper.succeedSignIn(GameHelper.java:781)
at com.google.example.games.basegameutils.GameHelper.connectNextClient(GameHelper.java:677)
at com.google.example.games.basegameutils.GameHelper.onConnected(GameHelper.java:777)
at com.google.android.gms.internal.u.v(Unknown Source)
at com.google.android.gms.internal.bp.v(Unknown Source)
at com.google.android.gms.internal.u$f.a(Unknown Source)
at com.google.android.gms.internal.u$f.a(Unknown Source)
at com.google.android.gms.internal.u$b.A(Unknown Source)
at com.google.android.gms.internal.u$a.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:5777)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1083)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:850)
at dalvik.system.NativeStart.main(Native Method)

Blocks inside of the snake

Sometimes blocks can spawn inside of the snake. On some devices (e.g. Samsung Galaxy S3) normal food still exists after eating it. Only when the tail enters the block, it will be removed then.

NullPointerException in Achievement Manager

The following exception comes up sometimes in AchievementManager:

java.lang.NullPointerException
at de.myreality.acidsnake.google.ArchievementManager$DirectComboDetector.update(ArchievementManager.java:402)
at de.myreality.acidsnake.google.ArchievementManager.onCollide(ArchievementManager.java:141)
at de.myreality.acidsnake.core.SimpleSnake.setIndex(SimpleSnake.java:237)
at de.myreality.acidsnake.util.AbstractIndexable.setIndexY(AbstractIndexable.java:79)
at de.myreality.acidsnake.core.SimpleSnake.move(SimpleSnake.java:114)
at de.myreality.acidsnake.util.Accelerator.update(Accelerator.java:70)
at de.myreality.acidsnake.world.SimpleWorld.update(SimpleWorld.java:250)
at de.myreality.acidsnake.screens.IngameScreen.render(IngameScreen.java:135)
at com.badlogic.gdx.Game.render(Game.java:46)
at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:457)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1523)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)

item: acid

The snake explodes at the tail and a given amount of blocks will be removed from it.

Behavior

  • spawns only when length of the snake is bigger than 10
  • spawns at a rate of 0.001%
  • shines bright (particle effect)
  • removes randomly 1 - 3 blocks of the snake

Position of pause button is annoying

The pause button should be moved to the left hand side, because as a regular player it happens very often, that you accidentely touch the button.

Log in is only checked once

When starting the app, it's only checked once, if the user is logged in. To improve the situation, check for login in a given interval. If not, try to login via the GoogleInterface.

item: bomb

Kills the snake by dealing much damage.

Behavior

  • spawns at a rate of 0.001%
  • has a shiny red color
  • kills the snake instantely on usage
  • there can be 5 bombs at one time
  • has a chance to disappear when entering another block (5%)

Particles stay without a block

Sometimes particles spawn without a combined block. Only to remove the block manually causes a solution of this problem.

Score menu disappears too fast

When finishing a game and you touch the screen afterwards (as a result of the gameplay), it's not possible to see the final score properly.

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.