Giter Club home page Giter Club logo

andors-trail's People

Contributors

oskarwiksten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

andors-trail's Issues

One parallel array more.

com.gpl.rpg.AndorsTrail.controller.PathFinder.ListOfCoords
private final int coords[]

You can split coords array in two arrays:

private final int xCoords[]
private final int yCoords[]

And you will not need to convert between coords and int.

Using the TMX loader in other projects

I am trying to learn how to program Android RPGs and I came across Andor's Trail. I downloaded the code and I was wondering if there is any way to use its TMX loader in any other programs than Andor's Trail?

Method implementation suggestion.

public final class ActorStatsController;

private static int getRandomConditionForRejuvenate(Player player) {
    int i = -1;
    int count = 0;
    int potentialConditions[] = new int[player.conditions.size()];
    for (ActorCondition c : player.conditions) {
        i++;

        if (!c.isTemporaryEffect())
            continue;
        if (c.conditionType.isPositive)
            continue;
        if (c.conditionType.conditionCategory == ActorConditionType.ConditionCategory.spiritual)
            continue;

        potentialConditions[count++] = i;
    }

    if (count == 0)
        return -1;

    return potentialConditions[Constants.rnd.nextInt(count)];
}

Dialogs disappear on device rotation

When I perform these sequences of events, the dialog on screen disappears:

Sequence 1:
[A game started]
1.  Click on New Game
2.  Orientation Change

Sequence 2:
[Old version installed]
1.  Click on Load Game
2.  Click on item in list
3.  Orientation Change

Sequence 3:
[1. A game is saved
2. World map]

  1. Click on Save Image
  2. Click on Item in list
  3. Orientation Change

Floor and int type casting is not needed.

com.gpl.rpg.AndorsTrail.model.actor.Actor;

public int getAttacksPerTurn() { return (int) Math.floor(getMaxAP() / getAttackCost()); }

public int getAttacksPerTurn() { return getMaxAP() / getAttackCost(); }

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.