java 2d引擎_Voodoo 2D - 用Java构建的2D Java游戏引擎

voodoo2d.png

Voodoo 2D

A lightweight engine to easily build complex cross-platform 2D games in Java.

canvas.gif

Code:

Mesh mesh = Mesh.loadMesh("textures/player.png", 64); // Create new mesh with size of 64x64 pixels

GameObject gameObject = new GameObject(mesh); // Makes a new gameObject from mesh

Animation run = new Animation(gameObject, 0, 3, 6); // Creates new animation with frames 0 - 3 at 6 fps

run.play(); // Play the animation!

INPUT

if(window.isKeyPressed(GLFW_KEY_D)) { // Checks if "D" key is down

run.play(); // Plays our animation!

COLLISION

aabb = new AABB(); // Make a new collision box

aabb.setMin(0.0f, 0.0f); // Set the bottom left point of the boundary

aabb.setMax(1.0f, 0.175f); // Set the top right point of the boundary

CONTRIBUTING

If you'd like to make a contribution, please refer to CONTRIBUTING.md or read the wiki page on how to set up the project

TROUBLESHOOTING

A game object is not drawing to the screen!

Make sure you placed the game object in the gameObjects list that will be passed into the render method of the renderer.

Check to see if the object has been instantiated properly.

Animations are not diplaying properly

Ensure that you have given the proper range of sprites to be displayed from the spritesheet (i.e. 0 - 3).

Remember that, when playing an animation, all other animations attached to that game object will be stopped.

Something else isn't working properly

Open up an issue! Someone will get to it as soon as possible.

Current Version

1.0-SNAPSHOT (Development Version)

Areas for improvements / involvement

A tilemap system

Anti aliasing

Audio

GUI

Particle System

Scenes

Lighting options

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值