Git Product home page Git Product logo

ctxp's Introduction

ctxp's People

Contributors

foresterre avatar jadeleeuw avatar jtvanschagen avatar nicktud avatar sirpolomotro avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

superstarfish

ctxp's Issues

Internal files libgdx (when testing)

All our assets are stored in the Android module, in the /assets/ folder.
When I'm testing, file handles created using the libgdx: Gdx.files.internal("path/to/file.ext") do not seem to work.
However, in the normal source code used while running the application itself, the file handle is created correctly and the file actually can be found.

Example stack trace (TextureFactoryTest):

Couldn't load file: images/wooden_sign.png
com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load file: images/wooden_sign.png
    at com.badlogic.gdx.graphics.Pixmap.(Pixmap.java:140)
    at com.badlogic.gdx.graphics.TextureData$Factory.loadFromFile(TextureData.java:98)
    at com.badlogic.gdx.graphics.Texture.(Texture.java:100)
    at com.badlogic.gdx.graphics.Texture.(Texture.java:92)
    at cg.group4.container.image.TextureFactory.getWoodMenuTexture(TextureFactory.java:23)
    at cg.group4.container.image.TextureFactoryTest.testGetWoodMenuTexture(TextureFactoryTest.java:52)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at cg.group4.GdxTestRunner.render(GdxTestRunner.java:50)
    at com.badlogic.gdx.backends.headless.HeadlessApplication.mainLoop(HeadlessApplication.java:125)
    at com.badlogic.gdx.backends.headless.HeadlessApplication$1.run(HeadlessApplication.java:90)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: File not found: images\wooden_sign.png (Internal)
    at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:137)
    at com.badlogic.gdx.files.FileHandle.readBytes(FileHandle.java:223)
    at com.badlogic.gdx.graphics.Pixmap.(Pixmap.java:137)
    ... 20 more

Local server

The idea (not before lock)

Our current implementation has a separation between the local activities and the multiplayer activities.
This also means, different ways to storage of achieved rewards.
Locally the progression is stored as a serialized file.
On the server, the group progression is stored as a sqlite database.

The idea is to remove the local storage completely (along with other client<>server separated components).
Instead we will use a local server on the device; which will store, for example, the offline user progression in a local sqlite database.

Pro's
  • Unified implementations for both client- / server-side (reuse of components)
  • Less compatibility issue's (against serialization)
Con's
  • New implementation (thus time)

Current setup


######################               #####################################
# device (Local)     #  -----------  # local file system (progression)   #
######################               #####################################      
           |
           |
           | net
           |
           |
###############               #####################################
# server      #  -----------  # sqlite (group progression)        #
###############               #####################################      

Proposed setup


#########################
# device (local)        #
#        ################               #####################################
#        #    server    #  -----------  # sqlite (personal progression)     #
#        ################               #####################################
#########################
           |
           |
           | net
           |
           |
###############               #####################################
# server      #  -----------  # sqlite (group progression)        #
###############               #####################################      

@foresterre
@sirpolomotro

Background music

Background music was removed for now (because of the refactoring, in which we refactored the WorldRender).
It should be re-added.

FishingStrollEvent crashes upon initialisation

06-17 15:52:41.070 11209-11228/cg.group4.android E/AndroidRuntime﹕ FATAL EXCEPTION: GLThread 983 java.lang.NullPointerException at cg.group4.game_logic.stroll.events.fishevent.FishingStrollEvent.update(FishingStrollEvent.java:51) at java.util.Observable.notifyObservers(Observable.java:138) at cg.group4.data_structures.subscribe.Subject.update(Subject.java:27) at cg.group4.game_logic.StandUp.update(StandUp.java:131) at cg.group4.Launcher.render(Launcher.java:152) at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:422) at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1531) at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1248) 06-17 15:52:45.210 11209-11209/cg.group4.android E/AndroidGraphics﹕ waiting for pause synchronization took too long; assuming deadlock and killing

Text not wrapping.

When text does out of the boundaries of the stage it is not being wrapped. This results in the text not being completely visible.

Writing tests for StrollEvents

