Giter Club home page Giter Club logo

Comments (5)

patrickhoey avatar patrickhoey commented on August 22, 2024

Hello Dusan,

The BludBourne project that I have here on GitHub is basically the final full project that you will end up with by the end of the book. You should be able to just clone and build. I just tested my local copy of the BludBourne repo, and I can build without any errors. (This project has been tested on multiple systems before release as well and should be able to build).

If you are still having problems, please give me more specific error messages so I can try to figure out what problems you are having (a copy/paste of your standard out error messages). If you are using your own IDE (Not IDEA Community Edition) it could be issues with paths or the Gradle setup.

If you are following the book, then I recommend that you download the project archive that contains the source for each of the chapters. There are a few ways to get the zip file that contains the source chapter by chapter.

  1. I just pushed a new repo to GitHub called MasteringLibGDXGameDevelopment_CodeBundle. This contains the zip files for each of the chapters, which in turn contain the source specific to the corresponding chapter. (https://github.com/patrickhoey/MasteringLibGDXGameDevelopment_CodeBundle)

  2. Register here at https://www.packtpub.com/books/content/support and they will email you a link to the zip file that contains all source for the chapters in the book

  3. You can review the commit history log of the BludBourne project on GitHub, and look at the check-in comments. You can select the last comment that has the current chapter you are reviewing, such as "Ch02" and check that version out to your own private branch.

from bludbourne.

dusanvita avatar dusanvita commented on August 22, 2024

Thank you so much for the tips and most of all the fast response. This is the error I get when after successfully importing the project to AndroidStudio and using Application as a build configuration:

Exception in thread "LWJGL Application" com.badlogic.gdx.utils.SerializationException: Error reading file: scripts/town_folk.json
at com.badlogic.gdx.utils.Json.fromJson(Json.java:683)
at com.packtpub.libgdx.bludbourne.Entity.getEntityConfigs(Entity.java:187)
at com.packtpub.libgdx.bludbourne.EntityFactory.(EntityFactory.java:44)
at com.packtpub.libgdx.bludbourne.EntityFactory.getInstance(EntityFactory.java:63)
at com.packtpub.libgdx.bludbourne.screens.MainGameScreen.(MainGameScreen.java:75)
at com.packtpub.libgdx.bludbourne.BludBourne.create(BludBourne.java:59)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:143)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:120)
Caused by: com.badlogic.gdx.utils.SerializationException: Error parsing file: scripts/town_folk.json
at com.badlogic.gdx.utils.JsonReader.parse(JsonReader.java:77)
at com.badlogic.gdx.utils.Json.fromJson(Json.java:681)
... 7 more
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: File not found: scripts\town_folk.json (Internal)
at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:136)
at com.badlogic.gdx.files.FileHandle.reader(FileHandle.java:163)
at com.badlogic.gdx.utils.JsonReader.parse(JsonReader.java:75)
... 8 more

After some time I have actually found the location of the scripts folder in core/assets/scripts, but I can't find why the error is occurring...

Again thank you so much for the tips, it makes a lot of sense, I will follow up by checking out chapter commits. Amazing job you did on organizing things, and so far in the book I find it very useful and understanding. Great job, thank you for that! 👍

from bludbourne.

patrickhoey avatar patrickhoey commented on August 22, 2024

I have not used Android Studio, but the issue sounds like it is using the root directory of the project as the working directory. Try setting the "working directory" to "core/assets". It should then be able to find all the resource files correctly.

from bludbourne.

dusanvita avatar dusanvita commented on August 22, 2024

Heads up, I made it work after editing the paths to be like:
core/assets/scripts/town_folk.json
instead of:
scripts/town_folk.json

Not sure if it's an issue in my project setup, still trying to figure how libGDX uses gradle.

from bludbourne.

dusanvita avatar dusanvita commented on August 22, 2024

Exactly, thanks for the support! :)

from bludbourne.

Related Issues (3)

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.