Complete Java Project template for running and creating Jar files for Java projects, with built-in fast-pixel blitting engine.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
sigonasr2 24429fe72a Spaced trail code 2 years ago
Java/scripts Import current PixelEngine to JavaProjectTemplate 2 years ago
bin Import current PixelEngine to JavaProjectTemplate 2 years ago
docs Import current PixelEngine to JavaProjectTemplate 2 years ago
sprites Import current PixelEngine to JavaProjectTemplate 2 years ago
src/sig Spaced trail code 2 years ago
utils Import current PixelEngine to JavaProjectTemplate 2 years ago
JavaProjectTemplate_0.0a.zip Import current PixelEngine to JavaProjectTemplate 2 years ago
README.md Import current PixelEngine to JavaProjectTemplate 2 years ago
manifest Import current PixelEngine to JavaProjectTemplate 2 years ago
runGame.sh Import current PixelEngine to JavaProjectTemplate 2 years ago
sig Import current PixelEngine to JavaProjectTemplate 2 years ago
tmp Include new language paramter SigScript version 3 years ago

README.md

PixelEngine

A small pixel-based game / rendering engine made in Java highly influenced and similar to the olcPixelGameEngine.

Usage:

Main engine file is in JavaProjectTemplate.java. If you choose to rename this file you should probably have your IDE refactor it so all references change accordingly. Better to just leave it as-is.

You will also have to update the sig script with the new PROJECT_NAME value.

Window

Window Width, Height, and the title can all be customized.

Drawing

You will find all possible drawing features under the game Panel object that is initialized for you. Draw commands all start with Draw. The example program contains quite a few of the possible draw commands available.

Sprites

Sprites can be placed in the sprites folder and referenced accordingly. Instantiating a new Sprite class or AnimatedSprite class with the name will auto-load it in. Animated Sprites need their base width and height defined, the engine will figure out the animation frames for the rest of the image. DrawAnimatedSprite functions request what index of the animation to draw, you feed that yourself. Only horizontal animation strips are supported by default.

Input

Mouse input is handled from the Mouse static instance. Can poll for Held,Pressed, and Released status of the mouse. Keyboard input is handled much the same way with the Key static instance. Also has Held,Pressed, and Released statuses per key. Keycodes come from the Java Swing KeyEvent class (ex.KeyEvent.VK_UP).

Building

I include some compile scripts, but you are free to use your own. ./sig lists all possible commands, ./sig build builds and tries to run the compiled Java classes. ./sig jar will output a jar. ./sig zip will piece together the sprites folder, bin folder, and a run script (for Linux) to run a finished java jar, which provides an easy way to "export" the game.