Skip to content

Get sprite categories

Ahmed Abdel Samea Khalifa edited this page Feb 19, 2016 · 3 revisions

The GameAnalyzer class help you to retrieve more information about the game sprites that can be super helpful in constructing your level. One of the most important feature that it classify the sprites into 6 categories based on their interaction with other sprites in the world. The following table show different function that retrieve sprites according to their categories:

GameAnalyzer functions Description
ArrayList<String> getSolidSprites() Return a list of all sprites that have only one interaction which is blocking the avatar from moving
ArrayList getAvatarSprites() Return a list of all sprites that are found in the game.
ArrayList getHarmfulSprites() Return a list of all sprites that kill the avatar or spawn sprites that kill the avatar.
ArrayList getCollectableSprites() Return a list of all sprites that can be collected by the avatar.
ArrayList getGoalSprites() Return a list of all sprites that are found in the termination condition.
ArrayList getOtherSprites() Return a list of all sprites that are not any of the above.

All categories are mutually exclusive except for Goal Sprites. As any object can be a goal sprite and any other category at the same time. For example:

SpriteCounter stype=pacman limit =0 win=false

pacman here is an avatar sprite and at same time goal sprite.

Table of Contents:

Clone this wiki locally