Writing tests for stroll events is currently impossible, due to not being able to instantiate a concrete StrollEvent. This because of something with the ScreenStore

Adding accellibandroid

We will try to add AccelLibAndroid (By Job Becht, Wouter Groen, Olivier Hokke, Eric Rijnboutt) so we can more easily determine whether a player is either "Resting", "Walking", "Running" or "Cheating".

@surskit
@foresterre

Server vs Local Time

Currently we use the local time (time on the device) when we award a reward.
It might be worth to use a server time (if available, where availability is a con).

Local storage of collection

When a player plays the game and receives rewards, he/she wants to keep this data available after exiting the application. This data, a game save should be stored on the local file system.

requirements

  • should be able to store the collectibles collected in a local file.
  • should be able to read data about collectibles collected from a local file.
  • should work on both the desktop and android

nice to have

  • should be able to encrypt and decrypt this game save data -> Currently functionality is more important.

literature

problems

  • Libgdx's json is not so well documented, throws a lot of undocumented exceptions
  • jackson is no longer actively developed
  • because Collectible is an abstract class, jackson can not automatically deserialize. However when manually marking the types for (de)serialization; still exceptions are thrown

solutions

  • use java's serializable
  • possibly if JSON is really wanted, use the jackson or gson library.

current implementation

  • uses java's serializable and libgdx's write file (to be compatible on both the desktop (for debugging) and android (debug & production)

Maven -> Gradle

We are redoing the setup of the project to Gradle instead of Maven.
The most important reason for this is libgdx, since its support of Maven is not good enough (it takes a lot of time to setup and maintain).

  • Base libgdx project
  • Configure Travis-CI to work properly with Gradle
  • Add static analysis tools to Gradle build
    • PMD
    • Find bugs
    • CheckStyle
  • Merge the deliverables, old project and new project setup properly.

Switching orientation crashes the app

06-17 15:44:30.000 10759-10777/cg.group4.android E/AndroidRuntime﹕ FATAL EXCEPTION: GLThread 974 java.lang.NullPointerException at cg.group4.view.screen.CollectiblesScreen.constructContents(CollectiblesScreen.java:235) at cg.group4.view.screen.CollectiblesScreen.rebuildWidgetGroup(CollectiblesScreen.java:94) at cg.group4.view.screen_mechanics.ScreenStore.rebuild(ScreenStore.java:139) at cg.group4.view.screen_mechanics.WorldRenderer.resize(WorldRenderer.java:165) at com.badlogic.gdx.Game.resize(Game.java:51) at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:247) at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1520) at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1248)

Building for Android from Eclipse

We managed to successfully build for Android from the command line (using Java SE 7 (Do not use 8 for this)).
We also managed to successfully build for Android from IntelliJ (using Java SE 8, not sure how, since it is unsupported by Android, and this computer did not contain Java JDK 7 at that time.).

For some reason Eclipse does not want to build.
We are working on solving this issue.

[2015-05-04 17:23:32 - standup-android] Dx 
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
    at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
    at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
    at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
    at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
    at com.android.dx.command.dexer.Main.processClass(Main.java:665)
    at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
    at com.android.dx.command.dexer.Main.access$600(Main.java:78)
    at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:170)
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:229)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:229)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:229)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:596)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
    at com.android.dx.command.dexer.Main.run(Main.java:230)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:188)
    at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:813)
    at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:597)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:328)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:403)
    at org.eclipse.core.internal.resources.Project$1.run(Project.java:618)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
    at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597)
    at org.eclipse.core.internal.resources.Project.build(Project.java:124)
    at com.android.ide.eclipse.adt.internal.project.ProjectHelper.doFullIncrementalDebugBuild(ProjectHelper.java:1143)
    at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:155)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
...while parsing cg/group4/StandUp.class

[2015-05-04 17:23:32 - standup-android] Dx 1 error; aborting
[2015-05-04 17:23:32 - standup-android] Conversion to Dalvik format failed with error 1

@surskit
@foresterre

Failing test TimeKeeperTest.java

A test in TimeKeeperTest.java sometimes fails randomly. Guessing it happens because of the System.currentTimeMillis used? It concerns the update test.

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.