Code Monkey home page Code Monkey logo

jme3-iceloader-ant-plugin's Introduction

Iceloader Ant

A JME3 plugin library that adds an Ant task for encrypting and indexing assets for use with the Iceloader plugin.

Dependencies

This plugin uses an libraries. The actual number needed at runtime will depend on the usage.

Encrypting Your Assets and Creating Indexes

Indexes are used for two things.

  1. To speed up freshness checks when loading assets from a remote server for example using EncryptedServerLocator or ServerLocator. The index also contains the last modified time so only has to be downloaded once up-front, saving one request per asset.

  2. You may have a need to know what assets you have at runtime. I use this for some in game design tools (for creatures and world building). New assets may be uploaded by users at any time, so the index is useful to me.

The same tool that is used for indexing is also used to encrypt the assets for upload to the server that will be supplying them (or used to encrypt classpath resources if the assets you supply with your game are to be encrypted).

So, to create indexes and encrypt the assets, you use the provided Ant plugin. Add something like the following to your build-impl.xml

    <target name="compile-assets" depends="init">
        <taskdef name="astproc"
            classname="icemoon.iceloader.ant.AssetProcessor"
            classpath="${javac.classpath}"/>
        <astproc encrypt="true" index="true" srcdir="assets" destdir="enc_assets" simplePassword="password123?" simpleSalt="12345678"/>
    </target>

This will create the directory enc_assets, you can then upload this entire direwctory to any HTTP server and use EncryptedServerLocator in your locator list (see below for how to configure the location of the server).

Task attributes

The task supports the following attributes.

Name Type Default Description
encrypt boolean true Determines whether assets will will be encrypted.
index boolean true Determines whether assets will will be indexed.
srcDir Path Required Source location of assets.
destDir Path Required Destination location of assets.
encryptionContextClassName Class name Optional Fully qualified class name of a custom EncryptionContext (must be on tasks classpath).
simplePassword String Optional When default EncryptionContext is in use, the password to use for encryption key.
simpleSalt String Optional When default EncryptionContext is in use, the salt to use for encryption key.
magic String !@ENC/PF_0 Header used for encrypted files.
cipher String AES/CFB8/NoPadding Cipher to use for encrypting files.

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.