SkillAgentSearch skills...

AndroidPunk

A port of FlashPunk for Android. FlashPunk is a free ActionScript 3 library designed for developing 2D Flash games. It provides you with a fast, clean framework to prototype and develop your games in. This means that most of the dirty work (timestep, animation, input, and collision to name a few) is already coded for you and ready to go, giving you more time and energy to concentrate on the design and testing of your game.

Install / Use

/learn @gamblore/AndroidPunk
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

AndroidPunk

An Android port of the open-source game engine FlashPunk.

How-To

This How-To pulls from example classes located in the sample folder.

Create an Engine class, World class, etc.

public class Main extends Engine {

    private static final String TAG = "Game";
    
    public Main(int width, int height, float frameRate, boolean fixed) {
        super(width, height, frameRate, fixed);
        FP.setWorld(new OgmoEditorWorld(R.raw.intro_1));
    }
}

Then create a class that extends PunkActivity and set the following to whatever you want.

public class MyAndroidPunkActivity extends PunkActivity {
    static {
        // This is how big the screen is targeted for, it will resize the display
        // to meet the device's size.
        PunkActivity.static_width = 800; 
        PunkActivity.static_height = 480;
        
        // Set this to a class that extends Engine that will be created when the screen is ready.
        PunkActivity.engine_class = Main.class; 
        
        // If you want fixed time between frames set these. Value is in frames per second. 
        //FP.fixed = true;
        //FP.assignedFrameRate = 30
    }
}

Legal

This project uses Rihno for JavaScript. You can find it more information on it here.

View on GitHub
GitHub Stars16
CategoryDevelopment
Updated6mo ago
Forks5

Languages

Java

Security Score

82/100

Audited on Sep 8, 2025

No findings