Mercury: The Simple 2D Game Library | >> BETA coming soon <<

Ported Framebuffer API to Modern OpenGL. Here’s a small snippet showing how to use the framebuffer.


frameBuffer.use();
{
    g.setColor(Color.CRIMSON);
    g.drawRectangle(100, 100, 100, 100);
    g.setColor(Color.CLOUDS);
    g.drawString("This is rendered to framebuffer!!", 0, 0);
}
frameBuffer.release();

That renders to the framebuffer. Then you can simply get the rendered texture by calling [icode]frameBuffer.getTextureObject()[/icode] and use it while rendering. The test renders the texture to a rotating rectangle.

And here is the FrameBufferTest running under Mac with OpenGL 3.3 (A crappy gif I could record)

And also fixed a small bug that caused rendering of [icode]SubTexture[/icode]s to cause an NullPointerException. Anyways, this is so small right now.

We plan to release this somewhere between 20th and 30th of December, and there is a lot more to do. Jev is currently working on a TMX map loader, and it’s going on pretty well, that should be available in his next commit. Till then, I’ll be working on the documentation, and will be testing to find any bugs that might crept in.

Happy Time Folks!!

I’d also like to clarify that right now I’m giving the website and forum a huge makeover.

There’s also going to be a showcase video for the library in roughly a week from now, so stay tuned! :slight_smile:

  • Jev

Great work, I love the FrameBuffer API : )

If you want anyone to take this project seriously you need to get rid of that smiley face. :point:

How about no. We’re fine with it and the majority of the people we’ve asked on the forum are also fine with it. :slight_smile:

We may update the logo in the future, but it’s a pain to go through every single document just to make another replacement that people will probably hate. It’s a waste of time and effort in my opinion.

You can’t please everyone. :emo:

  • Jev

I never understood the Runner class, it seems like it’s a singleton God-Class that claims to do everything.

Runner description : “The heart of Mercury. Runs the Core and provides all of the various materials required for your game.” (http://htmlpreview.github.io/?https://raw.githubusercontent.com/Radirius/Mercury/master/Project/target/site/apidocs/com/radirius/mercury/framework/Runner.html)

It has a single static instance which destroys the information control, any class can get/modify the Runner, Core, and current state of the Core.

Ex :
Runner.getInstance().getCore().getCurrentState()

It’s funny that you say that, saucy.
We recently gave the framework a huge makeover; it’s pretty awesome.

The Runner is gone. Most/All of the Runner’s functions have now been moved to other classes. Core also no longer handles the LWJGL display stuff, we’ve now created a Window class for that.

The way Core classes are made has also been changed, hopefully the following code will be self-explanatory.


public class Example extends Core {
    public Example(CoreSetup coreSetup) {
        super(coreSetup);
    }

    @Override
    public void init() {}
    @Override
    public void update() {}
    @Override
    public void render(Graphics g) {}
    @Override
    public void cleanup() {}

    public static void main(String[] args) {
        CoreSetup coreSetup = new CoreSetup("Window Title");
        coreSetup.width = 1280;
        coreSetup.height = 720;        

        new Example(coreSetup).start();
    }
}

Basically you just tell the CoreSetup what flags should be set. It’s a pretty simple change, but makes things much more flexible and intuitive.

We’ve also converted the game loop to a fixed timestep.

Have fun with this,

  • Jev

(The “Source” button at http://mercurylib.com/ shows me thevoid :point:)

I would like to run multiply windows. It is maybe not such important for the most games, but a thing I miss in other libs.

ClaasJG

It would be cool for users with more screens. Multiscreening support is something I missed at slick and I miss at LibGDX.
(OT: “at” is the wrong thing here I guess, do I have to use “in”?)

ClaasJG

Hi all.

Would just like to announce that one of our demo games, Ground Control, has just been released!

See the JGO post for more info.

  • Jev

Taking your project away from the only community that may have some interest when you have virtually no users seems a bit silly.

I’ve met far more Java game developers outside of JGO than I have here, so I wouldn’t necessarily say that JGO is the only place where people would enjoy it. There are plenty of other communities out there to spread the library to, JGO itself is still a pretty small community no matter which way you look at it.

It isn’t like we’re just going to stop talking about the library altogether, it’s just that we want to help clean up the forum a bit and encourage people to focus on other projects. I personally don’t feel like shoving the library down everybody’s throats, especially with some of the recent rule changes regarding topics like these.

If people are that interested in the development, they can go read the update blog themselves. :point:

  • Jev